fix(tab-nav): preserve unofficialrun(s) URL param across tab navigation#320
Merged
fix(tab-nav): preserve unofficialrun(s) URL param across tab navigation#320
Conversation
Tab links used bare hrefs (e.g. /evaluation), so clicking a tab while viewing /inference?unofficialruns=xyz dropped the param and unloaded the overlay. Read the param from window.location and append it to every tab href, kept in sync with pathname changes, dismiss/clear (which write via history.pushState), and popstate. Fixes #319 Co-authored-by: functionstackx <functionstackx@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
@claude can you run the linter and formatter |
Contributor
|
Claude finished @adibarra's task in 57s —— View job Linter and formatter
The only formatting issue was a stray blank line before the closing |
Co-authored-by: Alec Ibarra <adibarra@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #319.
Tab links used bare hrefs (
/evaluation,/historical, …), so clicking a tab while on/inference?unofficialruns=xyzdropped the query string and unloaded the unofficial-run overlay. The fix reads theunofficialrun(s)param fromwindow.locationinsideTabNavand appends it to every tab href, kept in sync with:pathnamechangesunofficialRunInfoscontext updates (dismissRun/clearUnofficialRunwrite viahistory.pushState)popstate(browser back/forward)Both the desktop
<Link>hrefs and the mobile<Select>router.pushgo through the sametabHref()helper.Test plan
pnpm typecheck✅pnpm lint✅pnpm fmt✅pnpm test:unit✅ (1731/1731 app)tab-nav.cy.tsx— 4/4 passing/inference?unofficialruns=99999999→ clickAccuracy Evals→ lands at/evaluation?unofficialruns=99999999🤖 Generated with Claude Code