Conversation
Because: * Cancelling on mobile left for the shared dead-end screen with no reason, so it fell back to "Looks like we timed out". * The designs call for "Canceled" there — the timeout copy blames a wait the user never made. This commit: * Passes reason 'canceled' when the supplicant cancels from connect_this_device or approve_signin. * Routes those exits through navigateWithQuery so the pairing query survives the navigation. * Covers both cancel paths, including a channel that will not close. Closes: FXA-14452
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The cancellation state is propagated correctly and both cleanup outcomes are covered.
Pull request overview
Corrects mobile pairing cancellation so users see the “Canceled” screen while preserving pairing query parameters.
Changes:
- Passes the canceled reason from both supplicant screens.
- Navigates after channel cleanup, including cleanup failures.
- Updates cancellation tests for both paths.
File summaries
| File | Description |
|---|---|
ConnectThisDevice/container.tsx |
Preserves query and cancellation state. |
ConnectThisDevice/container.test.tsx |
Tests successful and failed cleanup. |
ApproveSignIn/container.tsx |
Supplies cancellation state during navigation. |
ApproveSignIn/container.test.tsx |
Updates navigation expectations. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
dschom
marked this pull request as ready for review
September 3, 2026 00:13
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
reason: 'canceled'when the supplicant cancels fromconnect_this_deviceorapprove_signin, so the shared dead-end screen renders the Canceled variant.navigateWithQuery, keeping the pairing query string on the navigation.connect_this_devicecontainer tests.Issue that this pull request solves
Closes: FXA-14452
Checklist
Put an
xin the boxes that applyHow to review (Optional)
Screenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
Supplicant/ApproveSignInhad the same defect on its Cancel button. The ticket only reports the first screen, but leaving the second one blaming a timeout would be the same bug.