Skip to content

refactor(Navigation): Navigate inside the app without reloading the page - #9259

Draft
talissoncosta wants to merge 6 commits into
mainfrom
spike/router-links
Draft

talissoncosta wants to merge 6 commits into
mainfrom
spike/router-links

Conversation

@talissoncosta

@talissoncosta talissoncosta commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Spike, not for merge. Measures what it takes to stop internal navigation from reloading the whole page.

Changes

  • One shared history (common/history.ts), used by the app Router, the modal roots and the stores. goTo(url) sends in-app paths through the router and loads anything else. Without a DOM (Jest) it falls back to an in-memory history.
  • Modals now render inside a Router, so Link works there, and they close when the app navigates.
  • In-app links use the DS Link. The ones that went through Button href (change request notice, system segment links, signup "Log in") are now text links, since Button is for actions.
  • Same-tab internal links and redirects now use the router: blocked org info, cohort sync key step, change request notice, experiment freeze notice, custom fields links, code references, plan badge (SaaS), "Upgrade plan" in error messages, signup "Log in", system segment links, the "Create project" breadcrumb, 2FA on login, and the 404 redirects in the stores.

Left as full loads: links that open a new tab, external or auth redirects (SAML, OAuth, GitHub setup, support email, self-hosted pricing), the onboarding "Try again", the redirect after paying to unblock an organisation, which needs the organisation fetched again, and the usage limit banner, left to #8915.

Size

19 files, +125 / -80.

Open questions

  • Closing a modal on navigation skips its unsaved changes prompt. Running the prompt from the listener would loop, since CreateProject's prompt navigates too.
  • The stores navigating through a shared history is a new pattern.
  • "Enable feature versioning" and "View experiments" / "View pipelines" change from buttons to text links.

How did you test this code?

  • Signup "Log in" goes to /login without a reload.
  • Links inside the feature modal (code references, plan badge) close it and navigate without a reload.
  • A missing project redirects to /404?entity=project without a reload.
  • Opening a dependency from the Dependencies tab replaces the feature modal.

@vercel

vercel Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
flagsmith-frontend-preview Ready Ready Preview Dec 4, 2026 8:59pm UTC
flagsmith-frontend-staging Ready Ready Preview Dec 4, 2026 8:59pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
docs Ignored Ignored Preview Dec 4, 2026 8:59pm UTC

Request Review

talissoncosta and others added 2 commits December 4, 2026 17:26
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…payment

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
talissoncosta and others added 2 commits December 4, 2026 17:57
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
Preview – flagsmith-frontend-staging — df41ba27 Deployed Dec 4, 2026 by vercel[bot]
Preview – flagsmith-frontend-preview — df41ba27 Deployed Dec 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant