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-04-30] Expense - Selection mode inconsistency after bulk duplicating expenses on Inbox and Reports #87609
Version Number: 9.3.58-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:#84657 Email or phone of affected tester (no customers):jsdjosidjiojisojio3@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: iPhone 15 Pro Max / iOS 26.3 App Component: Search
Action Performed:
Launch Expensify app.
Go to workspace chat.
Create two expenses.
Open the report.
Bulk select all expenses.
Tap dropdown button > Duplicate expenses.
→ Selection mode remains after bulk duplicating expenses.
Go to Reports > Expenses.
Bulk select all expenses.
Tap dropdown button > Duplicate expenses.
→ Selection mode exits after bulk duplicating expenses.
Expected Result:
After bulk duplicating expenses from Inbox and Reports, selection mode should behave the same.
Actual Result:
In Step 6, after bulk duplicating expenses from Inbox, selection mode remains.
In Step 9, after bulk duplicating expenses from Reports, selection mode exits.
👋 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.
Investigation Summary: Frontend bug. Causing PR: #84657 "[Duplicate Expense] Allow bulk duplication." by @Krishna2323 (High confidence). Related: #84281. Recommendation: REVERT. The PR introduced an inconsistency in how clearSelectedTransactions is called after bulk duplication from different screens. Assigned: @Krishna2323 (author), @situchan@JS00001 (approving reviewers). Labels: DeployBlockerCash retained.
When bulk duplicating from Inbox/Report context, the onAfterDuplicate callback at MoneyReportHeader.tsx:2040 and MoneyRequestReportActionsList.tsx:896 calls clearSelectedTransactions(true). This boolean overload in SearchContext.tsx:255-259 only clears the selected transaction IDs via setSelectedTransactions([]) and returns early — it never sets shouldTurnOffSelectionMode and never calls turnOffMobileSelectionMode().
In the Search/Reports path, no onAfterDuplicate is provided, so useBulkDuplicateAction.ts:85 calls clearSelectedTransactions(undefined, true) instead, which sets shouldTurnOffSelectionMode: true in context state. An effect in Search/index.tsx:367-370 then picks that up and calls turnOffMobileSelectionMode(). The Report/Inbox path has no equivalent mechanism.
What changes do you think we should make in order to solve the problem?
Add turnOffMobileSelectionMode() to the onAfterDuplicate callback in both MoneyReportHeader.tsx and MoneyRequestReportActionsList.tsx:
MoneyReportHeader already imports turnOffMobileSelectionMode (line 48). MoneyRequestReportActionsList will need the import added.
What alternative solutions did you explore? (Optional)
An alternative would be to modify clearSelectedTransactions so the boolean overload also accepts and processes shouldTurnOffSelectionMode. However, the simpler fix of calling turnOffMobileSelectionMode() directly is consistent with how the back button already works in MoneyReportHeader.tsx:2024-2025.
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.
Detailed Analysis: The bug is a mismatch in how clearSelectedTransactions is invoked after bulk duplication depending on the screen. In the Inbox (workspace chat / report view), MoneyRequestReportActionsList.tsx line 896 passes onAfterDuplicate={() => clearSelectedTransactions(true)} to BulkDuplicateHandler. In SearchContext.tsx, when clearSelectedTransactions receives a boolean true as its first argument, it takes the short path: setSelectedTransactions([]) — only clearing selectedTransactionIDs, but NOT setting shouldTurnOffSelectionMode to true. So the mobile selection mode UI stays active (bug). In Reports > Expenses (Search page), no onAfterDuplicate is passed, so useBulkDuplicateAction falls back to clearSelectedTransactions(undefined, true). The second argument sets shouldTurnOffSelectionMode: true in context state. A useEffect in Search/index.tsx (line 368) then detects the empty selection combined with that flag and calls turnOffMobileSelectionMode() — correctly exiting selection mode. The precise fix is to change line 896 in MoneyRequestReportActionsList.tsx to call clearSelectedTransactions(undefined, true) instead of clearSelectedTransactions(true). However since this is a new staging-only feature, reverting PR #84657 is the safest path.
changed the title [-]Expense - Selection mode inconsistency after bulk duplicating expenses on Inbox and Reports[/-][+][Due for payment 2026-04-30] Expense - Selection mode inconsistency after bulk duplicating expenses on Inbox and Reports[/+]on Apr 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.61-4 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 10, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #84657
melvin-bot commentedon Apr 10, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Apr 10, 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 10, 2026
Investigation Summary: Frontend bug. Causing PR: #84657 "[Duplicate Expense] Allow bulk duplication." by @Krishna2323 (High confidence). Related: #84281. Recommendation: REVERT. The PR introduced an inconsistency in how clearSelectedTransactions is called after bulk duplication from different screens. Assigned: @Krishna2323 (author), @situchan @JS00001 (approving reviewers). Labels: DeployBlockerCash retained.
MelvinBot commentedon Apr 10, 2026
Proposal
What is the root cause of that problem?
When bulk duplicating from Inbox/Report context, the
onAfterDuplicatecallback atMoneyReportHeader.tsx:2040andMoneyRequestReportActionsList.tsx:896callsclearSelectedTransactions(true). This boolean overload inSearchContext.tsx:255-259only clears the selected transaction IDs viasetSelectedTransactions([])and returns early — it never setsshouldTurnOffSelectionModeand never callsturnOffMobileSelectionMode().In the Search/Reports path, no
onAfterDuplicateis provided, souseBulkDuplicateAction.ts:85callsclearSelectedTransactions(undefined, true)instead, which setsshouldTurnOffSelectionMode: truein context state. An effect inSearch/index.tsx:367-370then picks that up and callsturnOffMobileSelectionMode(). The Report/Inbox path has no equivalent mechanism.What changes do you think we should make in order to solve the problem?
Add
turnOffMobileSelectionMode()to theonAfterDuplicatecallback in bothMoneyReportHeader.tsxandMoneyRequestReportActionsList.tsx:MoneyReportHeaderalready importsturnOffMobileSelectionMode(line 48).MoneyRequestReportActionsListwill need the import added.What alternative solutions did you explore? (Optional)
An alternative would be to modify
clearSelectedTransactionsso the boolean overload also accepts and processesshouldTurnOffSelectionMode. However, the simpler fix of callingturnOffMobileSelectionMode()directly is consistent with how the back button already works inMoneyReportHeader.tsx:2024-2025.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.OSBotify commentedon Apr 10, 2026
Detailed Analysis: The bug is a mismatch in how clearSelectedTransactions is invoked after bulk duplication depending on the screen. In the Inbox (workspace chat / report view), MoneyRequestReportActionsList.tsx line 896 passes onAfterDuplicate={() => clearSelectedTransactions(true)} to BulkDuplicateHandler. In SearchContext.tsx, when clearSelectedTransactions receives a boolean true as its first argument, it takes the short path: setSelectedTransactions([]) — only clearing selectedTransactionIDs, but NOT setting shouldTurnOffSelectionMode to true. So the mobile selection mode UI stays active (bug). In Reports > Expenses (Search page), no onAfterDuplicate is passed, so useBulkDuplicateAction falls back to clearSelectedTransactions(undefined, true). The second argument sets shouldTurnOffSelectionMode: true in context state. A useEffect in Search/index.tsx (line 368) then detects the empty selection combined with that flag and calls turnOffMobileSelectionMode() — correctly exiting selection mode. The precise fix is to change line 896 in MoneyRequestReportActionsList.tsx to call clearSelectedTransactions(undefined, true) instead of clearSelectedTransactions(true). However since this is a new staging-only feature, reverting PR #84657 is the safest path.
situchan commentedon Apr 10, 2026
This feature is gated behind production so we can demote.
4 remaining items
Krishna2323 commentedon Apr 13, 2026
PR fixing this issue is up: #87697
cc: @situchan
JS00001 commentedon Apr 17, 2026
PR to fix this blocker is merged: #87697
melvin-bot commentedon Apr 21, 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.
[-]Expense - Selection mode inconsistency after bulk duplicating expenses on Inbox and Reports[/-][+][Due for payment 2026-04-30] Expense - Selection mode inconsistency after bulk duplicating expenses on Inbox and Reports[/+]melvin-bot commentedon Apr 23, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Apr 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.61-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-04-30. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Apr 23, 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]