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-22] [Due for payment 2026-06-19] Report -Next step shows "Waiting for you to submit" on track expense moved to report offline #93373
Version Number: 9.4.6-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:#92254 Email or phone of affected tester (no customers):ibellicotest+2766@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome App Component: Money Requests
Action Performed:
Open the staging.new.expensify.com website.
Sign up with a new account.
Select "Track expenses for my business" during onboarding.
Navigate to "Self DM"
Create a manual expense.
Turn off internet connection.
Open the report of the just created expense.
Click on the report field > "Create Report"
Navigate to workspace chat where expense was moved.
Note that preview shows "Mark as done" button.
Open expense report.
Note that next step message displays "Waiting for you to submit expense"
Expected Result:
Next step message of track expense that was moved to report on workspace, should display "Waiting for you to mark this as done".
Actual Result:
Next step message on track expense that was moved to workspace while offline. is displayed as "Waiting for you to submit expense", despite workspace having approvals/payments disabled.
👋 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.
Please re-state the problem that we are trying to solve in this issue.
When a track-intent user (onboarded via "Track expenses for my business") moves a track expense from their Self DM onto a new workspace report via report field → "Create Report" while offline, the report's next-step header shows "Waiting for you to submit expense" instead of "Waiting for you to mark this as done" — even though the preview correctly shows a "Mark as done" button.
What is the root cause of that problem?
The optimistic next-step message is built with policy === undefined, which makes shouldShowMarkAsDone return false and fall back to the "submit" copy.
The "Create Report" flow calls selectReport with an item literal that omits policyID:
selectReport({value: optimisticReport.reportID,keyForList: optimisticReport.reportID},optimisticReport);// ^ no policyID
selectReport then derives the policy from that missing field and passes it into changeTransactionsReport → buildNextStepNew:
IOURequestEditReport.tsx:92 — policy: allPolicies?.[${POLICY}${item.policyID}] → with item.policyID === undefined, this is undefined.
With policy undefined, isSubmitAndClose(undefined) returns false, short-circuiting shouldShowMarkAsDone before it ever checks the approver. The optimistic next step (built in NextStepUtils.ts:562) is therefore stored with the "submit" copy. Offline, the server never corrects it. The live "Mark as done" button renders correctly because it reads the real policy from Onyx at render time — hence the mismatch. (Introduced by #92254.)
Why only this offline-move flow breaks
The other three shouldShowMarkAsDone conditions hold at build time (isTrackIntentUser from persisted onboarding choice, isReportOwner from the optimistic report's ownerAccountID, and the approver check). Only isSubmitAndClose(policy) fails, purely because policy is undefined. Creating the expense directly in the workspace chat offline works because that flow has the policy. The correct policy (policyForNewReport/policyForMovingExpenses) is already in scope right at the call site.
What changes do you think we should make in order to solve the problem?
Pass the known destination policy through the "Create Report" path so the optimistic next step is built with it. Minimal fix: include policyID on the synthesized item in createReportForPolicy:
policyForNewReport is already computed one line above (IOURequestEditReport.tsx:133). This makes line 92 resolve the real submit-and-close policy, isSubmitAndClose returns true, and the optimistic next step renders "mark this as done". Apply the same fix to the equivalent literals in IOURequestStepReport.tsx / useReportSelectionActions.ts if they drive the same flow.
What alternative solutions did you explore?
Plumb the policy object directly through selectReport → changeTransactionsReport for all callers. This is more robust but touches more call sites; the policyID-on-item fix is the smaller, lower-risk change for a deploy blocker.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/93373) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-]Report -Next step shows "Waiting for you to submit" on track expense moved to report offline[/-][+][Due for payment 2026-06-19] Report -Next step shows "Waiting for you to submit" on track expense moved to report offline[/+]on Jun 12, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.6-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@Valforte 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]. If no checklist is needed for this issue, you can click: [no checklist button]
changed the title [-][Due for payment 2026-06-19] Report -Next step shows "Waiting for you to submit" on track expense moved to report offline[/-][+][Due for payment 2026-06-22] [Due for payment 2026-06-19] Report -Next step shows "Waiting for you to submit" on track expense moved to report offline[/+]on Jun 15, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.7-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@Valforte 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]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
applause-bot commentedon Jun 12, 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/c40652f4e21756402a6880ce705fbdc765223a02ec7902b06072aef9cc44760c
melvin-bot commentedon Jun 12, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #92254
melvin-bot commentedon Jun 12, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 12, 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 12, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a track-intent user (onboarded via "Track expenses for my business") moves a track expense from their Self DM onto a new workspace report via report field → "Create Report" while offline, the report's next-step header shows "Waiting for you to submit expense" instead of "Waiting for you to mark this as done" — even though the preview correctly shows a "Mark as done" button.
What is the root cause of that problem?
The optimistic next-step message is built with
policy === undefined, which makesshouldShowMarkAsDonereturnfalseand fall back to the "submit" copy.The "Create Report" flow calls
selectReportwith an item literal that omitspolicyID:IOURequestEditReport.tsx:135-141selectReportthen derives the policy from that missing field and passes it intochangeTransactionsReport→buildNextStepNew:IOURequestEditReport.tsx:92—policy: allPolicies?.[${POLICY}${item.policyID}]→ withitem.policyID === undefined, this isundefined.With
policyundefined,isSubmitAndClose(undefined)returnsfalse, short-circuitingshouldShowMarkAsDonebefore it ever checks the approver. The optimistic next step (built inNextStepUtils.ts:562) is therefore stored with the "submit" copy. Offline, the server never corrects it. The live "Mark as done" button renders correctly because it reads the real policy from Onyx at render time — hence the mismatch. (Introduced by #92254.)Why only this offline-move flow breaks
The other three
shouldShowMarkAsDoneconditions hold at build time (isTrackIntentUserfrom persisted onboarding choice,isReportOwnerfrom the optimistic report'sownerAccountID, and the approver check). OnlyisSubmitAndClose(policy)fails, purely becausepolicyisundefined. Creating the expense directly in the workspace chat offline works because that flow has the policy. The correct policy (policyForNewReport/policyForMovingExpenses) is already in scope right at the call site.The same
policy: allPolicies?.[${POLICY}${item.policyID}]pattern appears inIOURequestStepReport.tsxanduseReportSelectionActions.ts:199— worth checking those "Create Report" entry points for the same gap.What changes do you think we should make in order to solve the problem?
Pass the known destination policy through the "Create Report" path so the optimistic next step is built with it. Minimal fix: include
policyIDon the synthesized item increateReportForPolicy:policyForNewReportis already computed one line above (IOURequestEditReport.tsx:133). This makes line 92 resolve the real submit-and-close policy,isSubmitAndClosereturnstrue, and the optimistic next step renders "mark this as done". Apply the same fix to the equivalent literals inIOURequestStepReport.tsx/useReportSelectionActions.tsif they drive the same flow.What alternative solutions did you explore?
Plumb the
policyobject directly throughselectReport→changeTransactionsReportfor all callers. This is more robust but touches more call sites; thepolicyID-on-item fix is the smaller, lower-risk change for a deploy blocker.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/93373)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
melvin-bot commentedon Jun 12, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
m-natarajan commentedon Jun 12, 2026
Passed, Chrome and Xiaomi Redmi Note 10 / Android 12 / v9.4.6-4
Screenrecorder-2026-06-12-23-57-27-934.mp4
REC-20260613001311.mp4
[-]Report -Next step shows "Waiting for you to submit" on track expense moved to report offline[/-][+][Due for payment 2026-06-19] Report -Next step shows "Waiting for you to submit" on track expense moved to report offline[/+]melvin-bot commentedon Jun 12, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 12, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.6-4 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-06-19. 🎊
melvin-bot commentedon Jun 12, 2026
@Valforte 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]. If no checklist is needed for this issue, you can click: [no checklist button]
[-][Due for payment 2026-06-19] Report -Next step shows "Waiting for you to submit" on track expense moved to report offline[/-][+][Due for payment 2026-06-22] [Due for payment 2026-06-19] Report -Next step shows "Waiting for you to submit" on track expense moved to report offline[/+]melvin-bot commentedon Jun 15, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.7-4 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-06-22. 🎊
melvin-bot commentedon Jun 15, 2026
@Valforte 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]. If no checklist is needed for this issue, you can click: [no checklist button]