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-26] [Due for payment 2026-05-26] Report - Back button return the user to Upgrade page #90852
Version Number: 9.3.75-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:#88374 Email or phone of affected tester (no customers):testpayment935@gmail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Windows 11 pro /Chrome App Component: Chat Report View
Action Performed:
Navigate to staging.new.expensify.com
Sign in with a brand-new account that has no workspace.(e.g. use Something else option)
From the FAB and from the Reports/Expenses page, verify the Create report option is visible.
Click Create report.
Tap Upgrade, then Got it, thanks on the confirmation step.
Press back from the report and verify
Expected Result:
User should return to the originating screen, not the upgrade step.
👋 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: #88374 - "Reapply: Show Create Report CTA for users without a workspace" by @mukhrr (High confidence) Related Issues: #83782, #84139
Recommendation: REVERT
PR #88374 introduced a regression in the back navigation for the "Create report" upgrade flow. After tapping "Upgrade" and then "Got it, thanks", the user is returned to the upgrade step instead of the originating screen.
Assigned: @mukhrr (PR author), @eVoloshchak (approving reviewer), @marcaaron (approving reviewer) from highest-confidence causing PR only Labels: DeployBlockerCash kept (frontend App PR caused this). DeployBlocker is not present and should not be added.
In the UPGRADE_PATHS.REPORTS case inside afterUpgradeAcknowledged (in IOURequestStepUpgrade.tsx), the new code from PR #88374 is:
if (action === CONST.IOU.ACTION.CREATE && policyID) {
// create report and navigate with forceReplace
} else {
Navigation.goBack();
navigateWithMicrotask(ROUTES.MONEY_REQUEST_STEP_REPORT.getRoute(...));
}
The policyID here is read from policyDataRef.current?.policyID, which is the ID of the newly-created workspace. The bug occurs because when the user taps "Got it, thanks" (the confirmation step), policyID may be undefined or not yet populated in policyDataRef.current at the time afterUpgradeAcknowledged runs. This sends the user into the else branch, which calls Navigation.goBack() and then navigates to MONEY_REQUEST_STEP_REPORT — but Navigation.goBack() with no active report takes the user back to the upgrade screen, producing the described regression.
Before PR #88374, this code path called Navigation.goBack() followed by a navigation to NEW_REPORT_WORKSPACE_SELECTION, which was itself a different flow. The refactor broke the specific "no workspace" case.
After the upgrade completes and the user presses "Got it, thanks", the afterUpgradeAcknowledged callback creates the report and navigates with Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(newReportID), {forceReplace: true}). The forceReplace option only sets the action type to REPLACE in the central pane navigator — it does not dismiss the RHP modal that contains the upgrade screen. The upgrade screen remains in the navigation stack, so pressing back returns to it.
What changes do you think we should make in order to solve the problem?
In IOURequestStepUpgrade.tsx, the CONST.UPGRADE_PATHS.REPORTS case with action === CONST.IOU.ACTION.CREATE should dismiss the RHP before navigating to the report. Replace the Navigation.navigate call with Navigation.dismissModalWithReport({reportID: newReportID}) (or use Navigation.dismissModal with an afterTransition callback that navigates to the report route), following the same pattern used elsewhere in the codebase for navigating to a report from an RHP screen.
What alternative solutions did you explore?
Using Navigation.goBack() before navigating would also remove the upgrade screen, but dismissModalWithReport is the established pattern for this exact scenario (navigating to a report from inside an RHP) and handles edge cases around transition timing.
Investigation details
Data flow:
User clicks "Create report" → useCreateReport hook detects no valid workspace → pushes MONEY_REQUEST_UPGRADE route into the RHP
Possibly related:Expensify/App#90613 — "Distance upgrade page reappeared" — may share the same root cause (RHP not dismissed after upgrade).
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.
@aimane-chnaif can you please accept the job below? Please reply here and tag me once you have.
If you're not sent an offer in Upwork when you're assigned to an issue, and an Upwork job exists, please submit a proposal. https://www.upwork.com/jobs/~022059772196511644756
Activity
melvin-bot commentedon May 16, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #88374
melvin-bot commentedon May 16, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 16, 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 May 16, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #88374 - "Reapply: Show Create Report CTA for users without a workspace" by @mukhrr (High confidence)
Related Issues: #83782, #84139
Recommendation: REVERT
PR #88374 introduced a regression in the back navigation for the "Create report" upgrade flow. After tapping "Upgrade" and then "Got it, thanks", the user is returned to the upgrade step instead of the originating screen.
Assigned: @mukhrr (PR author), @eVoloshchak (approving reviewer), @marcaaron (approving reviewer) from highest-confidence causing PR only
Labels:
DeployBlockerCashkept (frontend App PR caused this).DeployBlockeris not present and should not be added.📋 Detailed Analysis
Evidence
melvin-botcomment confirms: "You have been assigned to this deploy blocker because you recently merged this PR: Reapply: Show Create Report CTA for users without a workspace #88374"9.3.75-0staging build, which is confirmed by the StagingDeployCash checklist (PR Reapply: Show Create Report CTA for users without a workspace #88374 is entry 104 in the chronological list, just before the9.3.75-0mobile build step).Verification
src/pages/iou/request/step/IOURequestStepUpgrade.tsxandsrc/hooks/useCreateReport.tsx, both modified by PR Reapply: Show Create Report CTA for users without a workspace #88374.src/pages/iou/request/step/IOURequestStepUpgrade.tsxto change theCONST.UPGRADE_PATHS.REPORTSbranch ofafterUpgradeAcknowledged.Root Cause
In the
UPGRADE_PATHS.REPORTScase insideafterUpgradeAcknowledged(inIOURequestStepUpgrade.tsx), the new code from PR #88374 is:The
policyIDhere is read frompolicyDataRef.current?.policyID, which is the ID of the newly-created workspace. The bug occurs because when the user taps "Got it, thanks" (the confirmation step),policyIDmay beundefinedor not yet populated inpolicyDataRef.currentat the timeafterUpgradeAcknowledgedruns. This sends the user into theelsebranch, which callsNavigation.goBack()and then navigates toMONEY_REQUEST_STEP_REPORT— butNavigation.goBack()with no active report takes the user back to the upgrade screen, producing the described regression.Before PR #88374, this code path called
Navigation.goBack()followed by a navigation toNEW_REPORT_WORKSPACE_SELECTION, which was itself a different flow. The refactor broke the specific "no workspace" case.MelvinBot commentedon May 16, 2026
Proposal
What is the root cause of that problem?
After the upgrade completes and the user presses "Got it, thanks", the
afterUpgradeAcknowledgedcallback creates the report and navigates withNavigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(newReportID), {forceReplace: true}). TheforceReplaceoption only sets the action type toREPLACEin the central pane navigator — it does not dismiss the RHP modal that contains the upgrade screen. The upgrade screen remains in the navigation stack, so pressing back returns to it.What changes do you think we should make in order to solve the problem?
In
IOURequestStepUpgrade.tsx, theCONST.UPGRADE_PATHS.REPORTScase withaction === CONST.IOU.ACTION.CREATEshould dismiss the RHP before navigating to the report. Replace theNavigation.navigatecall withNavigation.dismissModalWithReport({reportID: newReportID})(or useNavigation.dismissModalwith anafterTransitioncallback that navigates to the report route), following the same pattern used elsewhere in the codebase for navigating to a report from an RHP screen.What alternative solutions did you explore?
Using
Navigation.goBack()before navigating would also remove the upgrade screen, butdismissModalWithReportis the established pattern for this exact scenario (navigating to a report from inside an RHP) and handles edge cases around transition timing.Investigation details
Data flow:
useCreateReporthook detects no valid workspace → pushesMONEY_REQUEST_UPGRADEroute into the RHPafterUpgradeAcknowledgedfiresUPGRADE_PATHS.REPORTScase callscreateReportForCurrentUserthenNavigation.navigatewithforceReplace: trueforceReplacein linkTo only setsaction.type = REPLACEon the target navigator action — it does not close the RHPCorrect pattern:
Navigation.dismissModalWithReportdismisses the RHP first, then navigates to the report in the central pane.Possibly related: Expensify/App#90613 — "Distance upgrade page reappeared" — may share the same root cause (RHP not dismissed after upgrade).
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.18 remaining items
melvin-bot commentedon May 25, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon May 26, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon May 27, 2026
Payment Summary
Contributor+: @aimane-chnaif paid $250 via Upwork.
@aimane-chnaif can you please accept the job below? Please reply here and tag me once you have.
If you're not sent an offer in Upwork when you're assigned to an issue, and an Upwork job exists, please submit a proposal.
https://www.upwork.com/jobs/~022059772196511644756
^ Test case created. Thx
aimane-chnaif commentedon Jun 2, 2026
@mallenexpensify accepted offer
mallenexpensify commentedon Jun 2, 2026
@aimane-chnaif paid, summary updated above. Thx.