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-06-17] Workspace -Browser back button with "All Set" modal open leads to previous page on background #92850
Version Number: 9.4.0.0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#91368 Email or phone of affected tester (no customers):applausetester+ib0005@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Windows 11 / Chrome App Component: Workspace Settings
Action Performed:
Prerequisite: Use expensifail account.
Prerequisite 2: User is admin of at least two control workspaces.
Open the staging.new.expensify.com website.
Navigate to "Inbox"
Navigate to "Workspaces"
Click on the three dots icon on any workspace > "Copy Settings"
Select any workspace > "Next"
Select some settings > "Next" > "Copy Settings"
Wait until "Copy in progress" modal disappears.
When "All Set" modal appears, click on browser´s back button.
Note that "All Set" modal is still displayed and website returns to previous page on the background.
Expected Result:
Using browser´s back button while "All Set" modal is displayed, should only close the modal.
Actual Result:
User is redirected to previous page on the background, with "All Set" modal still displayed, after using browser´s back button.
👋 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.
Find someone who can quickly fix the issue.
Fix the issue yourself.
godzillaxbox19982014-lgtm commented on Jun 6, 2026
The local evidence matches this recurring failure shape: route params are created in one format and read in another. Here, src/pages/workspace/copyPolicySettings/CopyPolicySettingsSelectFeaturesPage.tsx:277 and src/pages/workspace/WorkspacePageWithSections.tsx:270 do not agree on the same workspace name value, so the user-visible path can show a missing or stale state even though nearby data already has the needed context.
What changes do you think we should make in order to solve the problem?
Update src/pages/workspace/copyPolicySettings/CopyPolicySettingsSelectFeaturesPage.tsx:277 to derive workspace name from the route/access source that owns this flow before the value is consumed.
Carry the same normalized value through src/pages/workspace/WorkspacePageWithSections.tsx:270; that follows the safer family move to fix the route builder/consumer pair instead of adding a screen-only redirect, so the write/optimistic/read paths agree instead of only changing the visible component.
Keep the change inside the Navigation, RHP, Not Here, Back Stack surface and avoid changing deep links, auth/onboarding redirects.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add or update a regression in tests/navigation/**/*.ts for the exact issue flow: Workspace -Browser back button with "All Set" modal open leads to previous page on background.
Cover the counter-case near src/pages/workspace/copyPolicySettings/CopyPolicySettingsSelectFeaturesPage.tsx:277 so valid existing workspace name behavior still works.
Manually repeat the issue steps after the patch and confirm the visible state/action is no longer stale.
What alternative solutions did you explore? (Optional)
I would not add a broad new condition outside these referenced paths; the safer fix is to keep workspace name consistent at the first read/write boundary shown above.
Because this prop is missing, no guard entry/listener is registered, so the browser back button is handled by React Navigation and pops the underlying screen. The page navigates back in the background, while the modal stays on screen because its visibility depends on Onyx state, not the route. That is exactly the reported symptom.
Pass shouldHandleNavigationBack to the <ConfirmModal>. This makes the back press get intercepted by the modal and prevents the background screen from navigating away.
Make the back press actually dismiss the "All Set" modal. The modal's back handler calls onCancel, but the All Set step's onCancel is currently a no-op. Point it at clearCopyPolicySettings() (same as the "Done" button's onConfirm) so back press closes the modal — matching the expected result. Consider the same for the loading step depending on desired behavior there.
Why this matches the expected result
Expected: "Using browser's back button while 'All Set' modal is displayed, should only close the modal."
shouldHandleNavigationBack → back press is consumed by the modal's popstate guard, so the underlying page does not navigate (fixes "redirected to previous page on background").
Without step 2, enabling shouldHandleNavigationBack alone would stop the background navigation but the modal would stay open (no-op onCancel).
What alternative solutions did you explore? (Optional)
Tying the modal to a dedicated route so back navigation closes it naturally. This is a larger change and unnecessary given the existing shouldHandleNavigationBack mechanism already used elsewhere for state-driven modals.
Confidence: High — code evidence is clear and the fix is entirely within the App repo (web frontend).
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/92850) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
Activity
applause-bot commentedon Jun 6, 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/269516143a42a78c610d90a2c259967fa9c78229de5e5e6831f951bef73c82af
melvin-bot commentedon Jun 6, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #91368
melvin-bot commentedon Jun 6, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 6, 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:
godzillaxbox19982014-lgtm commentedon Jun 6, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace -Browser back button with "All Set" modal open leads to previous page on background
What is the root cause of that problem?
I traced this to the path that handles
workspace name:matching code path):onBackButtonPress={Navigation.goBack}matching code path):style={[styles.settingsPageBackground, styles.flex1, styles.w100]}matching code path):onBackButtonPress={Navigation.goBack}src/pages/workspace/copyPolicySettings/CopyPolicySettingsSelectFeaturesPage.tsx:277andsrc/pages/workspace/WorkspacePageWithSections.tsx:270do not agree on the sameworkspace namevalue, so the user-visible path can show a missing or stale state even though nearby data already has the needed context.What changes do you think we should make in order to solve the problem?
src/pages/workspace/copyPolicySettings/CopyPolicySettingsSelectFeaturesPage.tsx:277to deriveworkspace namefrom the route/access source that owns this flow before the value is consumed.src/pages/workspace/WorkspacePageWithSections.tsx:270; that follows the safer family move to fix the route builder/consumer pair instead of adding a screen-only redirect, so the write/optimistic/read paths agree instead of only changing the visible component.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
tests/navigation/**/*.tsfor the exact issue flow: Workspace -Browser back button with "All Set" modal open leads to previous page on background.src/pages/workspace/copyPolicySettings/CopyPolicySettingsSelectFeaturesPage.tsx:277so valid existingworkspace namebehavior still works.What alternative solutions did you explore? (Optional)
workspace nameconsistent at the first read/write boundary shown above.MelvinBot commentedon Jun 6, 2026
Proposal
What is the root cause of that problem?
The "All Set" / progress modal is a
ConfirmModalwhose visibility is driven purely by Onyx state (copyPolicySettings.currentStep), not by a navigation route.It is rendered without the
shouldHandleNavigationBackprop. On web, that prop is what makes a modal intercept the browser back button — when it is set, the webModalpushes ashouldGoBackhistory guard entry and registers apopstatelistener on show, so back press is caught and routed toonCloseinstead of navigating.Because this prop is missing, no guard entry/listener is registered, so the browser back button is handled by React Navigation and pops the underlying screen. The page navigates back in the background, while the modal stays on screen because its visibility depends on Onyx state, not the route. That is exactly the reported symptom.
This regressed in #91368.
What changes do you think we should make in order to solve the problem?
In
CopyPolicySettingsProgressModal.tsx:shouldHandleNavigationBackto the<ConfirmModal>. This makes the back press get intercepted by the modal and prevents the background screen from navigating away.onCancel, but the All Set step'sonCancelis currently a no-op. Point it atclearCopyPolicySettings()(same as the "Done" button'sonConfirm) so back press closes the modal — matching the expected result. Consider the same for the loading step depending on desired behavior there.Why this matches the expected result
Expected: "Using browser's back button while 'All Set' modal is displayed, should only close the modal."
shouldHandleNavigationBack→ back press is consumed by the modal'spopstateguard, so the underlying page does not navigate (fixes "redirected to previous page on background").onCancel: clearCopyPolicySettings→clearCopyPolicySettings()resets the Onyx key, makingcurrentStepundefined andisVisiblefalse, so the modal closes.Without step 2, enabling
shouldHandleNavigationBackalone would stop the background navigation but the modal would stay open (no-oponCancel).What alternative solutions did you explore? (Optional)
Tying the modal to a dedicated route so back navigation closes it naturally. This is a larger change and unnecessary given the existing
shouldHandleNavigationBackmechanism already used elsewhere for state-driven modals.Confidence: High — code evidence is clear and the fix is entirely within the App repo (web frontend).
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/92850)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
yuwenmemon commentedon Jun 7, 2026
FYI @fedirjh this came from #91368
9 remaining items
melvin-bot commentedon Jun 11, 2026
@shubham1206agra Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Jun 16, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Jun 16, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Jun 18, 2026
@shubham1206agra I'm assuming no payment cuz this is a regression, will leave open a few days then close.
shubham1206agra commentedon Jun 19, 2026
@mallenexpensify Yes, no payment required here