Storybooks for commit 44d68bb99ca40e1d4181df01294d3bf04344b8f7

Date
9/23/2026, 10:43:22 PM UTC
Summary
fix(settings): send signed-out v2 desktop to sign-in before pairing QR
Description
## Because

- On desktop Firefox with pairing v2, `/pair` sent the user to `/pair/authority/scan_qr` before it checked for a signed-in account.
- The authority channel needs no account, so a signed-out user got a working QR code. After the scan, `ApproveSignIn` crashed with "Account data not loaded from localStorage".

## This pull request

- Removes the early scan_qr redirect in `Pair/Index/index.tsx` that ran before the `fxa_status` guard. The second redirect now has a signed-in check.
- Sends a v2 desktop straight to scan_qr only when `fxa_status` already has a verified `signedInUser`. This fast path skips a second round trip to Firefox (open question 1 on the ticket).
- In all other cases, runs the existing bootstrap (`requestSignedInUser`, then `fxaOAuthFlowBegin` and sign-in). When the bootstrap gets a verified user and v2 is on, it goes to scan_qr.
- Adds `pairingV2Ref` to hold the latest v2 gate. A late `fxa_status` answer can change the gate while the bootstrap runs.
- Changes behavior: a v2 desktop with a `sessionToken` on an unverified account now goes to sign-in, the same as v1.

## Issue that this pull request solves

Closes: https://mozilla-hub.atlassian.net/browse/FXA-14591