fix: App back button loops between employee step and verify email step#93399
Conversation
|
@ahmedGaber93 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
🧪 Mobile QA — before/after on
|
| Employees — back button shown | Back → "Verify your work email" (loop) |
|---|---|
![]() |
![]() |
Loop (Employees → Verify your work email → back into work‑email steps → Employees …):

After — PR branch (✅ fixed)
Same injected state → Employees is now step 1, back button is gone (the HeaderWithBackButton no longer renders a Back pressable — confirmed in the component tree). No way to loop into the work‑email step.
Forward flow proves the fix: Employees (step 1/3, no back) → Continue → "Do you use any accounting software?" (step 2/3 — a back button now correctly appears) → tap back → returns to Employees (step 1/3, no back) — not "Verify your work email". The loop is gone.

Android App
Before — main (🐞 bug)
Accessibility tree explicitly reports "Onboarding progress, Step 3 of 5" and a Button "Back" is present; pressing it goes to "Verify your work email" → loop.
| Employees — "Step 3 of 5", back button shown | Back → "Verify your work email" (loop) |
|---|---|
![]() |
![]() |
Loop (Employees ↔ Verify your work email):

After — PR branch (✅ fixed)
Accessibility tree now reports "Onboarding progress, Step 1 of 3" and no Back button exists in the tree. Loop broken.
Forward flow proves the fix: Employees (step 1/3, no back) → Continue → "Do you use any accounting software?" (step 2/3 — a back button now correctly appears) → tap back → returns to Employees (step 1/3, no back) — not "Verify your work email". The loop is gone.

Result
| Platform | main (before) |
PR (after) | |
|---|---|---|---|
| iOS App | back button shown · loops Employees ↔ Verify work email | no back button · step 1 of 3 | ✅ PASS |
| Android App | "Step 3 of 5" · back button shown · loops | "Step 1 of 3" · no back button | ✅ PASS |
The PR resolves the reported behavior on both platforms: on a validated public‑domain VSB account, the Employees step becomes step 1 of 3 and the back button that caused the Employees ↔ "Verify your work email" loop is correctly hidden.
Caveat: as noted above, the OldDot‑sourced signupQualifier="vsb" (+ validated on Android) was applied via an Onyx override identical on both branches, since the OldDot web signup can't be driven in a mobile‑only harness. The logic under test is purely client‑side, so this faithfully reproduces the issue. The inline GIFs are trimmed to the key action for quick viewing; each
🤖 Automated mobile QA run (Argent) — reproduced on main, verified on the PR branch, iOS + Android.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppa.movAndroid: mWeb Chromeaw.moviOS: HybridAppi.movMacOS: Chrome / SafariScreen.Recording.2026-06-13.at.10.34.12.PM.mov |
|
@nkdengineer Are those bugs is a regression from this PR? Screen.Recording.2026-06-13.at.10.23.46.PM.movbug-ios.mov |
|
@ahmedGaber93 The employee step now is the first step, and can't go back to the work email step as this is skipped. |
|
@nkdengineer, while those bugs don’t appear to be regressions from this PR, I believe we should address the Android bug since we handle the back behavior here. Should we block the Android We have similar cases here: App/src/pages/OnboardingPurpose/index.native.tsx Lines 9 to 18 in a3a0005 App/src/pages/OnboardingWorkEmail/index.native.tsx Lines 10 to 22 in a3a0005 App/src/pages/OnboardingPersonalDetails/index.native.tsx Lines 10 to 25 in a3a0005 |
|
@ahmedGaber93 Makes sense. I updated. |
neil-marcellini
left a comment
There was a problem hiding this comment.
Thanks, looks good
|
The C+ already posted a checklist and approved, so pasting one here just to pass it. Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
🚧 @neil-marcellini has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.4.17-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site review: no changes required. This PR fixes an internal navigation bug — the back button looping between the employees step and the verify-email step during onboarding — and corrects the onboarding step counter for accounts with a validated work email. The changes are limited to navigation/step-counter logic and a native Android back-button handler:
None of this changes a documented, user-facing feature, label, setting, or how-to. I searched @nkdengineer, since no help-site changes are required here, there is no linked help site PR to review. If you believe an onboarding article should be added or updated, let me know and I'll create a draft PR. |
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.4.17-3 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.4.17-3 🚀
|
The EMPLOYEES screen back button redirected to a blank Workspaces modal because getDomainPrefix hardcoded both PRIVATE_DOMAIN and WORKSPACES for every private-domain user, even though only one is ever traversed. Gate the private-domain prefix on account validation (mirroring #93399's public-domain fix): unvalidated users keep PRIVATE_DOMAIN, validated users get WORKSPACES, and validated users without joinable workspaces (which auto-skip that screen) get neither. Back now resolves to the screen the user actually came from and the step counter is accurate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>







Explanation of Change
fix: App back button loops between employee step and verify email step
Fixed Issues
$ #92688
PROPOSAL: #92688 (comment)
Tests
Precondition:
Offline tests
QA Steps
Same as test
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-06-12.at.15.46.46.mov
Android: mWeb Chrome
Screen.Recording.2026-06-12.at.15.44.42.mov
iOS: Native
Screen.Recording.2026-06-12.at.15.50.14.mov
iOS: mWeb Safari
Screen.Recording.2026-06-12.at.15.41.37.mov
MacOS: Chrome / Safari
Screen.Recording.2026-06-12.at.15.40.27.mov