Skip to content

fix(mobile): show progress after pairing QR scans - #9009

Merged
brow merged 8 commits into
mainfrom
drouleau/mobile-pairing-connect
Nov 4, 2026
Merged

brow merged 8 commits into
mainfrom
drouleau/mobile-pairing-connect

Conversation

@dr0uleau

@dr0uleau dr0uleau commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

After a pairing QR scan, the app shows connection progress until code entry or a connection error. A WebSocket handshake that remains pending stops after ten seconds. Cancel is available until storage starts. It resets pairing and restores the entry form. Pasted codes remain available after an error or cancellation. Back navigation stays blocked during identity transfer and storage. Cancel on Send identity to desktop returns to Settings, so another attempt starts through the authorization step.

Related issue

Related to #9001, which covers organization sign-in after identity transfer. This change covers the earlier connection stage.

Testing

A simulator build with PR #9001 completes identity transfer and saves the community. The community chooser still blocks organization sign-in. PR #9028 covers that step. Physical iPhone testing and successful real-relay checks in light and dark mode remain pending. On a build with this change, scan a desktop pairing QR code. Check that progress appears, Cancel returns to the entry form, and a fresh attempt reaches code entry. Paste a pairing code, cancel during connection, and check that the form keeps the code. Test a failed connection and retry. In Settings, open Send identity to desktop, start a recovery connection, and cancel. Check that Settings appears and another attempt asks for authorization. Camera recognition speed and the reported intermittent phone network failure remain unverified.

Generated with Codex

dr0uleau and others added 3 commits November 3, 2026 10:21
Show connection progress after a QR scan. Stop a stalled pairing handshake after ten seconds so the user can retry.

Co-authored-by: Sol <c35e7cc95f6fdbfb7e861dccc02bdca567b6d6b20f16b5115c3c6ae082bbeede@buzz.block.builderlab.xyz>
Signed-off-by: Daniel Rouleau <[email protected]>
Keep the entry form mounted while connection progress is visible. A failed attempt keeps the pasted code available for retry.

Co-authored-by: Sol <c35e7cc95f6fdbfb7e861dccc02bdca567b6d6b20f16b5115c3c6ae082bbeede@buzz.block.builderlab.xyz>
Signed-off-by: Daniel Rouleau <[email protected]>
…ng-connect

