Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ShaneK
force-pushed
the
fix/rr6-root-splat-sibling
branch
from
September 25, 2026 14:01
801e7cd to
f6f07d8
Compare
ShaneK
force-pushed
the
fix/rr6-root-splat-sibling
branch
from
September 25, 2026 15:09
f6f07d8 to
a877abd
Compare
ShaneK
removed this pull request from stack #31487
September 25, 2026 15:54
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.
Issue number: resolves #31479
What is the current behavior?
Currently, swipe-to-go-back does nothing over a splat container page in the root outlet.
canStartdecides whether the entering and leaving views are the same by comparing the entering view's resolved pathname against the current pathname, and a splat consumes whatever is left of the pathname, so its match always resolves to the whole current pathname. At the root that is every pathname, so the gesture is rejected before it starts.What is the new behavior?
We now compare the view items directly, the same way
onEnda few lines below already does, so a container page sitting underneath a pushed sibling is no longer mistaken for the page being left.canStartalso requires a leaving view now, because without oneonStartreveals the entering page but never builds a progress animation, and core only callsonEndwhen an animation exists, so the reveal was never undone andgoBacknever fired.The
pattern.path !== routeInfo.pathnamecondition came out with it.pattern.pathis the declared route path, so it is either a wildcard or param pattern that can never equal a pathname, or a static path where the view comparison already rejects the gesture.Does this introduce a breaking change?
Other information
Stacked on #31481, which fixes the same issue for a splat one level down. This is the root outlet case, which that PR left open.
The reproduction needs its own React root. A root catch-all can't live in the shared route tree in
App.tsxwithout swallowing every other spec's pathname, so the testindex.tsxpicks betweenAppandRootSplatSiblingAppby pathname.All five new tests fail on
mainand on #31481's branch alone, proving they cover the gap here.Root splat sibling test page