Skip to content

[$250] Web - Onboarding modal - The modal disappears after a page reload #81249

Closed

Description

@jponikarchuk

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: v9.3.11-23
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/folder/13176677/test-cases/41237662
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Windows 11, Chrome | iPhone SE 3rd generation, iOS 26.6.2, Chrome | Samsung A15, Android 16, Chrome
App Component: Other

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Sign up with a Gmail address
  3. In 'What’s your work email?' page, click Skip
  4. Select Manage my team's expenses > 1-10 employees
  5. At 'Do you use any accounting software?' screen, refresh the page.

Expected Result:

After reloading the page during onboarding, the modal should remain visible on the current step.

Actual Result:

After reloading the page, the modal disappears.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022018581368130151493
  • Upwork Job ID: 2018581368130151493
  • Last Price Increase: 2026-02-03
Issue OwnerCurrent Issue Owner: @brunovjk

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 3, 2026
  2. melvin-bot commented on Feb 3, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. melvin-bot commented on Feb 3, 2026

    @melvin-bot

    Triggered auto assignment to @Gonals (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. melvin-bot commented on Feb 3, 2026

    @melvin-bot

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

  5. github-actions commented on Feb 3, 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. OSBotify commented on Feb 3, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #80965 - "[Home Page] Remove Beta Gate for Release 1" by @WojtekBoman (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR #80965 introduced a navigation regression that breaks onboarding modal state restoration on page refresh. The change is in a critical navigation path and reverting is the safest option.

    Labels: Removing DeployBlocker label (this is a frontend issue, not a backend issue)

    📋 Detailed Analysis

    Evidence

    The bug occurs when users refresh the page during the onboarding flow. The onboarding modal disappears instead of remaining visible on the current step. This is reproducible on staging (v9.3.11-23) but not in production, indicating it was introduced in a PR that is currently on staging.

    PR #80965 made changes to src/libs/Navigation/helpers/getAdaptedStateFromPath.ts that directly affect how the navigation state is restored when opening onboarding screens after a page reload.

    Verification

    The specific change in PR #80965 at line 247 of getAdaptedStateFromPath.ts:

    Before:

    return getRoutesWithIndex([defaultFullScreenRoute, adaptedOnboardingNavigator]);

    After:

    return getRoutesWithIndex([{name: SCREENS.HOME}, adaptedOnboardingNavigator]);

    This change replaced the dynamically determined defaultFullScreenRoute with a hardcoded {name: SCREENS.HOME}. The problem is that SCREENS.HOME by itself is not a valid full-screen navigator route in the new navigation structure introduced by the Home Page changes.

    Root Cause

    When a user refreshes the browser during onboarding (e.g., at step "Do you use any accounting software?"), the app attempts to restore the navigation state through getAdaptedStateFromPath(). The function detects the onboarding navigator and tries to rebuild the state with a base route.

    However, the hardcoded {name: SCREENS.HOME} doesn't provide the proper navigation structure needed for the onboarding modal to display. The defaultFullScreenRoute function would have returned a proper navigator (like NAVIGATORS.REPORTS_SPLIT_NAVIGATOR) with the correct nested structure, but the hardcoded value breaks this.

    As a result, the navigation state becomes invalid, and the onboarding modal fails to render after the page reload, appearing as if it "disappears."

    Why Revert

    1. This affects a critical user flow (onboarding) that impacts all new users
    2. The Home Page PR ([Home Page] Remove Beta Gate for Release 1 #80965) made extensive navigation changes - reverting is safer than attempting a surgical fix
    3. The proper fix requires careful consideration of the new Home navigation structure
    4. Rolling forward would require time to develop and test thoroughly
  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Feb 3, 2026
  8. 18 remaining items

  9. jponikarchuk commented on Feb 6, 2026

    @jponikarchuk
    Author

    This issue is still reproducible for QA team in build 9.3.15-1 on Web

    explorer_uDG5RBEJAO.mp4
  10. adamgrzybowski commented on Feb 6, 2026

    @adamgrzybowski
    Contributor

    This seems to be related to the #81523

    The issue mentioned above is not always reproducible, so make sure to test at least a few times.

    cc: @WojtekBoman

  11. Harmatta commented on Feb 7, 2026

    @Harmatta

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    On web (staging), during the onboarding flow, refreshing the page causes the onboarding modal to disappear instead of staying open on the current step. For example, at the "Do you use any accounting software?" step, after reload the user is no longer shown the onboarding modal and cannot continue.

    What is the root cause of that problem?

    A navigation state restoration regression was introduced by PR #80965 in src/libs/Navigation/helpers/getAdaptedStateFromPath.ts. When the user refreshes mid-onboarding, the app relies on getAdaptedStateFromPath() to rebuild a valid React Navigation state that includes the onboarding navigator. The recent change hardcoded a base route to {name: SCREENS.HOME} instead of using the existing defaultFullScreenRoute, which provided a valid full-screen navigator route. With the hardcoded leaf screen as the base, the onboarding modal route tree becomes invalid/incomplete after reload, and the modal does not render.

    What changes do you think we should make in order to solve the problem?

    In src/libs/Navigation/helpers/getAdaptedStateFromPath.ts, locate the block that returns the adapted state when the onboarding navigator is present. Replace the hardcoded {name: SCREENS.HOME} base route with the correct full-screen route object (revert to using defaultFullScreenRoute or construct the equivalent valid root navigator route). Ensure the returned routes are passed through getRoutesWithIndex() correctly so indices are valid. Add a regression test that feeds an onboarding path into getAdaptedStateFromPath() and asserts the resulting state includes the onboarding navigator with a valid full-screen base route.

    cc: @Harmatta (storefile996@gmail.com / https://www.upwork.com/freelancers/~01184f546f3a74ab48)

  12. melvin-bot commented on Feb 13, 2026

    @melvin-bot

    @mallenexpensify, @mountiny, @WojtekBoman, @adamgrzybowski, @DylanDylann Huh... This is 4 days overdue. Who can take care of this?

  13. mountiny commented on Feb 15, 2026

    @mountiny
    Contributor

    @adamgrzybowski @WojtekBoman Can you work on this one next please?

  14. WojtekBoman commented on Feb 16, 2026

    @WojtekBoman
    Contributor

    We'll check it out 🕵️

  15. WojtekBoman commented on Feb 16, 2026

    @WojtekBoman
    Contributor

    It has been fixed by this PR #81690

    It's not reproducible for me:

    Screen.Recording.2026-02-16.at.14.05.16.mov

    @jponikarchuk Should work fine now :)

  16. m-natarajan commented on Feb 16, 2026

    @m-natarajan

    Passed, Chrome / v9.3.19-5

    Screen.Recording.2026-02-16.at.16.05.44.mp4
  17. mountiny commented on Feb 16, 2026

    @mountiny
    Contributor

    Perfect thank you

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.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions