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-11] Workspace - Back button leads to Inbox tab from workspace overview page #88970
Version Number: v9.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):expensify416+da2@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Android App Component: Other
Action Performed:
Sign in with a new account (don't create workspace during onboarding)
Go to Inbox > Tap on FAB button > Create Workspace > Tap Confirm
Tap app back button
Expected Result:
User should be navigated back to workspace list page
👋 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: #85260
Recommendation: REVERT
The large navigation refactor in PR #85234 introduced a regression where the Android back button returns the user to the Inbox tab instead of the Workspaces list page after navigating to a workspace via the FAB + "Create Workspace" flow. This is a clear regression introduced by the PR itself — in fact, the PR's own QA test steps included a check for exactly this back-button behavior: "Switch to Workspaces tab, open a workspace, tap back — verify you return to Workspaces list (not Home)."
Assigned: @WojtekBoman (PR author), @ZhenjaHorbach (approving reviewer), @mountiny (approving reviewer) Labels: DeployBlockerCash kept (Frontend bug in App). DeployBlocker is not present, so no label removal needed.
Detailed Analysis
Evidence
The bug is reproducible on staging (v9.3.62-5) but not production, confirming it was introduced in the current staging cycle.
PR Introduce a Bottom Tab Navigator for Top-Level Navigation #85234 fundamentally restructured how top-level navigation works: it replaced individual root stack screens (REPORTS_SPLIT_NAVIGATOR, WORKSPACE_NAVIGATOR, etc.) with a real createBottomTabNavigator-based TAB_NAVIGATOR. All full-screen navigators now live as tab screens inside it.
The workspace creation flow (triggered from the FAB in Inbox) calls Navigation.navigate(routeToNavigate, {forceReplace: true}). After this navigation, when the user presses the Android back button, the navigation history context under the new tab navigator structure does not properly track that the user entered the workspace via the Workspaces tab — instead it falls back to the Inbox tab.
PR Introduce a Bottom Tab Navigator for Top-Level Navigation #85234 modified src/libs/Navigation/helpers/navigateToWorkspacesPage.ts, src/libs/actions/App.ts, src/pages/workspace/WorkspaceInitialPage.tsx, and the entire navigation hierarchy. The WorkspaceInitialPage back-button handler was updated as part of the PR to use shouldUseNarrowLayout && !route.params?.backTo ? Navigation.goBack() : Navigation.goBack(route.params?.backTo ?? ROUTES.WORKSPACES_LIST.route), but on narrow layout (Android), it calls the bare Navigation.goBack() which pops the workspace split — and under the new tab structure this can resolve to the Inbox tab rather than the workspace list.
The reproduction path is Android-only and narrow-layout specific, consistent with the shouldUseNarrowLayout branch in WorkspaceInitialPage.tsx that was changed in this PR.
Root Cause
PR #85234 replaced the old flat root-stack navigation model with a TAB_NAVIGATOR wrapping all tab screens. On narrow layout (Android), WorkspaceInitialPage calls Navigation.goBack() without a fallback route, relying on the navigation stack to resolve correctly. Under the old model, creating a workspace from Inbox would push the workspace screen onto a navigation stack that knew how to go back to the Workspaces tab. Under the new TAB_NAVIGATOR model, forceReplace navigation to the workspace route after creation replaces the history entry in a way that leaves the Inbox tab as the active context, so goBack() resolves to Inbox rather than the Workspaces list.
When creating a workspace from the FAB on the Inbox tab, createWorkspaceWithPolicyDraftAndNavigateToIt dismisses the RHP modal and then calls Navigation.navigate(routeToNavigate). This triggers linkTo, which checks if the target is in ROOT_TAB_SCREENS. Since WORKSPACE.INITIAL is in that set, isTargetAtTabRoot is true, so linkTo uses a NAVIGATE action (plain tab switch) instead of PUSH.
The NAVIGATE action switches to the WORKSPACE_NAVIGATOR tab and passes nested params targeting WORKSPACE_SPLIT_NAVIGATOR. React Navigation's stack router creates the state with only the target screen — WORKSPACES_LIST is never injected into the back stack underneath. So when the Android back button is pressed, the WORKSPACE_NAVIGATOR stack has nothing to pop back to, the back action propagates to the tab navigator (which uses backBehavior="fullHistory"), and the user is returned to the previously active tab (Inbox).
There is already a custom action OPEN_WORKSPACE_SPLIT that explicitly constructs the nested state as [WORKSPACES_LIST, WORKSPACE_SPLIT_NAVIGATOR], ensuring WORKSPACES_LIST is always in the back stack. However, the workspace creation flow does not use this action.
What changes do you think we should make in order to solve the problem?
In createWorkspaceWithPolicyDraftAndNavigateToIt, after dismissing the modal, dispatch the OPEN_WORKSPACE_SPLIT action (with the new policyID) instead of calling Navigation.navigate(). This reuses the existing handler that correctly builds the WORKSPACE_NAVIGATOR state with WORKSPACES_LIST underneath, so Android back navigates to the workspace list as expected.
What alternative solutions did you explore?
Modify linkTo to always PUSH when crossing tabs toward workspace screens — this would work but adds special-case logic to the general navigation path, and OPEN_WORKSPACE_SPLIT already solves this more cleanly.
Modify the WorkspaceNavigator stack to always initialize with WORKSPACES_LIST — risky because it would affect all entries into the workspace tab, not just this flow.
Investigation details
Key code path:
User taps FAB → Create Workspace → Confirm
WorkspaceConfirmationPage calls createWorkspaceWithPolicyDraftAndNavigateToIt with routeToNavigate = ROUTES.WORKSPACE_INITIAL.getRoute(policyID) (on small screens)
App.ts:636-639: Modal is dismissed, then Navigation.navigate(routeToNavigate) fires
linkTo:188-189: isTargetAtTabRoot is true for WORKSPACE.INITIAL → NAVIGATE (tab switch) used, not PUSH
Tab switches to WORKSPACE_NAVIGATOR, but stack state = [WORKSPACE_SPLIT_NAVIGATOR] only — no WORKSPACES_LIST
Android back → nothing to pop → fullHistory back behavior → returns to Inbox
Related:getAdaptedStateFromPath also injects WORKSPACES_LIST as a safety net for deep links/URL restore, but linkTo uses getStateFromPath (React Navigation's default) and bypasses this logic.
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 [-][Due for payment 2026-05-11] [Due for payment 2026-05-07] Workspace - Back button leads to Inbox tab from workspace overview page[/-][+][Due for payment 2026-05-11] Workspace - Back button leads to Inbox tab from workspace overview page[/+]on May 7, 2026
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: #85260
Recommendation: REVERT
The large navigation refactor in PR #85234 introduced a regression where the Android back button returns the user to the Inbox tab instead of the Workspaces list page after navigating to a workspace via the FAB + "Create Workspace" flow. This is a clear regression introduced by the PR itself — in fact, the PR's own QA test steps included a check for exactly this back-button behavior: "Switch to Workspaces tab, open a workspace, tap back — verify you return to Workspaces list (not Home)."
Assigned: @WojtekBoman (PR author), @ZhenjaHorbach (approving reviewer), @mountiny (approving reviewer)
Labels:
DeployBlockerCashkept (Frontend bug in App).DeployBlockeris not present, so no label removal needed.Detailed Analysis
Evidence
REPORTS_SPLIT_NAVIGATOR,WORKSPACE_NAVIGATOR, etc.) with a realcreateBottomTabNavigator-basedTAB_NAVIGATOR. All full-screen navigators now live as tab screens inside it.Navigation.navigate(routeToNavigate, {forceReplace: true}). After this navigation, when the user presses the Android back button, the navigation history context under the new tab navigator structure does not properly track that the user entered the workspace via the Workspaces tab — instead it falls back to the Inbox tab.src/libs/Navigation/helpers/navigateToWorkspacesPage.ts,src/libs/actions/App.ts,src/pages/workspace/WorkspaceInitialPage.tsx, and the entire navigation hierarchy. TheWorkspaceInitialPageback-button handler was updated as part of the PR to useshouldUseNarrowLayout && !route.params?.backTo ? Navigation.goBack() : Navigation.goBack(route.params?.backTo ?? ROUTES.WORKSPACES_LIST.route), but on narrow layout (Android), it calls the bareNavigation.goBack()which pops the workspace split — and under the new tab structure this can resolve to the Inbox tab rather than the workspace list.Verification
src/pages/workspace/WorkspaceInitialPage.tsx,src/libs/Navigation/AppNavigator/Navigators/TabNavigator.native.tsx,src/libs/Navigation/helpers/linkTo/index.ts,src/libs/Navigation/AppNavigator/createRootStackNavigator/GetStateForActionHandlers.tsshouldUseNarrowLayoutbranch inWorkspaceInitialPage.tsxthat was changed in this PR.Root Cause
PR #85234 replaced the old flat root-stack navigation model with a
TAB_NAVIGATORwrapping all tab screens. On narrow layout (Android),WorkspaceInitialPagecallsNavigation.goBack()without a fallback route, relying on the navigation stack to resolve correctly. Under the old model, creating a workspace from Inbox would push the workspace screen onto a navigation stack that knew how to go back to the Workspaces tab. Under the newTAB_NAVIGATORmodel,forceReplacenavigation to the workspace route after creation replaces the history entry in a way that leaves the Inbox tab as the active context, sogoBack()resolves to Inbox rather than the Workspaces list.MelvinBot commentedon Apr 27, 2026
Proposal
What is the root cause of that problem?
When creating a workspace from the FAB on the Inbox tab,
createWorkspaceWithPolicyDraftAndNavigateToItdismisses the RHP modal and then callsNavigation.navigate(routeToNavigate). This triggerslinkTo, which checks if the target is inROOT_TAB_SCREENS. SinceWORKSPACE.INITIALis in that set,isTargetAtTabRootistrue, solinkTouses a NAVIGATE action (plain tab switch) instead of PUSH.The NAVIGATE action switches to the
WORKSPACE_NAVIGATORtab and passes nested params targetingWORKSPACE_SPLIT_NAVIGATOR. React Navigation's stack router creates the state with only the target screen —WORKSPACES_LISTis never injected into the back stack underneath. So when the Android back button is pressed, theWORKSPACE_NAVIGATORstack has nothing to pop back to, the back action propagates to the tab navigator (which usesbackBehavior="fullHistory"), and the user is returned to the previously active tab (Inbox).There is already a custom action
OPEN_WORKSPACE_SPLITthat explicitly constructs the nested state as[WORKSPACES_LIST, WORKSPACE_SPLIT_NAVIGATOR], ensuringWORKSPACES_LISTis always in the back stack. However, the workspace creation flow does not use this action.What changes do you think we should make in order to solve the problem?
In
createWorkspaceWithPolicyDraftAndNavigateToIt, after dismissing the modal, dispatch theOPEN_WORKSPACE_SPLITaction (with the newpolicyID) instead of callingNavigation.navigate(). This reuses the existing handler that correctly builds theWORKSPACE_NAVIGATORstate withWORKSPACES_LISTunderneath, so Android back navigates to the workspace list as expected.What alternative solutions did you explore?
linkToto always PUSH when crossing tabs toward workspace screens — this would work but adds special-case logic to the general navigation path, andOPEN_WORKSPACE_SPLITalready solves this more cleanly.WorkspaceNavigatorstack to always initialize withWORKSPACES_LIST— risky because it would affect all entries into the workspace tab, not just this flow.Investigation details
Key code path:
WorkspaceConfirmationPagecallscreateWorkspaceWithPolicyDraftAndNavigateToItwithrouteToNavigate = ROUTES.WORKSPACE_INITIAL.getRoute(policyID)(on small screens)App.ts:636-639: Modal is dismissed, thenNavigation.navigate(routeToNavigate)fireslinkTo:188-189:isTargetAtTabRootistrueforWORKSPACE.INITIAL→ NAVIGATE (tab switch) used, not PUSHWORKSPACE_NAVIGATOR, but stack state =[WORKSPACE_SPLIT_NAVIGATOR]only — noWORKSPACES_LISTfullHistoryback behavior → returns to InboxExisting solution not used:
OPEN_WORKSPACE_SPLIThandler explicitly constructs{routes: [WORKSPACES_LIST, WORKSPACE_SPLIT_NAVIGATOR], index: 1}.Related:
getAdaptedStateFromPathalso injectsWORKSPACES_LISTas a safety net for deep links/URL restore, butlinkTousesgetStateFromPath(React Navigation's default) and bypasses this logic.Next 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.luacmartins commentedon Apr 27, 2026
@MelvinBot implement this
28 remaining items
melvin-bot commentedon May 5, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)fix(workspace): re-apply #89182 back-button handler simplification
[-][Due for payment 2026-05-11] [Due for payment 2026-05-07] Workspace - Back button leads to Inbox tab from workspace overview page[/-][+][Due for payment 2026-05-11] Workspace - Back button leads to Inbox tab from workspace overview page[/+]melvin-bot commentedon May 8, 2026
@ZhenjaHorbach Whoops! This issue is 2 days overdue. Let's get this updated quick!
dukenv0307 commentedon May 9, 2026
not overdue
melvin-bot commentedon May 11, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon May 12, 2026
Payment Summary
Contributor+: @dukenv0307 due $250 via NewDot
^ Test case created
quinthar commentedon May 21, 2026
Approved $250 to @dukenv0307