Skip to content

feat(settings): gate pairing v2 on the Firefox version per platform - #21269

Draft
dschom wants to merge 1 commit into
mainfrom
FXA-14582
Draft

dschom wants to merge 1 commit into
mainfrom
FXA-14582

Conversation

@dschom

@dschom dschom commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Because

  • Pairing v2 switched on from the pairingVersion Firefox reports in fxa_status, which follows a Firefox pref default, so the rollout waited on Firefox rather than on us.
  • We want to enable pairing v2 per platform, from a Firefox version of our choosing.
  • pairing.ios_handoff answered the same question, whether Firefox iOS is ready for v2, a second way.

This pull request

  • Adds pairing.v2_min_version.{ios,android,desktop} (PAIRING_V2_MIN_VERSION_IOS, _ANDROID, _DESKTOP) to the content-server config and serves it to fxa-settings.
  • Decides pairing v2 from the Firefox major version in the user agent when the browser's platform has a minimum configured; a platform without one still defers to fxa_status.
  • Routes /pair and /connect_another_device through one shared gate, isPairingV2Enabled.
  • Replaces pairing.ios_handoff with "an iOS minimum is configured", so setting the iOS minimum also enables handing a QR scanned outside Firefox to the Firefox iOS app.
  • Adds unit tests for the gate and wiring tests for both pages.
  • Updates the dev-launcher and functional-test pairing notes.

Issue that this pull request solves

Closes: FXA-14582

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/v2-gate.ts holds the whole decision; the pages only call it.
  • Suggested review order: configuration.js, then v2-gate.ts with its test, then Pair/Index/index.tsx, ConnectAnotherDevice/index.tsx, and the two hand-off call sites.
  • Risky or complex parts: the user-agent version parsing (FxiOS/ on iOS, Firefox/ elsewhere), and the iOS hand-off now following the iOS minimum.

Screenshots (Optional)

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

Other information (Optional)

  • Rollout: with PAIRING_VERSION=2, set PAIRING_V2_MIN_VERSION_<PLATFORM> to the first Firefox major that should get v2 (0 for every version). A platform left unset keeps today's behaviour. PAIRING_IOS_HANDOFF no longer exists and should be dropped from deployment config; PAIRING_V2_MIN_VERSION_IOS takes its place.
  • Naming: the ticket spells the keys pairing.v2.minVersion.iOS. The config uses pairing.v2_min_version.ios to match the neighbouring convict keys, and the client sees it as pairing.v2MinVersion.ios.

🤖 Generated with Claude Code

Because:
 - Pairing v2 switched on from the pairingVersion Firefox reports in
   fxa_status, which follows a Firefox pref default, so the rollout
   waited on Firefox flipping the pref rather than on us.
 - pairing.ios_handoff answered the same question, whether Firefox iOS
   is ready for v2, a second way.

This commit:
 - Adds pairing.v2_min_version.{ios,android,desktop}; a set platform is
   decided from the Firefox major version in the user agent, an unset one
   still defers to fxa_status.
 - Routes /pair and /connect_another_device through a shared
   isPairingV2Enabled gate.
 - Replaces pairing.ios_handoff with whether an iOS minimum is configured.
 - Covers the gate with unit tests and both pages with wiring tests.
 - Updates the dev-launcher and functional-test pairing notes.

Closes #FXA-14582
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