Skip to content

fix(settings): show canceled screen when desktop cancels pairing - #21144

Open
dschom wants to merge 1 commit into
mainfrom
fxa-14453
Open

fix(settings): show canceled screen when desktop cancels pairing#21144
dschom wants to merge 1 commit into
mainfrom
fxa-14453

Conversation

@dschom

@dschom dschom commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Because

  • Cancelling on the desktop pairing screen left the mobile device on "Looks
    like we timed out", blaming a wait the user never made.
  • The designs call for the "Canceled" screen on mobile when the desktop user
    stops the flow.

This pull request

  • Sends pair:auth:cancel from the authority before it tears down the pairing
    channel.
  • Fails the supplicant when that notice arrives, and records that the authority
    was the one that cancelled.
  • Passes reason on both supplicant exits to timeout_and_cancel, so the
    dead-end screen renders the Canceled variant.
  • Adds coverage for the notice, for a send that fails, and for a bare channel
    close still reading as a timeout.

Issue that this pull request solves

Closes: FXA-14453

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: cancel() in pairing-authority-integration.ts
    and handleAuthCancel in pairing-supplicant-integration.ts.
  • Suggested review order: the two integrations, then the three Pair2 containers.
  • Risky or complex parts: the notice has to reach the supplicant before the
    channel closes; cancel() swallows a failed send so a dead channel still
    tears down.

Screenshots (Optional)

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

Other information (Optional)

Because:

* Cancelling on desktop only closed the pairing channel, and a closed
  channel looks the same as an expired one from the mobile end.
* Mobile fell back to "Looks like we timed out", blaming a wait the user
  never made; the designs call for "Canceled".

This commit:

* Sends pair:auth:cancel from the authority before it tears the channel
  down.
* Fails the supplicant on that notice and records that the authority
  cancelled.
* Routes the supplicant's dead-end screen with reason 'canceled' instead
  of falling through to 'timeout'.

Closes: FXA-14453
@dschom
dschom marked this pull request as ready for review September 4, 2026 20:17
@dschom
dschom requested a review from a team as a code owner September 4, 2026 20:18
@dschom

dschom commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

I've manually validated this now works locally.

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.

1 participant