Skip to content

[Due for payment 2026-07-29] Navigation - Wrong back navigation when pressing browser's back button from workspace overview #86816

Closed

Description

@vincdargento

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.51-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #81808
Email or phone of affected tester (no customers): expensify416+da2@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: macOS chrome
App Component: Other

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Sign up with a new account
  3. Complete onboarding selecting "Something else" and don't create any workspace
  4. Once on "Home" tap on FAB and select "Start Chat"
  5. Select "Room"
  6. Tap on "Learn More" button
  7. Tap on "New Workspace"
  8. Complete creation flow
  9. Once on new workspace's profile, press browsers back button to return to workspaces list
  10. Press browser's back button again

Expected Result:

Step 8: user should be returned back to workspace list page
Step 9: user should be returned back to Room creation flow in RHP

Actual Result:

Step 8: User is redirected back to Home page
Step 9: URL changes without page change

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

bug.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @ChavdaSachin
Issue OwnerCurrent Issue Owner: @WojtekBoman

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on Mar 31, 2026

    @melvin-bot

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

  4. github-actions commented on Mar 31, 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.
  5. OSBotify commented on Mar 31, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #81808 - "fix: Workspace - Creating workspace from room´s Learn More and returning, leads to Share Code" by @TaduJR (High confidence)
    Related Issues: #71803 (original issue that PR #81808 fixed)

    Recommendation: REVERT

    PR #81808 should be reverted because it introduces a regression on web platforms. While the fix works correctly for native apps, it breaks browser back button navigation on web.

    Labels: No label changes - keeping DeployBlockerCash since this is an App PR that needs to be reverted

    📋 Detailed Analysis

    Evidence

    1. Staging vs Production: Bug is reproducible on staging (v9.3.51-0) but NOT on production, confirming it was introduced in this deploy
    2. Platform Specificity: Bug occurs on web browsers (macOS Chrome, Windows Chrome) but PR fix: Workspace - Creating workspace from room´s Learn More and returning, leads to Share Code #81808 was tested and designed for native apps
    3. Deploy Checklist: PR fix: Workspace - Creating workspace from room´s Learn More and returning, leads to Share Code #81808 is confirmed in the staging deploy checklist (merged 2026-03-30)
    4. Reproduction Flow Match: The reproduction steps in this issue match exactly the flow that PR fix: Workspace - Creating workspace from room´s Learn More and returning, leads to Share Code #81808 was designed to fix, but the symptom manifests differently on web vs native

    Verification

    I verified PR #81808 modifies these navigation-related files:

    • src/libs/Navigation/AppNavigator/createRootStackNavigator/GetStateForActionHandlers.ts - Core navigation logic
    • src/libs/Navigation/helpers/shouldStripRHPOnFullscreenPush/index.native.ts - Native behavior (strips RHP)
    • src/libs/Navigation/helpers/shouldStripRHPOnFullscreenPush/index.ts - Web behavior (does NOT strip RHP)

    The PR introduces platform-specific logic in handlePushFullscreenAction that strips the RHP (Right Hand Panel) before pushing fullscreen screens.

    Root Cause

    PR #81808 fixed issue #71803 where on Android native app, the back button led to "Share Code" instead of the room creation page. The fix strips the RHP from the navigation stack before pushing WORKSPACES_LIST, preventing the orphaned modal issue.

    However, the fix uses platform-specific exports:

    • Native (index.native.ts): shouldStripRHPOnFullscreenPush = true - RHP is stripped before pushing fullscreen
    • Web (index.ts): shouldStripRHPOnFullscreenPush = false - RHP is preserved (to avoid triggering history.back())

    On web, when the RHP is not stripped, the navigation stack becomes:

    [ReportsSplitNavigator] → [RightModalNavigator (room creation)] → [WorkspacesList]
    

    When the user creates a workspace and presses the browser back button, the RHP remaining in the stack causes incorrect navigation behavior. The browser history includes the RHP route, which interferes with the expected back navigation flow (workspace overview → workspace list → room creation).

    The PR author correctly identified that calling dismissModal on web would trigger history.back() via useLinking, but the solution of not stripping the RHP at all on web creates a different regression with browser back button handling.

  6. vincdargento commented on Apr 1, 2026

    @vincdargento
    Author

    Culprit PR was not identified, the issue is reproducible in every snapshot build of the #86774

  7. MelvinBot commented on Apr 1, 2026

    @MelvinBot
    Contributor

    I ran out of time before I could finish helping you. This usually means the task was too complex or I got stuck exploring. Please try again with a more specific request or post in the #melvinbot-ai.

    Run details: https://github.com/Expensify/Expensify/actions/runs/23824945091

  8. truph01 commented on Apr 1, 2026

    @truph01
    Contributor

    @MelvinBot I’m able to reproduce this issue after reverting the changes introduced in #81808.

    If you review that PR, the new logic applies only to native platforms and does not affect the web. However, this issue is reproducible on the web, so it’s unlikely that #81808 is the root cause of this bug.

  9. 69 remaining items

  10. ChavdaSachin commented on Aug 14, 2026

    @ChavdaSachin
    Contributor

    No Checklist Needed

    Not a regression, just an improvement.

    cc. @mallenexpensify

  11. melvin-bot commented on Aug 17, 2026

    @melvin-bot

    @ChavdaSachin Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  12. mallenexpensify commented on Aug 18, 2026

    @mallenexpensify
    Contributor

    @ChavdaSachin plz provide test case steps in case an update is needed. We always want to err on the side of create issues for the QA team, they can make the final call on what's needed.

  13. quinthar commented on Aug 19, 2026

    @quinthar
    Contributor

    Approved $250 to @ChavdaSachin

  14. melvin-bot commented on Aug 19, 2026

    @melvin-bot

    @ChavdaSachin Eep! 4 days overdue now. Issues have feelings too...

  15. mallenexpensify commented on Aug 19, 2026

    @mallenexpensify
    Contributor

    @ChavdaSachin plz provide test case steps in case an update is needed. We always want to err on the side of create issues for the QA team, they can make the final call on what's needed.

  16. ChavdaSachin commented on Aug 19, 2026

    @ChavdaSachin
    Contributor

    Test steps

    1. Sign up for a new account on web (desktop browser)
    2. Complete onboarding through Purpose → Personal Details → Interested Features (or Workspaces), advancing through multiple steps
    3. Finish onboarding and land on the expected destination (home, admins room, or Concierge)
    4. Press the browser Back button
    5. Verify that onboarding steps do not reopen and navigation stays on the post-onboarding destination
    6. On web, start onboarding and advance at least two steps deep in the onboarding modal
    7. Select "I'm just looking around" on the Purpose step and complete onboarding from there
    8. Verify that you are navigated to the correct post-onboarding destination without getting stuck on the Purpose screen
    9. On iOS or Android native, complete onboarding through any flow that dismisses the onboarding modal
    10. Verify that the modal dismisses cleanly and you land on the expected destination without navigation errors in the console
  17. m-natarajan commented on Aug 20, 2026

    @m-natarajan

    @ChavdaSachin This is regarding the regression test proposal
    Step7: "I'm just looking around" on the Purpose step is not displayed during onboarding, Is this one expected or potential issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions