fix(react-router): Correct url attributes for history and relative navigations#22131
Open
Lms24 wants to merge 3 commits into
Open
fix(react-router): Correct url attributes for history and relative navigations#22131Lms24 wants to merge 3 commits into
Lms24 wants to merge 3 commits into
Conversation
Contributor
size-limit report 📦
|
…vigations The url.* attribute work surfaced incorrect destination URLs for navigate(-1), navigate(1), and relative navigate() targets. Update url.path/url.full after numeric navigation completes and match route parameterization against url.path for relative navigations. Co-Authored-By: Cursor <cursoragent@cursor.com>
73ea032 to
5cdb540
Compare
Move shared normalizePathname/getParameterizedRoute helpers to utils.ts and add finalizeNavigationSpanFromHydratedRouter so createClientInstrumentation does not need react-router types. Add tests for stale router state during sync numeric navigation. Co-Authored-By: Cursor <cursoragent@cursor.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.
Follow-up to the merged url.* attribute work (#22018): That PR set
url.template,url.path, andurl.fullon pageload/navigation spans, but exposed incorrect destination URLs fornavigate(-1)/navigate(1)and relativenavigate()targets. Similarly, independent of #22018, span names of relative navigations were also incorrect.This PR fixes destination URL updates and span anmes after numeric navigation (legacy + instrumentation API), route parameterization for relative navigations via
url.pathmatching, and adds E2E coverage for history back navigation.