* origin/main:
  fix(mobile): let users sign out after leaving all communities (#8993)
  perf(search): rank only the newest prefix matches and plan with the real tsquery (#8976)
  fix(mobile): restore ordinary DM behavior for Bestie (#8987)

Signed-off-by: Daniel Rouleau <[email protected]>
@dr0uleau
dr0uleau requested review from a team, gilgtm and kazemek21 November 3, 2026 18:47
@dr0uleau
dr0uleau marked this pull request as ready for review November 3, 2026 19:27
Co-authored-by: Zol <c35e7cc95f6fdbfb7e861dccc02bdca567b6d6b20f16b5115c3c6ae082bbeede@buzz.block.builderlab.xyz>
Signed-off-by: Daniel Rouleau <[email protected]>
Co-authored-by: Zol <c35e7cc95f6fdbfb7e861dccc02bdca567b6d6b20f16b5115c3c6ae082bbeede@buzz.block.builderlab.xyz>
Signed-off-by: Daniel Rouleau <[email protected]>
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 069cb9a0fe7a67e21a57e4a8780c5208f3a0eb01...12e6d5b74fc2369a595e54bc3de2838da28e164f.
A new review must complete for this exact range. When manual authorization
is required, a user with write access must comment exactly
@buzz-security-review 12e6d5b74fc2369a595e54bc3de2838da28e164f to authorize a new review.
Any previous review applies only to its recorded range.

Co-authored-by: Zol <c35e7cc95f6fdbfb7e861dccc02bdca567b6d6b20f16b5115c3c6ae082bbeede@buzz.block.builderlab.xyz>
Signed-off-by: Daniel Rouleau <[email protected]>
@github-actions github-actions Bot removed the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 3, 2026
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 3, 2026
Co-authored-by: Zol <c35e7cc95f6fdbfb7e861dccc02bdca567b6d6b20f16b5115c3c6ae082bbeede@buzz.block.builderlab.xyz>
Signed-off-by: Daniel Rouleau <[email protected]>
@github-actions github-actions Bot removed the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 3, 2026
@dr0uleau

dr0uleau commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

🤖 the recovery Cancel finding is fixed in 3fb57c157. Cancel closes the recovery route and returns to Settings. A new export attempt uses the existing authorization path. The regression fails with the old page code and passes with the fix. All 4,258 Flutter tests pass on Blox.

@github-actions github-actions Bot added codex-security-review-current The posted Codex security review matches its recorded range. and removed codex-security-review-current The posted Codex security review matches its recorded range. labels Nov 3, 2026
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 3, 2026
Co-authored-by: Zol <c35e7cc95f6fdbfb7e861dccc02bdca567b6d6b20f16b5115c3c6ae082bbeede@buzz.block.builderlab.xyz>
Signed-off-by: Daniel Rouleau <[email protected]>
@github-actions github-actions Bot removed the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 4, 2026
@brow
brow merged commit 14037e3 into main Nov 4, 2026
52 checks passed
@brow
brow deleted the drouleau/mobile-pairing-connect branch November 4, 2026 03:13
brow pushed a commit that referenced this pull request Nov 4, 2026
## Summary

Show organization sign-in after pairing. The community chooser closes
before it waits for content when the organization session needs sign-in.
A long press on **Scan a QR code** reveals the pairing-code option.

### Related issue

Related to [#9001](#9001) and
[#9009](#9009). No duplicate PR found.

### Testing

On an iPhone 17 Pro simulator, paired with the Block relay using a build
that includes both related PRs. The app showed **Sign in** on Home.
Completing sign-in remains to be verified.

![Organization sign-in prompt after
pairing](https://github.com/user-attachments/assets/c8286fc6-9de1-42db-973d-985a48e3351b)

Generated with Codex

Signed-off-by: Daniel Rouleau <[email protected]>
Co-authored-by: Zerra <345e287bf58aae2b5a483f744e2e362b7f7eea918b4c4427f7a1b3494881d475@buzz.block.builderlab.xyz>
brow added a commit that referenced this pull request Nov 4, 2026
…the key (#9042)

## Summary

Follow-up to #9028 (merged).

#9028 closes the community switcher before content loads when
organization sign-in is needed, but it checks the session status once.
When the session is signed in and the relay then refuses the paired key
(`AccountFailure.denied`, which #9001 now saves on purpose), the Home
banner offers **Retry** and **Use a different account**, yet the
switcher keeps covering it until the 20s "taking longer" timeout.

- `organizationSignInPromptVisible()` in
`shared/hosted/organization_sign_in.dart` is now the single rule for
when the banner has an action. The banner uses it, and so does the
switcher.
- The switcher listens to the sign-in session and relay auth while it
waits for content, and closes as soon as the rule turns true. Listeners
are removed on every exit, including the timeout, and the content wait
stops listening once the prompt wins.
- Relay failures stay scoped to the new community's relay and pubkey, so
a stale failure from the previous community can't close the switcher.
- `checking` no longer closes the switcher early (the banner is hidden
then); a later transition to signed out still does.

### Related issue

Related to #9001, #9009 and #9028. No duplicate PR found.

### Testing

- New widget test: signed in, switch to an organization relay with
content pending, then the relay refuses the key, and the switcher
closes. It fails with #9028's one-shot check.
- `flutter analyze` is clean. The full mobile suite passes except 10
push and notification tests, which fail the same way on plain `main` on
this Mac (local environment; CI covers them).
- Pushed with `--no-verify` because of those 10 local failures.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Tom Brow <[email protected]>
Co-authored-by: Tom Brow <[email protected]>
Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@buzz.block.builderlab.xyz>
Co-authored-by: Claude Opus 5.5 <[email protected]>

This branch was previously deployed

1 inactive deployment
codex-review — 12e6d5b7 Deployed Nov 4, 2026 by dr0uleau via Run Codex Security Review #12414
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