Skip to content

fix(tab-nav): preserve unofficialrun(s) URL param across tab navigation#320

Merged
adibarra merged 2 commits intomasterfrom
claude/issue-319-20260505-2213
May 5, 2026
Merged

fix(tab-nav): preserve unofficialrun(s) URL param across tab navigation#320
adibarra merged 2 commits intomasterfrom
claude/issue-319-20260505-2213

Conversation

@functionstackx
Copy link
Copy Markdown
Contributor

Fixes #319.

Tab links used bare hrefs (/evaluation, /historical, …), so clicking a tab while on /inference?unofficialruns=xyz dropped the query string and unloaded the unofficial-run overlay. The fix reads the unofficialrun(s) param from window.location inside TabNav and appends it to every tab href, kept in sync with:

  • pathname changes
  • unofficialRunInfos context updates (dismissRun / clearUnofficialRun write via history.pushState)
  • popstate (browser back/forward)

Both the desktop <Link> hrefs and the mobile <Select> router.push go through the same tabHref() helper.

Test plan

  • pnpm typecheck
  • pnpm lint
  • pnpm fmt
  • pnpm test:unit ✅ (1731/1731 app)
  • New Cypress component test tab-nav.cy.tsx — 4/4 passing
  • Playwright verified at /inference?unofficialruns=99999999 → click Accuracy Evals → lands at /evaluation?unofficialruns=99999999

🤖 Generated with Claude Code

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>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
inferencemax-app Ready Ready Preview, Comment May 5, 2026 10:42pm

Request Review

@functionstackx functionstackx requested a review from adibarra May 5, 2026 22:25
@adibarra
Copy link
Copy Markdown
Contributor

adibarra commented May 5, 2026

@claude can you run the linter and formatter

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Claude finished @adibarra's task in 57s —— View job


Linter and formatter

  • Install dependencies — already up to date
  • pnpm lint — ✅ 0 warnings, 0 errors (457 files)
  • pnpm fmt — ❌ found 1 unformatted file (tab-nav.cy.tsx), ran pnpm fmt:fix and re-verified ✅
  • Commit + push fix — 869df7d

The only formatting issue was a stray blank line before the closing }) in packages/app/cypress/component/tab-nav.cy.tsx. Fixed and pushed.
• Branch: claude/issue-319-20260505-2213

Co-authored-by: Alec Ibarra <adibarra@users.noreply.github.com>
@adibarra adibarra merged commit dc0c47b into master May 5, 2026
12 checks passed
@adibarra adibarra deleted the claude/issue-319-20260505-2213 branch May 5, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UX unofifical Run URL state

2 participants