Repository navigation
fix(mobile): let users sign out after leaving all communities - #8993
Conversation
Signed-off-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Signed-off-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
🔐 Codex Security Review
|
Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz> Signed-off-by: John Tennant <[email protected]>
| if (signedInLanding && | ||
| !busy && | ||
| !existingUser.value && | ||
| !enteringCommunityLink.value && | ||
| !creating.value) { | ||
| unawaited(confirmSignOut()); |
There was a problem hiding this comment.
🤖 P2 · Keep scanner Back within the nested scanner
On signed-in onboarding, open “Scan a QR code” on Android, then press system Back. FallbackPairingQrScanner wraps the existing surface instead of pushing another route, so its PopScope and this entry’s PopScope receive the same rejected pop. The scanner starts its closing animation, but these landing predicates still match and also open “Sign out of BuilderLab?”. The frame-level handlingBack guard does not coordinate with the scanner’s independent handler.
User/system effect: Back from the nested scanner unexpectedly offers to end the account session and requires cancelling that prompt to return to Add a community, contrary to the preserved nested-Back behavior.
Test: Extend the signed-in onboarding journey to open the fallback scanner and send system Back; verify only the scanner closes and the account session stays active without a sign-out prompt.



Summary
Fixes a dead-end in signed-in mobile onboarding: after leaving every community, Back kept returning to the same Add a community screen without a way to end the account session.
Show “Signed in as [email]” on that screen. Back asks “Sign out of BuilderLab?” with the email; Cancel keeps the session, and Sign out returns to the welcome screen while retaining saved Buzz identities. Nested Back and Add community from an existing session keep their navigation behavior.
Related issue
None found in the existing issue and PR search for onboarding sign-out.
Testing
The new widget journey failed before the change and passes through the real onboarding widgets, account client, storage and flow with external HTTP/browser boundaries mocked. It covers nested Back, Cancel, system Back, durable session removal, retained identity/backup, and starting email sign-in again. The existing hosted onboarding journey also covers accounts without an email.
On iPhone 18 Pro simulator (iOS 27), rendered the production onboarding screen and native confirmation using a disposable account fixture. Live browser account selection has not been verified; this clears the app session, not website cookies.
To reproduce on an auth-enabled mobile build: sign in, leave all communities, check the displayed email, tap Back, and choose Cancel. Tap Back again and choose Sign out. The yellow welcome screen should appear, with email sign-in available.
Screenshots
Before, from the original reported phone screen:
After:
Signed-in landing and native sign-out confirmation, using a disposable account: