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
Copy Settings - User land on Select Workspace modal when navigate back from Select Settings #93879
Version Number: v9.4.10-1 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#93546 Email or phone of affected tester (no customers):applausetester+gm1038424@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Windows 10/Chrome App Component: Other
Action Performed:
Navigate to "Workspaces"
Click on the three dots icon on any workspace → "Copy Settings"
Select any workspace and click "Next"
Select some features and click "Next" to reach the Confirm page
On Let’s make sure everything looks right modal select Settings
Navigate Back from Select settings modal
Expected Result:
User should land on Let’s make sure everything looks right. modal
👋 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.
This is a regression from PR #93546, which changed the Select Features page's back button from a plain Navigation.goBack() to one with a hardcoded "back to" route — the Select Workspaces page (CopyPolicySettingsSelectFeaturesPage.tsx:301):
The argument to Navigation.goBack(backToRoute) is not a "fallback used only when you can't go back" — it actively navigates up to that specific route. Internally it calls goUp, which dispatches a POP_TO/pop(distanceToPop) to that route, popping every screen in between (Navigation.ts:511, Navigation.ts:476-501).
So in the repro, the navigation stack is Select Workspaces → Select Features → Confirm. On the Confirm page the Settings row navigates to Select Features (CopyPolicySettingsConfirmPage.tsx:77-82). Pressing Back there now force-pops all the way to Select Workspaces instead of returning to the Confirm modal. This is why it reproduces on staging (has the PR) but not production (still uses plain goBack).
The PR added the hardcoded route to fix back-navigation after a browser refresh (where the RHP stack is rebuilt with only the current screen, so a plain goBack does nothing). But unconditionally forcing the target breaks the case where the user reaches Select Features from the Confirm page.
Why it works in production but not staging
In production the Select Features back button was a plain Navigation.goBack(), which pops a single screen and returns to Confirm. The PR replaced it with goBack(ROUTES.POLICY_COPY_SETTINGS…), which always pops up to Select Workspaces regardless of how the page was reached.
What changes do you think we should make in order to solve the problem?
The Select Features back button should only fall back to the Select Workspaces route when there is no screen to pop back to (the page-refresh scenario the PR was fixing). When the stack can go back, it should do a normal Navigation.goBack() so it returns to whatever screen the user came from (the Confirm modal in this flow, or Select Workspaces in the normal forward flow).
Concretely: in onBackButtonPress on CopyPolicySettingsSelectFeaturesPage.tsx:301, gate the hardcoded route behind a "can't go back" check (e.g. navigationRef.current?.canGoBack()), passing the POLICY_COPY_SETTINGS route only when the stack has no previous screen.
The Confirm page's back button (CopyPolicySettingsConfirmPage.tsx:103) has the same pattern, but its target (Select Features) is the immediate previous screen in the normal flow, so it's harmless today — worth applying the same conditional fallback for consistency.
What alternative solutions did you explore? (Optional)
Reverting PR #93546 would fix this regression but reintroduce the original after-refresh navigation bugs (#91792, #92385) that PR was solving, so a targeted conditional-fallback fix is preferable.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/93879) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
@yuwenmemon@fedirjh@shubham1206agra this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Activity
applause-bot commentedon Jun 17, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/655a8139ffe46b4c47fc1c28153b1d8c60d81028293bd14c2ed4e67758820772
melvin-bot commentedon Jun 17, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #93546
melvin-bot commentedon Jun 17, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 17, 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:
MelvinBot commentedon Jun 17, 2026
Proposal
What is the root cause of that problem?
This is a regression from PR #93546, which changed the Select Features page's back button from a plain
Navigation.goBack()to one with a hardcoded "back to" route — the Select Workspaces page (CopyPolicySettingsSelectFeaturesPage.tsx:301):The argument to
Navigation.goBack(backToRoute)is not a "fallback used only when you can't go back" — it actively navigates up to that specific route. Internally it callsgoUp, which dispatches aPOP_TO/pop(distanceToPop)to that route, popping every screen in between (Navigation.ts:511,Navigation.ts:476-501).So in the repro, the navigation stack is
Select Workspaces → Select Features → Confirm. On the Confirm page the Settings row navigates to Select Features (CopyPolicySettingsConfirmPage.tsx:77-82). Pressing Back there now force-pops all the way to Select Workspaces instead of returning to the Confirm modal. This is why it reproduces on staging (has the PR) but not production (still uses plaingoBack).The PR added the hardcoded route to fix back-navigation after a browser refresh (where the RHP stack is rebuilt with only the current screen, so a plain
goBackdoes nothing). But unconditionally forcing the target breaks the case where the user reaches Select Features from the Confirm page.Why it works in production but not staging
In production the Select Features back button was a plain
Navigation.goBack(), which pops a single screen and returns to Confirm. The PR replaced it withgoBack(ROUTES.POLICY_COPY_SETTINGS…), which always pops up to Select Workspaces regardless of how the page was reached.What changes do you think we should make in order to solve the problem?
The Select Features back button should only fall back to the Select Workspaces route when there is no screen to pop back to (the page-refresh scenario the PR was fixing). When the stack can go back, it should do a normal
Navigation.goBack()so it returns to whatever screen the user came from (the Confirm modal in this flow, or Select Workspaces in the normal forward flow).Concretely: in
onBackButtonPressonCopyPolicySettingsSelectFeaturesPage.tsx:301, gate the hardcoded route behind a "can't go back" check (e.g.navigationRef.current?.canGoBack()), passing thePOLICY_COPY_SETTINGSroute only when the stack has no previous screen.The Confirm page's back button (
CopyPolicySettingsConfirmPage.tsx:103) has the same pattern, but its target (Select Features) is the immediate previous screen in the normal flow, so it's harmless today — worth applying the same conditional fallback for consistency.What alternative solutions did you explore? (Optional)
Reverting PR #93546 would fix this regression but reintroduce the original after-refresh navigation bugs (#91792, #92385) that PR was solving, so a targeted conditional-fallback fix is preferable.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/93879)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
shubham1206agra commentedon Jun 18, 2026
@yuwenmemon This is intentional. Please close this issue
fedirjh commentedon Jun 18, 2026
@yuwenmemon I think this can be demoted. Seems intentional per #91792 (comment)
puneetlath commentedon Jun 18, 2026
Demoting per the linked convo as it seems this is intentional. I'll let @yuwenmemon make the ultimate call on whether this is a bug or we can close.
melvin-bot commentedon Jun 23, 2026
@shubham1206agra Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Jun 25, 2026
@shubham1206agra 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
melvin-bot commentedon Jun 29, 2026
@shubham1206agra 10 days overdue. I'm getting more depressed than Marvin.
melvin-bot commentedon Jul 1, 2026
@yuwenmemon @fedirjh @shubham1206agra this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
melvin-bot commentedon Jul 1, 2026
@shubham1206agra 12 days overdue. Walking. Toward. The. Light...
shubham1206agra commentedon Jul 2, 2026
@yuwenmemon Can you please close this issue?
yuwenmemon commentedon Jul 2, 2026
For sure.