Skip to content

[Due for payment 2026-05-11] [Due for payment 2026-05-07] [$250] Expensify Card - After clicking View transactions, Workspaces tab resets to initial page #89009

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: 9.3.62-12
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #85234
Email or phone of affected tester (no customers): applausetester+khcategory20@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Workspace Settings

Action Performed:

Precondition:

  • Workspace is set up with Expensify card feature.
  • Assign a virtual card to any member.
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Expensify Card.
  3. Click on any card.
  4. Click View transactions.
  5. Click Workspaces tab.

Expected Result:

Workspaces tab will open workspace settings > Expensify Card where it was left off.

Actual Result:

Workspaces tab opens workspace list.

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: @ZhenjaHorbach
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022048916970607277831
  • Upwork Job ID: 2048916970607277831
  • Last Price Increase: 2026-04-28
  • Automatic offers:
    • linhvovan29546 | Reviewer | 111258588

Activity

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

    @melvin-bot

    @mountiny recently merged #85234, but they are OOO right now, so I'll auto-assign someone else.

  3. github-actions commented on Apr 27, 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.
  4. melvin-bot commented on Apr 27, 2026

    @melvin-bot

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

  5. melvin-bot commented on Apr 27, 2026

    @melvin-bot

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

  6. MelvinBot commented on Apr 28, 2026

    @MelvinBot
    Contributor

    Proposal

    Problem: When navigating from Workspace > Expensify Card > Card Details > "View transactions" and then clicking the Workspaces tab, the workspace navigation resets to the list page instead of returning to the Expensify Card settings page.

    Root Cause: When "View transactions" is clicked from the card details RHP, linkTo sees the current top route is RIGHT_MODAL_NAVIGATOR (not TAB_NAVIGATOR) and force-PUSHes a new TAB_NAVIGATOR instance onto the root stack. This creates two TAB_NAVIGATOR instances: the original (with workspace state) and a new one (focused on Search, with no workspace state).

    When the user then clicks the Workspaces tab, useRestoreWorkspacesTabOnNavigate uses findLast to look at only the newest TAB_NAVIGATOR — which has no workspace state. The session storage fallback is a no-op on native, so lastWorkspacesTabNavigatorRoute is undefined, causing navigateToWorkspacesPage to default to the workspace list.

    Solution: Fix useRestoreWorkspacesTabOnNavigate to search all TAB_NAVIGATOR instances for workspace state (not just the newest one). When the newest TAB_NAVIGATOR has no workspace state, fall back to checking older TAB_NAVIGATOR instances in the root stack before defaulting to the workspace list.

    Specifically, in useRestoreWorkspacesTabOnNavigate.ts, change the lookup to iterate through all TAB_NAVIGATOR routes (from newest to oldest) until one with workspace state is found:

    - const rootTabRoute = rootState?.routes.findLast((route) => route.name === NAVIGATORS.TAB_NAVIGATOR);
    - const rootTabState = getTabState(rootTabRoute);
    - const workspaceNavigatorRoute = rootTabState?.routes?.find((route) => route.name === NAVIGATORS.WORKSPACE_NAVIGATOR);
    + const allTabRoutes = rootState?.routes.filter((route) => route.name === NAVIGATORS.TAB_NAVIGATOR).reverse() ?? [];
    + let workspaceNavigatorRoute;
    + for (const tabRoute of allTabRoutes) {
    +     const tabState = getTabState(tabRoute);
    +     workspaceNavigatorRoute = tabState?.routes?.find((route) => route.name === NAVIGATORS.WORKSPACE_NAVIGATOR);
    +     if (workspaceNavigatorRoute?.state?.routes?.length) {
    +         break;
    +     }
    + }

    Additionally, navigateToWorkspacesPage should restore deeper workspace sub-page state (not just WORKSPACE_INITIAL) when the workspace navigator route has nested state available.

    Investigation details

    Navigation flow that triggers the bug:

    1. User is on Workspace > Expensify Card settings. Root stack: [TAB_NAVIGATOR(workspace tab focused), RIGHT_MODAL_NAVIGATOR(card details)]
    2. User clicks "View transactions" at WorkspaceExpensifyCardDetailsPage.tsx:346-361, which calls Navigation.navigate(ROUTES.SEARCH_ROOT.getRoute(...))
    3. linkTo at line 175-181 forces PUSH because currentTopRoute is RIGHT_MODAL_NAVIGATOR, not TAB_NAVIGATOR
    4. Root stack becomes: [TAB_NAVIGATOR(workspace), RIGHT_MODAL_NAVIGATOR, TAB_NAVIGATOR(search)]
    5. User clicks Workspaces tab → useRestoreWorkspacesTabOnNavigate finds the newest TAB_NAVIGATOR (search one) via findLast, finds no workspace state, defaults to workspace list

    Why this only happens via "View transactions": The key is that the navigation to Search happens while the card details RHP is the top route. If the user navigated to Search directly from the Workspaces tab (without the RHP), linkTo would switch tabs within the existing TAB_NAVIGATOR instead of pushing a new one.

    Alternative explanations considered:

    • Tab state freezing/unmounting: Ruled out — ensureTabNavigatorRoutes at ensureTabNavigatorRoutes.ts:13-32 keeps both TAB_NAVIGATOR instances mounted
    • Session storage bug: Partially correct for web, but the primary issue is the findLast lookup targeting the wrong TAB_NAVIGATOR

    Introduced by: PR Expensify/App#85234 — "Introduce a Bottom Tab Navigator for Top-Level Navigation"


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Apr 28, 2026
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Apr 28, 2026
  9. 23 remaining items

  10. m-natarajan commented on Apr 30, 2026

    @m-natarajan

    Passed, Chrome / v9.3.64-27, Xiaomi Redmi Note 10 / Android 12, App 9.3.64-27 (Waiting for validation on iOS)

    Screenrecorder-2026-04-30-20-38-27-27.mp4
    REC-20260430203319.mp4
  11. luacmartins commented on Apr 30, 2026

    @luacmartins
    Contributor

    Fixed. Closing.

  12. changed the title [-][$250] Expensify Card - After clicking View transactions, Workspaces tab resets to initial page[/-] [+][Due for payment 2026-05-07] [$250] Expensify Card - After clicking View transactions, Workspaces tab resets to initial page[/+] on Apr 30, 2026
  13. melvin-bot commented on Apr 30, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  14. melvin-bot commented on Apr 30, 2026

    @melvin-bot

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

    If no regressions arise, payment will be issued on 2026-05-07. 🎊

    For reference, here are some details about the assignees on this issue:

  15. melvin-bot commented on Apr 30, 2026

    @melvin-bot

    @ZhenjaHorbach The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]

  16. changed the title [-][Due for payment 2026-05-07] [$250] Expensify Card - After clicking View transactions, Workspaces tab resets to initial page[/-] [+][Due for payment 2026-05-11] [Due for payment 2026-05-07] [$250] Expensify Card - After clicking View transactions, Workspaces tab resets to initial page[/+] on May 4, 2026
  17. melvin-bot commented on May 4, 2026

    @melvin-bot

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

    If no regressions arise, payment will be issued on 2026-05-11. 🎊

    For reference, here are some details about the assignees on this issue:

  18. melvin-bot commented on May 4, 2026

    @melvin-bot

    @ZhenjaHorbach The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]

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