Conversation
Because: - Tapping Connect on the v2 supplicant routed to approve_signin twice: once from the WaitingForAuthority state change and again from the approval promise, which pushed a duplicate entry without the query. - Failures on channel open and approval routed a second time from the catch after the integration's own Failed state had already routed. This commit: - Drops the then-branch navigation and lets the state handler route. - Routes both catch paths through navigateWithQuery with replace, and only when the integration did not already fail itself. - Removes the now-unused useNavigate from the container. - Asserts exactly one navigation for the success and failure paths. Fixes FXA-14566
Because:
- navigateWithQuery's third positional argument is includeHash, not
replace, so the approve_signin and timeout navigations were pushes
even though the flow treats them as replacements.
This commit:
- Passes { replace: true } for the approve_signin navigation and for
the error handler added in the previous commit.
- Updates the container tests to the new call shape.
dschom
marked this pull request as ready for review
September 19, 2026 00:02
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.
Because
This pull request
thennavigation in the Connect handler; theWaitingForAuthoritystate change is the single navigation to approve_signin.navigateWithQuerywith replace, and only when the integration has not already moved toFailed.{ replace: true }for the approve_signin navigation and the shared error handler, so neither adds a history entry.useNavigatefrom the container.Issue that this pull request solves
Closes: FXA-14566
Checklist
Put an
xin the boxes that applyHow to review (Optional)
This one is something Claude called out while working on #21256. The gap appears to be valid though. The verification has been 'pushed' left, and tests have been updated ensure a double navigation has not occurred.
Screenshots (Optional)
Other information (Optional)
The ticket's acceptance criteria only cover the Connect handler. The channel-open catch and the
Failed-state guard go a step further since they share the same double-navigation cause.The catch still routes for rejections that bypass the integration's
fail(), such as a channel torn down by a concurrent Cancel, since no state change fires in that case.navigateWithQuery's third positional argument isincludeHash, notreplace. The other Pair2 pages pass{}, truewhere they mean replace, so their navigations are pushes too. Only this container's calls are changed here; the rest belongs in a follow-up.