Skip to content

fix(settings): show canceled screen when mobile cancels pairing - #21132

Open
dschom wants to merge 1 commit into
mainfrom
FXA-14452
Open

fix(settings): show canceled screen when mobile cancels pairing#21132
dschom wants to merge 1 commit into
mainfrom
FXA-14452

Conversation

@dschom

@dschom dschom commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Because

  • Cancelling on the mobile pairing screen landed on "Looks like we timed out", blaming a wait the user never made. The designs call for the "Canceled" screen.

This pull request

  • Passes reason: 'canceled' when the supplicant cancels from connect_this_device or approve_signin, so the shared dead-end screen renders the Canceled variant.
  • Routes those two exits through navigateWithQuery, keeping the pairing query string on the navigation.
  • Adds a cancel-with-unclosable-channel case to the connect_this_device container tests.

Issue that this pull request solves

Closes: FXA-14452

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).
  • I have manually reviewed all AI generated code.

How to review (Optional)

  • Key files/areas to focus on:
  • Suggested review order:
  • Risky or complex parts:

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Supplicant/ApproveSignIn had 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.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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
dschom marked this pull request as ready for review September 3, 2026 00:13
@dschom
dschom requested a review from a team as a code owner September 3, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants