Repository navigation
Conversation
…mponents and resources
Previously, `NavigationTransitions.setupNavigations()` updated
`currentNavigation().targetRouterState` inside the `createRouterState`
step before `loadComponents()` and `setupAndRunResources()` ran. Because
`currentNavigation` uses `{equal: () => false}`, that triggered a signal
notification and exposed `targetRouterState` before component loading and
blocking route resources had settled. Prior to route resources (in
`1f287b9ba7`), `targetRouterState` was only assigned after `loadComponents()`
finished right before `afterPreactivation()`, and `StateManager` only reads
it at `BeforeActivateRoutes` / `NavigationCancel(Redirect)`.
Move the `this.currentNavigation.update(...)` assignment into a `tap` after
the `loadComponents` / `setupAndRunResources` stage (right before
`afterPreactivation()`) for both 3p and g3, and update the `rxResource`
integration test to inspect the resource's loading state directly while
asserting `currentNavigation().targetRouterState` remains unset until
resources complete.
atscott
force-pushed
the
router-target-router-state-after-resources
branch
from
December 4, 2026 17:47
cc4f881 to
146b801
Compare
atscott
marked this pull request as ready for review
December 4, 2026 18:05
JeanMeche
approved these changes
Dec 4, 2026
Member
|
Nit: Why target minor if this is a fix ? |
Contributor
Author
I think so this has to do with code that's moved around a lot recently and has g3 patches |
Contributor
Author
|
If we wanted it in patch, I would likely have to do a separate PR and resolve conflicts |
Contributor
Author
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.
Moves the
currentNavigation().targetRouterStateupdate inNavigationTransitions.setupNavigations()from thecreateRouterStatestep to right afterloadComponentsandsetupAndRunResourcescomplete (right beforeafterPreactivation()), for both 3p and g3.Prior to route resources (in
1f287b9ba7),targetRouterStatewas set afterloadComponentsfinished right beforeafterPreactivation(), andStateManageronly reads it atBeforeActivateRoutes/NavigationCancel(Redirect). BecausecurrentNavigationis created with{equal: () => false}, updating it earlier emitted a signal notification and exposedtargetRouterStatebefore components and blocking route resources finished loading.Also updates the
rxResourceintegration test inrouter_resource_spec.tsto inspect the resource loading state directly instead of reading@internalcurrentNavigation().targetRouterStatewhile the resource is still loading, and assertstargetRouterStatestays unset until resources complete.