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-07-17] Original expense briefly appears after splitting an expense #95700
👋 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.
🤖 Automated analysis — High confidence. This is a deploy-blocker regression traced to a recently merged PR.
What is the root cause of that problem?
The split logic is correct: it optimistically hides the original expense by moving its reportID to SPLIT_REPORT_ID (-2) while adding the child splits to the report — see SplitTransactionUpdate.ts:1475-1490. The end state is right; the bug is a timing flicker.
The workspace-chat expense list is rendered from the REPORT_TRANSACTIONS_AND_VIOLATIONSOnyxDerived value (via useReportTransactionsCollection.ts:20), which buckets transactions by reportID.
Expensify/App#95287 — "Coalesce OnyxDerived recomputations via macrotask scheduling" (merged 2026-07-08, one day before this report; author fabioh8010) — changed that derived value from recomputing synchronously to a deferred macrotask (OnyxDerived/index.ts:195-200, scheduleMacrotask.ts). The raw TRANSACTION Onyx writes from the split now broadcast to the UI before the derived recompute runs, so the list renders for one frame with the child splits already added but the original not yet removed. One macrotask later the recompute lands and the original disappears — exactly the reported "briefly appears, then removed."
This matches every symptom: web-only (the MessageChannel fast-path is web-only), staging-only (PR not yet in production), and self-correcting after a beat.
Investigation details & evidence
List source:MoneyRequestReportView → useReportTransactionsCollection(reportID) → reads DERIVED.REPORT_TRANSACTIONS_AND_VIOLATIONS, selecting [reportID].transactions.
Correct end state:reportTransactionsAndViolations.ts:57-109 tracks each transaction's previous reportID and deletes it from the old bucket before adding to the new one — so once the recompute runs the original is gone. The defect is purely when it runs.
Optimistic hide is immediate, not server-dependent: the original's reportID flip to -2 uses Onyx.SET with the comment "to prevent UI inconsistency" (SplitTransactionUpdate.ts:1477). No backend round-trip is involved in the flicker.
Alternatives ruled out: Search-snapshot path (useOptimisticSearchTracking) is correctly maintained by the split action but is not the data source for the workspace-chat list, so it isn't the cause here. The split's own optimistic data is not the problem — reverting the derived-value timing change makes the flicker disappear.
Timing:#95287 merged 2026-07-08 16:51 UTC; issue filed 2026-07-09 on staging 9.4.32-0; not reproducible in production.
What changes do you think we should make in order to solve the problem?
Because this is a deploy blocker, the safest unblock is to revert / CP-revert Expensify/App#95287 (cc fabioh8010), which changed global derived-value timing.
If the coalescing optimization should be kept, the targeted fix is to let list-critical derived values (at minimum reportTransactionsAndViolations) recompute synchronously rather than on a deferred macrotask — e.g. a per-config synchronous/deferred flag consumed at the scheduling point in OnyxDerived/index.ts:195-200, keeping macrotask coalescing only for non-visual derived values.
What alternative solutions did you explore? (Optional)
Batching the original-removal and child-add writes into a single Onyx update so the coalesced recompute never observes an intermediate state — more fragile, since recompute timing is now decoupled from the write regardless.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/95700) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-]Original expense briefly appears after splitting an expense[/-][+][Due for payment 2026-07-17] Original expense briefly appears after splitting an expense[/+]on Jul 10, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.32-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@inimaga 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]
@inimaga 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 Jul 9, 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/fc2baeb5701222bb1f824fc9ea48d9f9c7c1adf6422f45ea1505508536593347
melvin-bot commentedon Jul 9, 2026
Triggered auto assignment to @inimaga (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Jul 9, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jul 9, 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 Jul 9, 2026
Proposal
What is the root cause of that problem?
The split logic is correct: it optimistically hides the original expense by moving its
reportIDtoSPLIT_REPORT_ID(-2) while adding the child splits to the report — seeSplitTransactionUpdate.ts:1475-1490. The end state is right; the bug is a timing flicker.The workspace-chat expense list is rendered from the
REPORT_TRANSACTIONS_AND_VIOLATIONSOnyxDerived value (viauseReportTransactionsCollection.ts:20), which buckets transactions byreportID.Expensify/App#95287— "Coalesce OnyxDerived recomputations via macrotask scheduling" (merged 2026-07-08, one day before this report; authorfabioh8010) — changed that derived value from recomputing synchronously to a deferred macrotask (OnyxDerived/index.ts:195-200,scheduleMacrotask.ts). The rawTRANSACTIONOnyx writes from the split now broadcast to the UI before the derived recompute runs, so the list renders for one frame with the child splits already added but the original not yet removed. One macrotask later the recompute lands and the original disappears — exactly the reported "briefly appears, then removed."This matches every symptom: web-only (the
MessageChannelfast-path is web-only), staging-only (PR not yet in production), and self-correcting after a beat.Investigation details & evidence
MoneyRequestReportView→useReportTransactionsCollection(reportID)→ readsDERIVED.REPORT_TRANSACTIONS_AND_VIOLATIONS, selecting[reportID].transactions.reportTransactionsAndViolations.ts:57-109tracks each transaction's previousreportIDand deletes it from the old bucket before adding to the new one — so once the recompute runs the original is gone. The defect is purely when it runs.reportIDflip to-2usesOnyx.SETwith the comment "to prevent UI inconsistency" (SplitTransactionUpdate.ts:1477). No backend round-trip is involved in the flicker.useOptimisticSearchTracking) is correctly maintained by the split action but is not the data source for the workspace-chat list, so it isn't the cause here. The split's own optimistic data is not the problem — reverting the derived-value timing change makes the flicker disappear.#95287merged 2026-07-08 16:51 UTC; issue filed 2026-07-09 on staging 9.4.32-0; not reproducible in production.What changes do you think we should make in order to solve the problem?
Because this is a deploy blocker, the safest unblock is to revert / CP-revert
Expensify/App#95287(ccfabioh8010), which changed global derived-value timing.If the coalescing optimization should be kept, the targeted fix is to let list-critical derived values (at minimum
reportTransactionsAndViolations) recompute synchronously rather than on a deferred macrotask — e.g. a per-configsynchronous/deferredflag consumed at the scheduling point inOnyxDerived/index.ts:195-200, keeping macrotask coalescing only for non-visual derived values.What alternative solutions did you explore? (Optional)
Batching the original-removal and child-add writes into a single Onyx update so the coalesced recompute never observes an intermediate state — more fragile, since recompute timing is now decoupled from the write regardless.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/95700)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
m-natarajan commentedon Jul 9, 2026
Chrome / v9.4.32-1
Repro
REC-20260709205158.mp4
inimaga commentedon Jul 10, 2026
Retest requested here
IuliiaHerets commentedon Jul 10, 2026
Issue is not reproducible on Windows 11 / Chrome in v9.4.32-3
bandicam.2026-07-10.15-10-02-348.mp4
1 remaining item
[-]Original expense briefly appears after splitting an expense[/-][+][Due for payment 2026-07-17] Original expense briefly appears after splitting an expense[/+]melvin-bot commentedon Jul 10, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jul 10, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.32-3 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-07-17. 🎊
melvin-bot commentedon Jul 10, 2026
@inimaga 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]
melvin-bot commentedon Jul 14, 2026
@inimaga 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]
lanitochka17 commentedon Jul 28, 2026
Deploy Blocker #97250 was identified to be related to the PR #96785 that attempted to fix this issue.