Repository navigation
[v7] Skip view transitions on revalidation and initial hydration - #15485
Merged
brophdawg11 merged 3 commits intoSep 15, 2026
Merged
brophdawg11 merged 3 commits into
brophdawg11 merged 3 commits into
Conversation
`router.revalidate()` reuses `state.historyAction` and `initialize()` runs the hydration as a POP, so both reached the POP view-transition replay in `completeNavigation` and animated whenever the current path had previously been a transition source, even though the location did not change. Apply the `isUninterruptedRevalidation` exclusion the history branch already uses, and skip the branch until the router is initialized. Fixes remix-run#15483 Assisted-By: devx/a331d4aa-8096-49b6-b8e1-0c4ffbcb1ff3 (cherry picked from commit d0f2e9f)
Backport the fix and additional coverage from PR remix-run#15484 (7f124eb and 68a60db) to v7. Cover Back/Forward during and after hydration, same-URL history entries, and revalidation during a pending POP.
brophdawg11
reviewed
Sep 15, 2026
Merged
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.
Backport of #15484 to
v7. Fixes #15483 for the 7.x line.router.revalidate()and the initial hydration both reach thePOPview-transition replay incompleteNavigation:revalidate()reusesstate.historyAction(which isPOPafter back/forward or a reload) andinitialize()runs the hydration asstartNavigation(NavigationType.Pop, …). Becauselocation === state.locationin both cases, theappliedViewTransitions.has(location.pathname)fallback matches whenever the current path was ever a transition source in the tab, and a full view transition runs for a data refresh or a first render.The same function already excludes uninterrupted revalidations from history handling a few lines above; this applies the same exclusion to the view-transition branch, plus
state.initializedfor hydration.PUSH/REPLACEand real back/forward replays are unchanged.Tests
Same two cases as #15484, added to
view-transition-test.ts; both fail onv7and pass with the change. The full__tests__/routersuite passes (886 tests).Runnable reproduction against
7.18.3: https://github.com/jbalsas/react-router-pop-revalidation-view-transition (StackBlitz: https://stackblitz.com/github/jbalsas/react-router-pop-revalidation-view-transition).