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] [Due for payment 2026-05-07] iOS - Chat - WS chat becomes blank when opening and scrolling after duplicate expenses #89052
Version Number: v9.3.64-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#88442 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: iPhone 12 mini / iOS 26.3.1 App Component: Other
Action Performed:
Preconditions:
Set Submissions to Instantly
Disable Approvals and Payments
Steps:
Go to workspace chat
Create two non-reimbursable expenses
Retract each report (open report > More > Retract)
Go to Spend > Expenses
Bulk select both expenses
Click dropdown button > Duplicate expenses
Go back to workspace chat
Try to scroll the workspace chat
Expected Result:
Chat should be clearly readable when reopening after duplicating the non-reimbursable expenses.
Actual Result:
When reopening the workspace chat, it becomes blank and when scrolling it is becoming blank.
👋 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: #88442 - "Fix duplicate indicator on paid reports and error when bulk-duplicating non-reimbursable expenses" by @Krishna2323 (High confidence) Related Issues: #88257, #88300
Recommendation: REVERT
PR #88442 introduced changes to bulkDuplicateExpenses in src/libs/actions/IOU/Duplicate.ts specifically for the "instant-submit + submit-and-close + non-reimbursable" code path — the exact preconditions in the bug report (Submissions set to Instantly, Approvals and Payments disabled). The reported symptom (blank workspace chat after bulk-duplicating non-reimbursable expenses) is staging-only and aligns precisely with the merge date of April 27, 2026.
Assigned: @Krishna2323 (PR author), @situchan and @JS00001 (approving reviewers) Labels: No label changes made — DeployBlockerCash is correctly applied, no DeployBlocker label was present.
The reproduction preconditions (Submissions set to Instantly, Approvals and Payments disabled) map exactly to the isInstantSubmitEnabled + isSubmitAndClose branch introduced in the PR.
The reproduction steps (bulk-duplicate non-reimbursable expenses, then go back to workspace chat) exercise the newly added policyWillSplitReport + per-iteration currentOptimisticIOUReportID logic. The new loop logic generates multiple optimistic report IDs and changes how Onyx data is written for each duplicated transaction, which can leave the workspace chat in a corrupt/blank state on iOS.
The change restructures the bulkDuplicateExpenses loop: it now conditionally creates a new optimistic IOU report ID per iteration (currentOptimisticIOUReportID, currentReportPreviewActionID) depending on policyWillSplitReport and canAddTransaction. This is a significant change to Onyx state write ordering and optimistic report handling.
The hold: undefined additions in createExpenseByType and duplicateExpenseTransaction are separate minor fixes, but the report-splitting loop logic is the prime suspect for the blank workspace chat on iOS.
Root Cause
The newly introduced per-iteration report splitting logic in bulkDuplicateExpenses generates fresh optimisticIOUReportID values mid-loop when policyWillSplitReport is true. Under the "Instantly submit + submit-and-close + non-reimbursable" policy, this causes each duplicated expense to create its own separate report with its own Onyx writes. The resulting pattern of multiple interleaved optimistic Onyx SET/MERGE operations for the workspace chat's report preview actions appears to leave the chat component in an invalid state on iOS, causing it to render blank and remain blank while scrolling.
PR #88442 introduced policyWillSplitReport logic in Duplicate.ts:1022-1026. When all duplicated expenses are non-reimbursable under an instant-submit + submit-and-close policy, each expense now creates its own IOU report with its own REPORT_PREVIEW action in the workspace chat.
Each iteration immediately auto-submits (shouldDeferAutoSubmit=false at line 1059), so the server closes each report right away. When the server responds, it clears pendingAction and sets shouldShow=false on the REPORT_PREVIEW actions (because the linked reports are closed). At that point, isVisiblePreviewOrMoneyRequest filters out all those actions (pendingAction === undefined && shouldShow === false), leaving the workspace chat with no visible content.
On iOS specifically, the rapid synchronous Onyx updates (each loop iteration fires Onyx.update immediately via API/index.ts:82-84) combined with the SET/MERGE timing mismatch (acknowledged at Duplicate.ts:316-320) can cause the FlashList to receive data changes faster than it can complete layout, resulting in the blank/unscrollable state.
What changes do you think we should make in order to solve the problem?
The fix should be in bulkDuplicateExpenses to handle the policyWillSplitReport path correctly. Two approaches (in order of preference):
Ensure REPORT_PREVIEW visibility is maintained: When policyWillSplitReport is true, the optimistic REPORT_PREVIEW actions should have shouldShow: true set explicitly, and the success/failure data should preserve this value rather than letting the server override it to false. The server may set shouldShow=false because it considers a closed/submitted report's preview as hidden — but in the workspace chat context, these previews should remain visible so the user can see their expense history.
Batch the Onyx updates: Instead of calling API.write N times in a synchronous loop (each triggering an immediate Onyx.update), collect all optimistic data across iterations and apply them in a single Onyx.update call before firing the API requests. This would prevent the rapid re-render storm on iOS.
What alternative solutions did you explore? (Optional)
Confidence: Medium — The code path analysis strongly supports this hypothesis. The one unverified piece is confirming that the server actually sets shouldShow=false on the REPORT_PREVIEW actions for submitted-and-closed reports, which is server-side behavior.
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 [-]iOS - Chat - WS chat becomes blank when opening and scrolling after duplicate expenses[/-][+][Due for payment 2026-05-07] iOS - Chat - WS chat becomes blank when opening and scrolling after duplicate expenses[/+]on Apr 30, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.64-31 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@Krishna2323 / @situchan 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]
changed the title [-][Due for payment 2026-05-07] iOS - Chat - WS chat becomes blank when opening and scrolling after duplicate expenses[/-][+][Due for payment 2026-05-11] [Due for payment 2026-05-07] iOS - Chat - WS chat becomes blank when opening and scrolling after duplicate expenses[/+]on May 4, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.65-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@Krishna2323 / @situchan 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]
Activity
melvin-bot commentedon Apr 28, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #88442
melvin-bot commentedon Apr 28, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Apr 28, 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 28, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #88442 - "Fix duplicate indicator on paid reports and error when bulk-duplicating non-reimbursable expenses" by @Krishna2323 (High confidence)
Related Issues: #88257, #88300
Recommendation: REVERT
PR #88442 introduced changes to
bulkDuplicateExpensesinsrc/libs/actions/IOU/Duplicate.tsspecifically for the "instant-submit + submit-and-close + non-reimbursable" code path — the exact preconditions in the bug report (Submissions set to Instantly, Approvals and Payments disabled). The reported symptom (blank workspace chat after bulk-duplicating non-reimbursable expenses) is staging-only and aligns precisely with the merge date of April 27, 2026.Assigned: @Krishna2323 (PR author), @situchan and @JS00001 (approving reviewers)
Labels: No label changes made —
DeployBlockerCashis correctly applied, noDeployBlockerlabel was present.Detailed Analysis
Evidence
v9.3.64-0), not production. PR Fix duplicate indicator on paid reports and error when bulk-duplicating non-reimbursable expenses #88442 was merged on April 27, 2026, shortly before this report.isInstantSubmitEnabled+isSubmitAndClosebranch introduced in the PR.policyWillSplitReport+ per-iterationcurrentOptimisticIOUReportIDlogic. The new loop logic generates multiple optimistic report IDs and changes how Onyx data is written for each duplicated transaction, which can leave the workspace chat in a corrupt/blank state on iOS.Verification
src/libs/actions/IOU/Duplicate.ts— the primary file handling bulk expense duplication.bulkDuplicateExpensesloop: it now conditionally creates a new optimistic IOU report ID per iteration (currentOptimisticIOUReportID,currentReportPreviewActionID) depending onpolicyWillSplitReportandcanAddTransaction. This is a significant change to Onyx state write ordering and optimistic report handling.hold: undefinedadditions increateExpenseByTypeandduplicateExpenseTransactionare separate minor fixes, but the report-splitting loop logic is the prime suspect for the blank workspace chat on iOS.Root Cause
The newly introduced per-iteration report splitting logic in
bulkDuplicateExpensesgenerates freshoptimisticIOUReportIDvalues mid-loop whenpolicyWillSplitReportis true. Under the "Instantly submit + submit-and-close + non-reimbursable" policy, this causes each duplicated expense to create its own separate report with its own Onyx writes. The resulting pattern of multiple interleaved optimistic OnyxSET/MERGEoperations for the workspace chat's report preview actions appears to leave the chat component in an invalid state on iOS, causing it to render blank and remain blank while scrolling.MelvinBot commentedon Apr 28, 2026
Proposal
What is the root cause of that problem?
PR #88442 introduced
policyWillSplitReportlogic inDuplicate.ts:1022-1026. When all duplicated expenses are non-reimbursable under an instant-submit + submit-and-close policy, each expense now creates its own IOU report with its own REPORT_PREVIEW action in the workspace chat.Each iteration immediately auto-submits (
shouldDeferAutoSubmit=falseat line 1059), so the server closes each report right away. When the server responds, it clearspendingActionand setsshouldShow=falseon the REPORT_PREVIEW actions (because the linked reports are closed). At that point,isVisiblePreviewOrMoneyRequestfilters out all those actions (pendingAction === undefined && shouldShow === false), leaving the workspace chat with no visible content.On iOS specifically, the rapid synchronous Onyx updates (each loop iteration fires
Onyx.updateimmediately viaAPI/index.ts:82-84) combined with the SET/MERGE timing mismatch (acknowledged at Duplicate.ts:316-320) can cause the FlashList to receive data changes faster than it can complete layout, resulting in the blank/unscrollable state.What changes do you think we should make in order to solve the problem?
The fix should be in
bulkDuplicateExpensesto handle thepolicyWillSplitReportpath correctly. Two approaches (in order of preference):Ensure REPORT_PREVIEW visibility is maintained: When
policyWillSplitReportis true, the optimistic REPORT_PREVIEW actions should haveshouldShow: trueset explicitly, and the success/failure data should preserve this value rather than letting the server override it tofalse. The server may setshouldShow=falsebecause it considers a closed/submitted report's preview as hidden — but in the workspace chat context, these previews should remain visible so the user can see their expense history.Batch the Onyx updates: Instead of calling
API.writeN times in a synchronous loop (each triggering an immediateOnyx.update), collect all optimistic data across iterations and apply them in a singleOnyx.updatecall before firing the API requests. This would prevent the rapid re-render storm on iOS.What alternative solutions did you explore? (Optional)
Investigation details
Key evidence chain:
policyWillSplitReport=truetriggers at Duplicate.ts:1023-1026 — exact match for the repro conditions (instant submit, non-reimbursable)shouldDeferAutoSubmit=falsefor ALL expenses at line 1059 — server closes reports immediatelyisVisiblePreviewOrMoneyRequestat ReportActionsUtils.ts:1565-1569 hides actions wherependingAction === undefined && shouldShow === falseConfidence: Medium — The code path analysis strongly supports this hypothesis. The one unverified piece is confirming that the server actually sets
shouldShow=falseon the REPORT_PREVIEW actions for submitted-and-closed reports, which is server-side behavior.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.sosek108 commentedon Apr 28, 2026
May be duplicated or related to: #88955
situchan commentedon Apr 28, 2026
@sosek108 please also add this issue and test case in #88923
sosek108 commentedon Apr 28, 2026
@situchan done.
1 remaining item
melvin-bot commentedon Apr 28, 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.
JS00001 commentedon Apr 28, 2026
requesting retest
m-natarajan commentedon Apr 28, 2026
Not repro in iPhone13/26.3.1, v9.3.64-10. Observed blank space after step 5
ScreenRecording_04-28-2026.13-26-27_1.1.MP4
melvin-bot commentedon Apr 29, 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.
[-]iOS - Chat - WS chat becomes blank when opening and scrolling after duplicate expenses[/-][+][Due for payment 2026-05-07] iOS - Chat - WS chat becomes blank when opening and scrolling after duplicate expenses[/+]melvin-bot commentedon Apr 30, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.64-31 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-05-07. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Apr 30, 2026
@Krishna2323 / @situchan 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]
[-][Due for payment 2026-05-07] iOS - Chat - WS chat becomes blank when opening and scrolling after duplicate expenses[/-][+][Due for payment 2026-05-11] [Due for payment 2026-05-07] iOS - Chat - WS chat becomes blank when opening and scrolling after duplicate expenses[/+]melvin-bot commentedon May 4, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.65-6 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-05-11. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 4, 2026
@Krishna2323 / @situchan 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]