Skip to content

fix(pair): send an iOS QR scan straight to /pair/unsupported - #21150

Open
dschom wants to merge 2 commits into
mainfrom
FXA-14467
Open

fix(pair): send an iOS QR scan straight to /pair/unsupported#21150
dschom wants to merge 2 commits into
mainfrom
FXA-14467

Conversation

@dschom

@dschom dschom commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Because

  • Firefox iOS cannot finish a pairing started from a native-camera scan, so the "Continue in Firefox" card is only a tap in front of the "pair not supported" roadblock.
  • "Continue in Firefox" reads as progress, which makes landing on the roadblock more confusing than going there directly.
  • Android is different: updating Firefox there lets the user re-scan the QR with the native camera, so it keeps the card.

This pull request

  • Adds a pairing.ios_handoff setting (PAIRING_IOS_HANDOFF), default false, surfaced as config.pairing.iosHandoff.
  • planPairingHandoff plans no hand-off for a non-Firefox iOS browser while the setting is off, so /pair falls through to /pair/unsupported with the scanned hash intact.
  • Leaves the Android hand-off path untouched.
  • Covers the iOS redirect in the Pair/Index and planPairingHandoff unit tests, and adds an iPhone-UA case to pairingUnsupported.spec.ts.
  • Clears mocks between tests in the Pair/Index hand-off describe, which sits outside the block that already did.
  • Names the new flag in pairingFlowV2iOS.spec.ts and tests/pairing/CLAUDE.md.

Issue that this pull request solves

Closes: FXA-14467

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: packages/fxa-settings/src/lib/pairing/handoff.ts for the gate; packages/fxa-settings/src/pages/Pair/Index/index.tsx for the fall-through to /pair/unsupported.
  • Suggested review order: handoff planner → /pair page → config plumbing → tests.
  • Risky or complex parts: the /pair mount effect has several ordering-sensitive branches; the iOS case now reaches the existing !isFirefoxDesktop branch rather than returning early.

Screenshots (Optional)

N/A — no component markup changed; iOS now lands on the existing /pair/unsupported screen instead of the existing hand-off card.

Other information (Optional)

  • Rollout: the iOS hand-off is preserved, not deleted. Set PAIRING_IOS_HANDOFF=true to re-enable it once Firefox iOS can finish a pairing started from a native-camera scan.
  • pairingFlowV2iOS.spec.ts's hand-off delivery reads the CTA off the rendered page, so that spec now needs PAIRING_IOS_HANDOFF=true on the stack. Documented in the spec header and tests/pairing/CLAUDE.md.
  • The new pairingUnsupported.spec.ts case cannot pass against a stack serving pre-fix code, so it was verified by the unit tests locally rather than against a running local stack.

Because:
  - Firefox iOS cannot finish a pairing started from a native-camera scan,
    so the hand-off card is only a tap in front of a roadblock
  - "Continue in Firefox" reads as progress, which makes the dead end worse

This commit:
  - adds a `pairing.ios_handoff` setting, off by default
  - plans no iOS hand-off while it is off, so /pair falls through to
    /pair/unsupported
  - keeps the Android hand-off, where updating Firefox makes a re-scan work
  - covers the iOS redirect in the Pair unit tests and the unsupported spec
  - names the new flag in the iOS v2 pairing spec and its guide

Closes: FXA-14467
@dschom
dschom marked this pull request as ready for review September 4, 2026 20:04
@dschom
dschom requested a review from a team as a code owner September 4, 2026 20:04
Because:
  - the React pair/unsupported page dropped the `pair-unsupported-header`
    id on the system-camera branch, which the Backbone template carries
  - the new iOS pairing functional test keys off that id, and failed on it

This commit:
  - renders that heading directly with the id, in place of CardHeader
  - asserts the id in the Unsupported page tests
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