Skip to content

Conversation

@ArinFaraj
Copy link

@ArinFaraj ArinFaraj commented Nov 20, 2025

Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.

List which issues are fixed by this PR. You must list at least one issue.
Fixes flutter/flutter#178853

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

…o 17.0.1

This commit fixes an issue where `onEnter` blocking caused navigation stack loss due to stale state restoration. It ensures that `currentConfiguration` is used instead of the internal cache when navigation is blocked.

- Bumps version to 17.0.1
- Updates CHANGELOG.md
- Adds regression test in on_enter_test.dart

Fixes flutter/flutter#178853
@ArinFaraj ArinFaraj requested a review from chunhtai as a code owner November 20, 2025 09:06
@github-actions github-actions bot added p: go_router triage-framework Should be looked at in framework triage labels Nov 20, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively addresses an issue where onEnter blocking could cause stale state restoration in the navigation stack. The fix, which prioritizes the routerDelegate.currentConfiguration when a navigation is blocked, is logical and correctly implemented. The inclusion of a targeted test case that reproduces the bug is excellent and ensures the fix is robust. The version and changelog updates are also correctly handled. I have a couple of minor suggestions to improve code clarity and conciseness.

ArinFaraj and others added 2 commits November 20, 2025 12:13
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p: go_router triage-framework Should be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

onEnter blocking causes navigation stack loss (stale state restoration)

1 participant