Repository navigation
fix(router): clear stale back-navigation marks on forward page navigation - #181
Merged
NathanWalker merged 1 commit intoOct 23, 2026
Conversation
…tion _beginBackPageNavigation marks every descendant outlet as navigating back, but only outlets activated during that back clear their mark. Outlets of a page lower in the back stack (e.g. per-tab outlets of a tab page) keep it, so a later forward navigation into that page was treated as a back navigation for those outlets and they rendered blank. _beginPageNavigation now clears the marks on all descendants of the navigating outlet.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
NathanWalker
approved these changes
Oct 23, 2026
commit: |
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.
Summary
_beginBackPageNavigationmarks every descendant outlet as navigating back, but only an outlet that is activated during that back clears its own mark.The outlets of a page lower in the back stack (for example the per-tab outlets of a tab page) are never activated, so they keep the mark.
A later forward navigation into that page then runs as a back navigation for those outlets, and they render blank.
The descendant walk is extracted into
getDescendantOutletsunchanged, so both call sites share it.Closes #180
Evidence
Reproduction: https://github.com/timdoege/ns-angular22-tab-outlets-blank-after-back (
home->/tabs->/detail->/detail2-> back ->/tabsagain)./tabs)/tabs).maestro/repro.yamlfails on 22.0.1 at the last "TAB A CONTENT" check, on iOS and Android.After:
.maestro/repro.yamlpasses on iOS and Android with this change..maestro/control.yaml(same steps without the back) passes on 22.0.1, so the back is the trigger.With the fix, going back from the second tabs page to the first one still shows both tabs.
Merge Danger
Door: two-way
Pure runtime fix in the legacy router, no API or persisted state change; reverting the commit restores the old behavior.
Blast Radius: router
Only affects outlets below the outlet starting a forward page navigation.
Any back mark on those outlets is cleared, so an app that starts a forward page navigation while a nested back is still in flight would see that nested back treated as forward.