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-08-21] Spend - Submit, Hold and Move to report option are missing after moving expense to report #98494
👋 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: #95902 - "fix: Preserve all matching selection after deselecting an expense" by @emkhalid (Medium confidence) Related Issues: none
Recommendation: REVERT
This PR rewrote the entire Search selection machinery (SearchSelectionProvider, SearchWriteActionsProvider, useSearchBulkActions, Search.ts), replacing the old isRefreshingSelection refresh with a reconcile effect. The bug's symptom — the per-transaction bulk-action metadata staying stale until a fresh server search — matches a regression in that new refresh path, and it is the only selection-system change in this deploy that isn't in production. If a clean revert is complicated by dependent selection PRs, roll forward with a targeted fix that re-derives the selected transaction's action / canHold / canChangeReport after a move-to-report action instead.
Assigned: @emkhalid (PR author), @Valforte, @mkhutornyi (approving reviewers) from the highest-confidence causing PR Labels: No change. Only DeployBlockerCash is present; this is a Frontend bug so the App deploy remains blocked. (DeployBlocker/Web label is not present, so nothing to remove.)
📋 Detailed Analysis
Evidence
The three missing options in the Spend › Expenses bulk dropdown are each gated purely on the selected-transaction metadata, not on live data:
These three fields are all produced by mapTransactionItemToSelectedEntry, which derives them from the search snapshot item (item.action, item.report, item.reportAction) at selection/reconcile time (selectionBuilders.ts#L54-L97). If that metadata reflects the pre-move (unreported) state, all three options vanish together — exactly the reported symptom.
The options reappear only after reopening Spend › Expenses, i.e. after a fresh server search repopulates the snapshot with the new report context. That "stale until re-fetch" behavior is a selection-refresh problem, not a backend error.
PR fix: Preserve all matching selection after deselecting an expense #95902 (merged 2026-08-11, in the 9.4.53 staging checklist, not in production 9.4.52) is the single change in this deploy that reworked this exact system. It replaced the former isRefreshingSelection flag with a reconcile effect and changed how the selected-transaction entries are built and refreshed.
Verification
Affected files confirmed touched by fix: Preserve all matching selection after deselecting an expense #95902: src/components/Search/SearchSelectionProvider.tsx, src/components/Search/SearchWriteActionsProvider.tsx, src/hooks/useSearchBulkActions.ts, src/components/Search/selectionBuilders.ts (via its callers), and src/libs/actions/Search.ts.
The reconcile effect that is supposed to refresh selected-transaction metadata when the underlying data changes intentionally omits selectedTransactions/excludedTransactions from its dependency array and reads them from closure (SearchWriteActionsProvider.tsx#L318-L330); the design note about replacing isRefreshingSelection is at SearchSelectionProvider.tsx#L82-L88. This is the plausible mechanism by which the moved transaction's entry is not refreshed to the new report context.
Reproducible on staging (9.4.53-0), not on production (9.4.52) — consistent with a regression from a PR that is on staging only.
Root Cause
After moving an unreported expense to a newly-created report from Search, the selected transaction's cached metadata (action, canHold, canChangeReport) continues to reflect the pre-move unreported state. Because Submit/Hold/Move to report are each gated on that cached metadata, none of them render until a fresh server search rebuilds the snapshot. The selection-refresh/reconcile rework in #95902 is the most likely origin of the stale metadata. A secondary suspect, #97227 (hold/reject builders), only touches the Hold/Reject gating and cannot by itself explain Submit and Move to report also disappearing, so it is ranked lower.
I disagree with Melvin assessment here, and believe the root cause to be #98305. I'd say we don't block on it and try to work on a quick fix as the original PR is worth keeping
changed the title [-]Spend - Submit, Hold and Move to report option are missing after moving expense to report[/-][+][Due for payment 2026-08-21] Spend - Submit, Hold and Move to report option are missing after moving expense to report[/+]on Aug 14, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.53-10 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-08-21. 🎊
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 Aug 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/595b4d0e1b868a6eeef0594f020aefa76a70abb95b3ea69e1b363ce3184fa181
melvin-bot commentedon Aug 12, 2026
Triggered auto assignment to @MonilBhavsar (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Aug 12, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Aug 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 Aug 12, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #95902 - "fix: Preserve all matching selection after deselecting an expense" by @emkhalid (Medium confidence)
Related Issues: none
Recommendation: REVERT
This PR rewrote the entire Search selection machinery (
SearchSelectionProvider,SearchWriteActionsProvider,useSearchBulkActions,Search.ts), replacing the oldisRefreshingSelectionrefresh with a reconcile effect. The bug's symptom — the per-transaction bulk-action metadata staying stale until a fresh server search — matches a regression in that new refresh path, and it is the only selection-system change in this deploy that isn't in production. If a clean revert is complicated by dependent selection PRs, roll forward with a targeted fix that re-derives the selected transaction'saction/canHold/canChangeReportafter a move-to-report action instead.Assigned: @emkhalid (PR author), @Valforte, @mkhutornyi (approving reviewers) from the highest-confidence causing PR
Labels: No change. Only
DeployBlockerCashis present; this is a Frontend bug so the App deploy remains blocked. (DeployBlocker/Web label is not present, so nothing to remove.)📋 Detailed Analysis
Evidence
action === SUBMIT(useSearchBulkActions.ts#L2073-L2084)canHold(useSearchBulkActions.ts#L2216-L2218)canChangeReport(useSearchBulkActions.ts#L2339-L2347)mapTransactionItemToSelectedEntry, which derives them from the search snapshot item (item.action,item.report,item.reportAction) at selection/reconcile time (selectionBuilders.ts#L54-L97). If that metadata reflects the pre-move (unreported) state, all three options vanish together — exactly the reported symptom.isRefreshingSelectionflag with a reconcile effect and changed how the selected-transaction entries are built and refreshed.Verification
src/components/Search/SearchSelectionProvider.tsx,src/components/Search/SearchWriteActionsProvider.tsx,src/hooks/useSearchBulkActions.ts,src/components/Search/selectionBuilders.ts(via its callers), andsrc/libs/actions/Search.ts.selectedTransactions/excludedTransactionsfrom its dependency array and reads them from closure (SearchWriteActionsProvider.tsx#L318-L330); the design note about replacingisRefreshingSelectionis at SearchSelectionProvider.tsx#L82-L88. This is the plausible mechanism by which the moved transaction's entry is not refreshed to the new report context.Root Cause
After moving an unreported expense to a newly-created report from Search, the selected transaction's cached metadata (
action,canHold,canChangeReport) continues to reflect the pre-move unreported state. Because Submit/Hold/Move to report are each gated on that cached metadata, none of them render until a fresh server search rebuilds the snapshot. The selection-refresh/reconcile rework in #95902 is the most likely origin of the stale metadata. A secondary suspect, #97227 (hold/reject builders), only touches the Hold/Reject gating and cannot by itself explain Submit and Move to report also disappearing, so it is ranked lower.Valforte commentedon Aug 12, 2026
I disagree with Melvin assessment here, and believe the root cause to be #98305. I'd say we don't block on it and try to work on a quick fix as the original PR is worth keeping
mkhutornyi commentedon Aug 12, 2026
Checking
6 remaining items
melvin-bot commentedon Aug 13, 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.
melvin-bot commentedon Aug 13, 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.
melvin-bot commentedon Aug 13, 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.
[-]Spend - Submit, Hold and Move to report option are missing after moving expense to report[/-][+][Due for payment 2026-08-21] Spend - Submit, Hold and Move to report option are missing after moving expense to report[/+]melvin-bot commentedon Aug 14, 2026
@mkhutornyi
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.53-10 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-08-21. 🎊
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]