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-25] Web - Spend - Report still in Workspace 1 filter after change it to another #98723
👋 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.
Most likely cause:#98558 — "reland Search re-fire fix" (reland of #98305), by BartekObudzinski. High confidence.
Recommended action:Roll forward with a targeted fix — call refreshSearchAfterReportAction from the Change Workspace flow (or broaden the non-chat re-fire check to detect changed report-level fields like policyID). A revert of #98558 works as a fallback but is worse: it was itself a reland that closed four other deploy blockers (#98494, #98502, #98543, #98544) and cut ~26% of Search API calls.
This is a frontend regression, fixable entirely within Expensify/App.
Root cause
Search rows for a non-chat query (Spend → Report → Filter: Workspace 1) are rendered from the server-computed snapshot_<hash>. Nothing re-filters that snapshot client-side, so a moved report only leaves the Workspace 1 view after a refetch from the backend.
#98558 narrowed when a non-chat search refetches. The trigger now fires only on a transaction-ID change or a displayed transaction's value/identity change:
The Change Workspace flow (changeReportPolicy) optimistically writes only report_<id>.policyID; it touches the transactions_<id> collection only when the destination workspace has a different currency:
So for the common same-currency case (Workspace 1 → Workspace 4), no transaction ID or value changes → the re-fire logic sees nothing changed → no refetch → the stale snapshot keeps showing the report under the Workspace 1 filter. Before #98305/#98558, non-chat searches refetched on essentially any report action, which is why it works in production and regresses on staging v9.4.54-1.
#98558's own description confirms the gap: move/remove-from-report are covered because they write transactions_<id>.reportID (caught by the identity check), and bulk submit got an explicit refreshSearchAfterReportAction call "because submitting touches no transaction." Change Workspace has the identical property — it touches no transaction — but was not given the same escape hatch.
This looks like a recurring, mechanically detectable pattern, so it may be worth a coding-standards rule so the AI reviewer catches the next one. Proposed for Expensify/App:
Rule:CONSISTENCY-18 — Trigger a Search refetch when optimistically mutating report-level fields shown in Search
Condition: An action optimistically merges a Search-displayed report-level field (e.g. policyID, statusNum, stateNum) into a ${ONYXKEYS.COLLECTION.REPORT} key without also writing the ${ONYXKEYS.COLLECTION.TRANSACTION} collection or calling refreshSearchAfterReportAction. Flag it and add the Search refresh.
Why: The non-chat Search re-fire only reacts to transaction ID/value changes, so a report-only mutation leaves the server-computed snapshot stale (this deploy blocker). Mechanism: useSearchHighlightAndScroll.ts:104-111.
Search pattern: In src/libs/actions/**, functions building optimisticData with key: \${ONYXKEYS.COLLECTION.REPORT}...`that mutatepolicyID/stateNum/statusNumbut have no${ONYXKEYS.COLLECTION.TRANSACTION}write and norefreshSearchAfterReportAction` reference.
changed the title [-]Web - Spend - Report still in Workspace 1 filter after change it to another[/-][+][Due for payment 2026-08-25] Web - Spend - Report still in Workspace 1 filter after change it to another[/+]on Aug 18, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.54-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-08-25. 🎊
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 16, 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/946d05c5ac4c4b0bd2b3d96a12c609386c3fe241b48b0400cc659ea1624b74b3
melvin-bot commentedon Aug 16, 2026
Triggered auto assignment to @stitesExpensify (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Aug 16, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Aug 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:
MelvinBot commentedon Aug 16, 2026
Deploy Blocker Investigation
Most likely cause: #98558 — "reland Search re-fire fix" (reland of #98305), by
BartekObudzinski. High confidence.Recommended action: Roll forward with a targeted fix — call
refreshSearchAfterReportActionfrom the Change Workspace flow (or broaden the non-chat re-fire check to detect changed report-level fields likepolicyID). A revert of #98558 works as a fallback but is worse: it was itself a reland that closed four other deploy blockers (#98494, #98502, #98543, #98544) and cut ~26% of Search API calls.This is a frontend regression, fixable entirely within
Expensify/App.Root cause
Search rows for a non-chat query (Spend → Report → Filter: Workspace 1) are rendered from the server-computed
snapshot_<hash>. Nothing re-filters that snapshot client-side, so a moved report only leaves the Workspace 1 view after a refetch from the backend.#98558 narrowed when a non-chat search refetches. The trigger now fires only on a transaction-ID change or a displayed transaction's value/identity change:
src/hooks/useSearchHighlightAndScroll.ts:104-111The Change Workspace flow (
changeReportPolicy) optimistically writes onlyreport_<id>.policyID; it touches thetransactions_<id>collection only when the destination workspace has a different currency:src/libs/actions/Report/index.ts:8083So for the common same-currency case (Workspace 1 → Workspace 4), no transaction ID or value changes → the re-fire logic sees nothing changed → no refetch → the stale snapshot keeps showing the report under the Workspace 1 filter. Before #98305/#98558, non-chat searches refetched on essentially any report action, which is why it works in production and regresses on staging v9.4.54-1.
#98558's own description confirms the gap: move/remove-from-report are covered because they write
transactions_<id>.reportID(caught by the identity check), and bulk submit got an explicitrefreshSearchAfterReportActioncall "because submitting touches no transaction." Change Workspace has the identical property — it touches no transaction — but was not given the same escape hatch.The escape hatch already exists and is used for approve/pay/submit:
src/libs/SearchRefreshUtils.ts:15, e.g.src/hooks/useSearchBulkActions.ts:2167.Alternatives considered (ruled out)
policyIDstill present in the whitelist and stable selector; does not alter refetch behavior.transactions_<id>.reportID, so Search refetches correctly.💡 Suggested AI code review rule
This looks like a recurring, mechanically detectable pattern, so it may be worth a coding-standards rule so the AI reviewer catches the next one. Proposed for
Expensify/App:CONSISTENCY-18— Trigger a Search refetch when optimistically mutating report-level fields shown in SearchpolicyID,statusNum,stateNum) into a${ONYXKEYS.COLLECTION.REPORT}key without also writing the${ONYXKEYS.COLLECTION.TRANSACTION}collection or callingrefreshSearchAfterReportAction. Flag it and add the Search refresh.useSearchHighlightAndScroll.ts:104-111.src/libs/actions/**, functions buildingoptimisticDatawithkey: \${ONYXKEYS.COLLECTION.REPORT}...`that mutatepolicyID/stateNum/statusNumbut have no${ONYXKEYS.COLLECTION.TRANSACTION}write and norefreshSearchAfterReportAction` reference.changeReportPolicyinsrc/libs/actions/Report/index.ts:8083useSearchBulkActions.ts:2167If it's worth adding, a maintainer can open it as a draft PR in
Expensify/Appin thecoding-standardsskill's format.Next Steps: Reply with
@MelvinBot implement thisto open a draft PR with the targeted fix, or@MelvinBot <feedback>to refine.IuliiaHerets commentedon Aug 17, 2026
Chrome / v9.4.54-2
Not repro
577bf94bd1a400a3945c0ea44f750632.mp4
[-]Web - Spend - Report still in Workspace 1 filter after change it to another[/-][+][Due for payment 2026-08-25] Web - Spend - Report still in Workspace 1 filter after change it to another[/+]melvin-bot commentedon Aug 18, 2026
@QichenZhu
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.54-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-08-25. 🎊
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]