You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-05-22] Workspace settings do not open immediately after creation, ESC key not working #88932
Version Number: 9.3.62-5 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):sdsodijnosdjoij@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. Create a new workspace.
BUG 1: Workspace settings open after some delay.
4. Press ESC key.
BUG 2: App does not return to workspace settings after pressing ESC key.
Expected Result:
BUG 1: Workspace settings will open immediately after creating workspace.
BUG 2: App will return to workspace settings after pressing ESC key.
Actual Result:
BUG 1: Workspace settings open after some delay.
BUG 2: App does not return to workspace settings after pressing ESC key.
👋 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:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #85234 - "Introduce a Bottom Tab Navigator for Top-Level Navigation" by @WojtekBoman (High confidence) Related Issues: None
Recommendation: REVERT
PR #85234 introduced a fundamental restructuring of the top-level navigation tree (adding a TabNavigator wrapping all full-screen navigators). The two reported bugs are both direct consequences of that navigation refactor affecting the Workspace tab flow.
Bug 1 — Workspace settings open after a delay after creating a workspace:
PR #85234 changed all top-level full-screen navigators (including WORKSPACE_NAVIGATOR) from being registered as direct root stack screens to being tab screens inside a new TAB_NAVIGATOR. It also removed usePreloadFullScreenNavigators from WorkspaceNavigator. The tab navigator needs to initialise the workspace tab screen lazily when first navigated to (unlike the previous approach where the navigator was always pushed onto the root stack). After a workspace is created the user is navigated into the workspace settings screen, and the new tab-based initialisation path introduces a visible delay before the workspace settings page appears.
Bug 2 — ESC key does not return to workspace settings: goBackFromWorkspaceSettingPages uses rootState.routes.at(-2) to determine whether the previous route was the Inbox (REPORTS_SPLIT_NAVIGATOR). Before this PR the root stack could contain WORKSPACE_NAVIGATOR directly, so at(-2) pointed at a concrete navigator name. After this PR, every full-screen navigator is wrapped inside a single TAB_NAVIGATOR entry. With the new structure rootState.routes.at(-2) may now point at a TAB_NAVIGATOR route whose focused tab is WORKSPACE_NAVIGATOR, not REPORTS_SPLIT_NAVIGATOR. The updated code does call getActiveTabName to unwrap the tab, but goBackFromWorkspaceSettingPages checks whether the previous route is Inbox to decide whether to dismissModal or goBack(WORKSPACES_LIST). When the workspace was opened from the Workspaces tab (not Inbox), the fallback Navigation.goBack(ROUTES.WORKSPACES_LIST.route) fires — but because the Workspaces List is now a tab screen inside TAB_NAVIGATOR, goBack no longer navigates back to it correctly, resulting in the ESC key appearing to do nothing or navigating to the wrong destination.
Both bugs are staging-only (not reproducible in production), which is consistent with this being a new PR introduced in this staging release cycle.
The melvin-bot also explicitly assigned this issue to the PR author referencing PR #85234, confirming the automated system flagged the same PR.
Merge date: 2026-04-24 — aligns with the staging version 9.3.62-5 where the bug was first reported.
The issue is staging-only (not reproducible in production), consistent with being introduced by a PR in the current staging cycle.
Root Cause
PR #85234 replaced the flat root stack structure (where WORKSPACE_NAVIGATOR was a direct child of RootStack) with a TabNavigator that contains all full-screen navigators as tab screens. This changed how navigation state is shaped at the root level. Two specific consequences:
The lazy initialisation of tab screens (tabs are not mounted until first visited) causes a perceptible delay when the app navigates into a freshly-created workspace's settings screen, because the WORKSPACE_NAVIGATOR tab screen has to be set up for the first time.
goBackFromWorkspaceSettingPages computes the "previous" route by reading rootState.routes.at(-2). Under the old architecture this was the prior full-screen navigator; under the new architecture there is only one TAB_NAVIGATOR entry at the root, so "go back to WORKSPACES_LIST" via Navigation.goBack(ROUTES.WORKSPACES_LIST.route) no longer functions as intended — the Workspaces List is now a nested screen inside the tab navigator, not a standalone route on the root stack that goBack can pop to.
PR #85234 moved WORKSPACE_NAVIGATOR from being a direct child of the root stack to being a tab inside TAB_NAVIGATOR. Two code paths were not updated for this structural change:
Bug 1 (Delay): When creating a workspace from the confirmation modal (RHP), App.ts:636-639 calls dismissModal with an afterTransition callback. Inside Navigation.ts:782-803, this chains twoTransitionTracker.runAfterTransitions calls sequentially — each with up to a 1000ms safety timeout (CONST). Combined with lazy loading of the WorkspaceNavigator chunk (TabNavigator.tsx:22), this produces a noticeable delay.
Bug 2 (ESC):EscapeHandler.tsx:64 checks if the root stack's last route is WORKSPACE_NAVIGATOR. After the tab navigator change, the last root route is TAB_NAVIGATOR, so this condition is always false. The code falls through to dismissModal(), which also does nothing because TAB_NAVIGATOR is not in MODAL_ROUTES_TO_DISMISS. Result: ESC is completely broken on workspace settings.
What changes do you think we should make in order to solve the problem?
Bug 2 (ESC — clear fix): Update EscapeHandler.tsx to account for the new navigation hierarchy. Instead of checking if the root stack's last route is WORKSPACE_NAVIGATOR, check if the focused tab inside TAB_NAVIGATOR is WORKSPACE_NAVIGATOR. Then update handleEscapeKeyInWorkspaceNavigator to navigate through the correct nesting level (root → TAB_NAVIGATOR → WORKSPACE_NAVIGATOR → split navigator) when popping.
Bug 1 (Delay): The double runAfterTransitions chain in dismissModal is the main contributor. The second wait (with waitForUpcomingTransition: true) can hit a 1-second safety timeout if the dismiss transition event doesn't fire as expected in the new tab structure. Consider either:
Skipping the dismissModal path when navigating to a tab screen (since tab switching doesn't need a modal dismiss animation), or
Navigating directly via Navigation.navigate with forceReplace: true when the destination is a tab within TAB_NAVIGATOR.
What alternative solutions did you explore?
For Bug 2, an alternative would be to add TAB_NAVIGATOR to the modal dismiss logic, but that's incorrect — tabs aren't modals. The proper fix is to traverse into TAB_NAVIGATOR's state to find the active workspace navigator.
For Bug 1, reducing the timeout constants would help symptomatically but wouldn't address the root cause of unnecessary transition waits for tab-to-tab 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.
changed the title [-]Workspace settings do not open immediately after creation, ESC key not working[/-][+][Due for payment 2026-05-22] Workspace settings do not open immediately after creation, ESC key not working[/+]on May 15, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.74-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@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]
Activity
melvin-bot commentedon Apr 27, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #85234
melvin-bot commentedon Apr 27, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Apr 27, 2026
👋 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:
OSBotify commentedon Apr 27, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #85234 - "Introduce a Bottom Tab Navigator for Top-Level Navigation" by @WojtekBoman (High confidence)
Related Issues: None
Recommendation: REVERT
PR #85234 introduced a fundamental restructuring of the top-level navigation tree (adding a
TabNavigatorwrapping all full-screen navigators). The two reported bugs are both direct consequences of that navigation refactor affecting the Workspace tab flow.Assigned: @WojtekBoman (PR author), @ZhenjaHorbach (approving reviewer), @mountiny (approving reviewer)
Labels:
DeployBlockerCashkept (Frontend bug — App PR caused the issue). No label changes made.📋 Detailed Analysis
Evidence
Bug 1 — Workspace settings open after a delay after creating a workspace:
PR #85234 changed all top-level full-screen navigators (including
WORKSPACE_NAVIGATOR) from being registered as direct root stack screens to being tab screens inside a newTAB_NAVIGATOR. It also removedusePreloadFullScreenNavigatorsfromWorkspaceNavigator. The tab navigator needs to initialise the workspace tab screen lazily when first navigated to (unlike the previous approach where the navigator was always pushed onto the root stack). After a workspace is created the user is navigated into the workspace settings screen, and the new tab-based initialisation path introduces a visible delay before the workspace settings page appears.Bug 2 — ESC key does not return to workspace settings:
goBackFromWorkspaceSettingPagesusesrootState.routes.at(-2)to determine whether the previous route was the Inbox (REPORTS_SPLIT_NAVIGATOR). Before this PR the root stack could containWORKSPACE_NAVIGATORdirectly, soat(-2)pointed at a concrete navigator name. After this PR, every full-screen navigator is wrapped inside a singleTAB_NAVIGATORentry. With the new structurerootState.routes.at(-2)may now point at aTAB_NAVIGATORroute whose focused tab isWORKSPACE_NAVIGATOR, notREPORTS_SPLIT_NAVIGATOR. The updated code does callgetActiveTabNameto unwrap the tab, butgoBackFromWorkspaceSettingPageschecks whether the previous route is Inbox to decide whether todismissModalorgoBack(WORKSPACES_LIST). When the workspace was opened from the Workspaces tab (not Inbox), the fallbackNavigation.goBack(ROUTES.WORKSPACES_LIST.route)fires — but because the Workspaces List is now a tab screen insideTAB_NAVIGATOR,goBackno longer navigates back to it correctly, resulting in the ESC key appearing to do nothing or navigating to the wrong destination.Both bugs are staging-only (not reproducible in production), which is consistent with this being a new PR introduced in this staging release cycle.
The melvin-bot also explicitly assigned this issue to the PR author referencing PR #85234, confirming the automated system flagged the same PR.
Verification
src/pages/workspace/WorkspaceInitialPage.tsx,src/libs/Navigation/helpers/goBackFromWorkspaceSettingPages.ts,src/libs/Navigation/AppNavigator/Navigators/WorkspaceNavigator.tsx,src/libs/Navigation/AppNavigator/AuthScreens.tsxgh pr view 85234 --json files.9.3.62-5where the bug was first reported.Root Cause
PR #85234 replaced the flat root stack structure (where
WORKSPACE_NAVIGATORwas a direct child ofRootStack) with aTabNavigatorthat contains all full-screen navigators as tab screens. This changed how navigation state is shaped at the root level. Two specific consequences:The lazy initialisation of tab screens (tabs are not mounted until first visited) causes a perceptible delay when the app navigates into a freshly-created workspace's settings screen, because the
WORKSPACE_NAVIGATORtab screen has to be set up for the first time.goBackFromWorkspaceSettingPagescomputes the "previous" route by readingrootState.routes.at(-2). Under the old architecture this was the prior full-screen navigator; under the new architecture there is only oneTAB_NAVIGATORentry at the root, so "go back to WORKSPACES_LIST" viaNavigation.goBack(ROUTES.WORKSPACES_LIST.route)no longer functions as intended — the Workspaces List is now a nested screen inside the tab navigator, not a standalone route on the root stack thatgoBackcan pop to.MelvinBot commentedon Apr 27, 2026
Proposal
What is the root cause of that problem?
PR #85234 moved
WORKSPACE_NAVIGATORfrom being a direct child of the root stack to being a tab insideTAB_NAVIGATOR. Two code paths were not updated for this structural change:Bug 1 (Delay): When creating a workspace from the confirmation modal (RHP),
App.ts:636-639callsdismissModalwith anafterTransitioncallback. InsideNavigation.ts:782-803, this chains twoTransitionTracker.runAfterTransitionscalls sequentially — each with up to a 1000ms safety timeout (CONST). Combined with lazy loading of theWorkspaceNavigatorchunk (TabNavigator.tsx:22), this produces a noticeable delay.Bug 2 (ESC):
EscapeHandler.tsx:64checks if the root stack's last route isWORKSPACE_NAVIGATOR. After the tab navigator change, the last root route isTAB_NAVIGATOR, so this condition is alwaysfalse. The code falls through todismissModal(), which also does nothing becauseTAB_NAVIGATORis not inMODAL_ROUTES_TO_DISMISS. Result: ESC is completely broken on workspace settings.What changes do you think we should make in order to solve the problem?
Bug 2 (ESC — clear fix): Update
EscapeHandler.tsxto account for the new navigation hierarchy. Instead of checking if the root stack's last route isWORKSPACE_NAVIGATOR, check if the focused tab insideTAB_NAVIGATORisWORKSPACE_NAVIGATOR. Then updatehandleEscapeKeyInWorkspaceNavigatorto navigate through the correct nesting level (root → TAB_NAVIGATOR → WORKSPACE_NAVIGATOR → split navigator) when popping.Bug 1 (Delay): The double
runAfterTransitionschain indismissModalis the main contributor. The second wait (withwaitForUpcomingTransition: true) can hit a 1-second safety timeout if the dismiss transition event doesn't fire as expected in the new tab structure. Consider either:dismissModalpath when navigating to a tab screen (since tab switching doesn't need a modal dismiss animation), orNavigation.navigatewithforceReplace: truewhen the destination is a tab withinTAB_NAVIGATOR.What alternative solutions did you explore?
For Bug 2, an alternative would be to add
TAB_NAVIGATORto the modal dismiss logic, but that's incorrect — tabs aren't modals. The proper fix is to traverse intoTAB_NAVIGATOR's state to find the active workspace navigator.For Bug 1, reducing the timeout constants would help symptomatically but wouldn't address the root cause of unnecessary transition waits for tab-to-tab navigation.
Investigation details
Navigation hierarchy after PR #85234:
Bug 2 trace:
EscapeHandlerchecksnavigationRef.getRootState()?.routes.at(-1)?.name === NAVIGATORS.WORKSPACE_NAVIGATOR— false (it'sTAB_NAVIGATOR)Navigation.dismissModal()handleDismissModalActionchecks if last route is inMODAL_ROUTES_TO_DISMISS—TAB_NAVIGATORis notnull, nothing happensBug 1 trace:
createWorkspaceWithPolicyDraftAndNavigateToIt→isTopmostRouteModalScreen()is true (workspace creation page is in RHP)dismissModal({afterTransition: () => navigate(route)})calledrunAfterTransitionswait (up to 1000ms) → dispatchesDISMISS_MODALrunAfterTransitionswithwaitForUpcomingTransition: true(up to 1000ms for transition start + 1000ms for completion)afterTransitioncallback fires →Navigation.navigateto workspace routeReact.lazy()loadsWorkspaceNavigatorchunk → rendersKey files:
EscapeHandler.tsx,App.ts,Navigation.ts,TabNavigator.tsxNext Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.18 remaining items
[-]Workspace settings do not open immediately after creation, ESC key not working[/-][+][Due for payment 2026-05-22] Workspace settings do not open immediately after creation, ESC key not working[/+]melvin-bot commentedon May 15, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 15, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.74-7 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-22. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 15, 2026
@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]
ZhenjaHorbach commentedon May 15, 2026
It's in prod
I suppose we can close this