Repository navigation
fix(history): replace the URL on an unmatched redirect - #115
Merged
Merged
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
vincentkoc
marked this pull request as ready for review
November 20, 2026 15:55
vincentkoc
added a commit
that referenced
this pull request
Nov 20, 2026
…replay * origin/main: fix(history): replace the URL on an unmatched redirect (#115) refactor(tests): consolidate pending invalidation scenarios (#118) fix(loading): accept redirect records without a route location as data (#116) fix(loading): ignore a component import from before stop (#113) # Conflicts: # CHANGELOG.md
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.
What Problem This Solves
When a loader redirects to an unmatched path, the router shows its not-found state while the browser address stays on the source route.
User Impact
The browser address shows the full redirect destination, including search and hash. Back returns to the location before the source route.
Why This Change Was Made
Apply the requested history write on both the matched and unmatched paths. Direct unmatched location handling retains its existing history mode.
Evidence
An isolated Chromium run exercised pushState, replaceState and Back. The base stayed on /source while the router reported /missing?from=source#detail. The fixed browser URL matched the router, and Back returned to /start. The regression checks both a declared destination and an unmatched one.