Skip to content

[Due for payment 2026-04-14] Workspace - Pressing ESC key on workspace settings page does not return to workspace list #86785

Closed

Description

@mitarachim

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.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: #86438
Email or phone of affected tester (no customers): soidnjsojdiosjiosdjo@gmail.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:

  1. Go to staging.new.expensify.com
  2. Go to Workspaces tab.
  3. Open any workspace (create a workspace if no workspace).
  4. Press ESC key.

Expected Result:

App will return to workspace list.

Actual Result:

Pressing ESC key on workspace settings page does not return to 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

Bug7118359_1774987427304.8.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCash
    Daily
    Bug
    DeployBlocker
    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: #86438

  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. MelvinBot commented on Mar 31, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    PR #86438 introduced NAVIGATORS.WORKSPACE_NAVIGATOR as a new wrapper navigator that sits on the root stack and nests WORKSPACES_LIST, WORKSPACE_SPLIT_NAVIGATOR, and DOMAIN_SPLIT_NAVIGATOR inside it.

    When ESC is pressed on a workspace settings page, the EscapeHandler (src/libs/Navigation/AppNavigator/KeyboardShortcutsHandler/EscapeHandler.tsx:42) falls through all RHP overlay checks and calls Navigation.dismissModal(). This dispatches a DISMISS_MODAL action to the root stack router, which checks if the root stack's last route is in MODAL_ROUTES_TO_DISMISS (src/libs/Navigation/AppNavigator/createRootStackNavigator/GetStateForActionHandlers.ts:24-42).

    The problem: MODAL_ROUTES_TO_DISMISS contains WORKSPACE_SPLIT_NAVIGATOR but not WORKSPACE_NAVIGATOR. After PR #86438, the root stack's top route when viewing workspace settings is WORKSPACE_NAVIGATOR (since WORKSPACE_SPLIT_NAVIGATOR is now a child inside it). So the check at line 284 fails, the function logs "[Navigation] dismissModal failed because there is no modal stack to dismiss" and returns null. Nothing happens.

    The WORKSPACE_SPLIT_NAVIGATOR entry in MODAL_ROUTES_TO_DISMISS is now dead code at the root stack level — it was valid before PR #86438 when WORKSPACE_SPLIT_NAVIGATOR was a direct child of the root stack, but is now unreachable since it's nested inside WORKSPACE_NAVIGATOR.

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

    In GetStateForActionHandlers.ts:

    1. Replace NAVIGATORS.WORKSPACE_SPLIT_NAVIGATOR with NAVIGATORS.WORKSPACE_NAVIGATOR in MODAL_ROUTES_TO_DISMISS.

    2. Update handleDismissModalAction to handle WORKSPACE_NAVIGATOR specially: when the last route is WORKSPACE_NAVIGATOR and its nested state has index > 0 (meaning the user is viewing a workspace/domain split navigator with WORKSPACES_LIST underneath), pop within the nested state to go back to WORKSPACES_LIST rather than popping the entire WORKSPACE_NAVIGATOR from the root stack. If the nested state is already at WORKSPACES_LIST (index === 0), pop the whole navigator from the root stack as normal.

    This gives the correct two-step ESC behavior:

    • ESC on workspace settings → navigates back to workspaces list (pops within WORKSPACE_NAVIGATOR)
    • ESC on workspaces list → exits workspace navigation entirely (pops WORKSPACE_NAVIGATOR from root stack)

    What alternative solutions did you explore? (Optional)

    An alternative is to add a workspace-specific check in EscapeHandler.tsx that detects when the root state's last route is WORKSPACE_NAVIGATOR with index > 0 and calls Navigation.goBack(ROUTES.WORKSPACES_LIST.route) instead of dismissModal(). This mirrors what the back button in WorkspaceInitialPage does at line 449. It's simpler but adds route-specific logic to a handler that currently delegates entirely to the navigation system.


    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.

  6. removed
    DeployBlocker
    on Mar 31, 2026
  7. luacmartins commented on Mar 31, 2026

    @luacmartins
    Contributor

    @WojtekBoman @sumo-slonik could you please take a look at this one?

  8. 5 remaining items

  9. melvin-bot commented on Apr 2, 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.

  10. removed
    DeployBlockerCash
    on Apr 2, 2026
  11. added
    Weekly
    Awaiting Payment
    and removed
    Hourly
    on Apr 7, 2026
  12. changed the title [-]Workspace - Pressing ESC key on workspace settings page does not return to workspace list[/-] [+][Due for payment 2026-04-14] Workspace - Pressing ESC key on workspace settings page does not return to workspace list[/+] on Apr 7, 2026
  13. removed
    Reviewing
    on Apr 7, 2026
  14. melvin-bot commented on Apr 7, 2026

    @melvin-bot

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

  15. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.52-9 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-04-14. 🎊

  16. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    @luacmartins 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]

  17. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  18. melvin-bot commented on Apr 25, 2026

    @melvin-bot

    📣 @yagna-1! 📣
    Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
    Please follow these steps:

    1. Make sure you've read and understood the contributing guidelines.
    2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
    3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugEngineeringWeekly

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions