Skip to content

ref(router): Upgrade to React Router v8 without transitions - #126218

Draft
nsdeschenes wants to merge 23 commits into
masterfrom
nd/react-router-v8
Draft

nsdeschenes wants to merge 23 commits into
masterfrom
nd/react-router-v8

Conversation

@nsdeschenes

Copy link
Copy Markdown
Contributor

Upgrade React Router from 6.30.6 to 8.4.0 and keep useTransitions={false} on application, admin, initialization, and test router providers so navigation remains compatible with the app's external stores.

Migrate imports and router types to the v8 API, update Sentry's routing integrations, and upgrade nuqs to 2.9.1 for its v8 adapter. Adapt the Jest environment and shared test router, including a regression that verifies suspended navigation displays its fallback immediately.

Fix replay timeline polling so an unchanged player timestamp cannot stop subsequent updates. Add regressions for both desktop and video replay players.

Validation:

  • Full TypeScript check passed.
  • Targeted routing, query-state, analytics, and replay test suites passed, including 17 replay context/player-state tests.
  • Lint, formatting, and repository pre-commit checks passed for the changed files.
  • Manual Chrome navigation across issues, explore, dashboards, monitors, and settings; replay play/pause, seek, rewind, resume, completion, and restart verified.
  • Frozen offline lockfile validation passed.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 1, 2026
Keep the real React instance available during automatic mock generation so nuqs reuses its adapter context. Restore ordinary replay hook mocks and cover automatic mocks with real query state.
Apply the router dependency transforms and replace import.meta.hot for the snapshot Jest configuration.
Own persisted preferences in one provider so validation and restoration use the same state. Cover functional updates across consumers and saved sort restoration with columns already in the URL.
Skip delayed opening autofocus when focus has moved to another control. Cover nested menu interactions with and without search.
Use matching dashboard routes and transaction replay project fixtures, supply the header API responses, and wait for relocation redirect destinations.
Wait for opening autofocus and the required metric options before sending keyboard events.
Mark the polling effect inactive during cleanup so a running callback cannot schedule another frame after unmounting or disabling the hook. Cover both synchronous cleanup cases while preserving unchanged-timestamp polling.
Set outputDirectory to public so the static builder does not default to build after detecting the direct react-router dependency. Preserve the existing build command and all other Vercel settings.
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Story previews

Preview the stories changed in this PR on the Vercel deployment:

Preview deployment: https://sentry-iprf1xmhw.sentry.dev

Select v6 for production, CI builds, and previews while defaulting local development to v8.
Allow a local v6 override and select the matching router, nuqs adapter, and test helpers.
Use a shared router API and keep React navigation transitions disabled in both versions.
Exercise nested routes, query updates, browser history, redirects, and loader data
through the shared router API with the matching real nuqs adapter.
Run the selected suites under both router versions and separate their caches.
Include related suites from either implementation while preserving scoped test selection.
Keep visual snapshot coverage on the production router.
Prevent direct router and nuqs adapter imports outside the version implementations.
Document the local v6 fallback, production v6 selection, and test defaults.
Restore the shared test-selection script and keep the router matrix in the frontend workflow.
Discover related tests under both versions, while collecting balancing timings only on v6.
Move the router version selector and its regression test into build-utils so their paths
no longer match backend configuration filters. Update build and Jest references while
preserving frontend test discovery and typechecking.
Preserve the shared event-view table refactor from master and use the router compatibility
module in Discover and Transaction Events.
Scope Rspack and Jest remapping to application imports while preserving dependency resolution.
Keep snapshots on v6 and retain the wrappers that disable navigation transitions.
Use react-router-dom imports in application code, tests, and routing helpers.
Let the remapping configuration select the runtime and enforce disabled transitions.
Keep versioned adapter and internal router types behind the compatibility module.
Include the router resolver in the frontend full-test selection filter.
Keep backend filters, the Jest matrix, and the balancing workflow unchanged.
@nsdeschenes

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 000ca2e. Configure here.

This branch was successfully deployed

1 active (outdated) deployment
Preview — 41754f70 Deployed Oct 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant