Skip to content

Onboarding - Onboarding exits after refreshing work email and tapping back button #103530

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.5.6-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #99833
Email or phone of affected tester (no customers): smoidjnojdjsionjsod@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log in with new Gmail account.
  3. Click Skip on work email step.
  4. Select Join my company workspace.
  5. Refresh work email step.
  6. Click back button.

Expected Result:

Onboarding modal will return to intent selection step.

Actual Result:

Onboarding modal closes.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7281558_1791489858599.1.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Nathan Lemma
Bug ID: 7281558

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 8, 2026
  2. applause-bot commented on Oct 8, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/eae4d0963855ea71a44e3a65ad52fce81f537f62ef7cc8d534c933c5855845a3

  3. melvin-bot commented on Oct 8, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #99833

  4. melvin-bot commented on Oct 8, 2026

    @melvin-bot

    @iwiznia @hungvu193 you have been assigned to this deploy blocker because you reviewed the offending PR: #99833

  5. github-actions commented on Oct 8, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. melvin-bot commented on Oct 8, 2026

    @melvin-bot

    @carlosmiceli you have been assigned to this deploy blocker because you authored the offending PR: #99833

  7. melvin-bot commented on Oct 8, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  8. MelvinBot commented on Oct 8, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: Add the join-workspace onboarding intent and Concierge follow up tasks by carlosmiceli (high confidence)
    Related: Deploy Checklist: New Expensify 2026-10-08

    Recommendation: roll forward

    The new back button on the work-email step calls Navigation.goBack() with no back route. A refresh removes the intent screen from the onboarding stack, so back then closes the whole onboarding modal.

    Fix: in BaseOnboardingWorkEmail.tsx:365, change the handler to:

    onBackButtonPress={() => Navigation.goBack(ROUTES.ONBOARDING_PURPOSE.getRoute())}

    A revert is a poor trade. The PR is large (about 80 files) and depends on backend changes, and this bug only appears after a refresh in a new flow.

    📋 Detailed analysis
    1. Before the PR, the work-email screen had no back button. The PR shows one for the join-workspace intent, wired to a bare Navigation.goBack(): BaseOnboardingWorkEmail.tsx:362-368.
    2. For a public-domain email, the intent screen opens ROUTES.ONBOARDING_WORK_EMAIL.getRoute() with no back route. The private-domain branch on the same line does pass ONBOARDING_PURPOSE: BaseOnboardingPurpose.tsx:141.
    3. Without a refresh, the stack is [PURPOSE, WORK_EMAIL], so back returns to the intent list.
    4. After a refresh, the state is rebuilt from the URL. getOnboardingAdaptedState returns early when the first route is WORK_EMAIL, because it assumes work-email is always the first onboarding screen: getAdaptedStateFromPath.ts:299-303. The result is [Home, OnboardingModalNavigator[WORK_EMAIL]].
    5. The root can still go back, so goBack() skips its fallback and pops the one-screen onboarding modal: Navigation.ts:646.

    With the fix, if the intent screen is still in the stack, back pops to it as today. If it isn't, goUp replaces the work-email screen with the intent screen inside the modal: Navigation.ts:603-610.

    Other steps on this path already pass a back route, for example BaseOnboardingEmployees.tsx:83. NAVIGATION.md:114-116 recommends this so screen order survives a refresh.

    The PR merged 2026-10-07 and is in today's checklist. No other recent commits touch this file. This conclusion comes from code reading; I did not reproduce it live.

    💡 Suggested AI code review rule

    This looks like a recurring, detectable pattern. Proposed for Expensify/App coding standards:

    • Rule: CONSISTENCY-20 Pass a back route to Navigation.goBack in multi-step flow screens
    • Condition: Flag a new back handler that calls Navigation.goBack() with no arguments on a screen that isn't first in its navigator (onboarding steps, multi-step right-hand panel flows).
    • Why: A refresh or deep link rebuilds navigation state without earlier screens, so a bare goBack() closes the whole modal or flow.
    • Search pattern: newly added Navigation\.goBack\(\), especially under src/pages/Onboarding*/
    • ❌ BaseOnboardingWorkEmail.tsx:365 · ✅ BaseOnboardingEmployees.tsx:83
  9. 3 remaining items

  10. carlosmiceli commented on Oct 8, 2026

    @carlosmiceli
    Contributor

    @MelvinBot implement the fix

  11. MelvinBot commented on Oct 8, 2026

    @MelvinBot
    Contributor

    🤖 Draft PR created: Return to the intent list from work email Back after a refresh

    The work email Back button now calls Navigation.goBack(ROUTES.ONBOARDING_PURPOSE.getRoute()), so after a refresh it returns to the intent list instead of closing the onboarding modal. I added a regression test that fails without the fix. Typecheck, lint, spell check, and the 55 work-email onboarding tests pass.

    Please mark it as "Ready for review" or ask me to do that for you when it is ready for review.

  12. added
    ReviewingHas a PR in review
    and removed on Oct 8, 2026
  13. melvin-bot commented on Oct 9, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  14. melvin-bot commented on Oct 13, 2026

    @melvin-bot

    @iwiznia / @carlosmiceli @hungvu193

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.7-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

  15. added
    Skip PaymentSkips all the payment process steps for an issue. Use it for fixed-price projects.
    and removed on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringSkip PaymentSkips all the payment process steps for an issue. Use it for fixed-price projects.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions