ref(router): Upgrade to React Router v8 without transitions - #126218
Draft
nsdeschenes wants to merge 23 commits into
Draft
nsdeschenes wants to merge 23 commits into
nsdeschenes wants to merge 23 commits into
Conversation
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.
Contributor
Story previewsPreview 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.
Contributor
Author
|
bugbot run |
Contributor
There was a problem hiding this comment.
✅ 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
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.
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: