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
[$250] No a report action message appeared after user move expense from report A to B #96326
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
When an expense is moved between reports in NewDot, the client entry point is changeTransactionsReport in src/libs/actions/Transaction.ts. The "moved this expense from Report A" system message (a MOVED_TRANSACTION report action) is built optimistically here — but it is only ever attached to the transaction thread report, never to the destination Report B's top-level chat, and it is only created at all when the source report is not open.
Two things combine to produce "no message on Report B":
The moved action targets the transaction thread, not Report B. The optimistic MOVED_TRANSACTION action is pushed to Onyx under ${REPORT_ACTIONS}${transactionThreadReportID} (Transaction.ts:1595-1613), and the builder hardcodes reportID: transactionThreadReportID with only a fromReportID in the original message (ReportUtils.ts:7442-7487). The top-level Report B chat only receives the IOU/money-request preview action (Transaction.ts:1436-1445).
A gate suppresses the action for open source reports. The action is only built in the else if (!isOpenReport(oldReport)) branch (Transaction.ts:1587-1593). If Report A is an open/draft report, movedAction stays undefined and no moved message is created anywhere.
Because this is reproducible on staging but not production, and Transaction.ts has seen heavy recent churn around the merge/move-report feature (e.g. the feat/mergeReports-action work and "fix chat - Unexpected error on opening moved report reply thread"), this looks like a recent regression in where the moved action is placed.
What changes do you think we should make in order to solve the problem?
Ensure a moved report action lands on the destination report (Report B) — not only on the transaction thread — so the "moved this expense from Report A" message is visible when the user opens Report B, matching production behavior. Concretely, in changeTransactionsReport, additionally build/attach a moved (or IOU) report action keyed on the destination reportID (Report B), and re-check the !isOpenReport(oldReport) gate so a valid move between two workspace reports isn't silently dropped.
Backend command is CHANGE_TRANSACTIONS_REPORT (Transaction.ts:1926); the moved message text is generated client-side, so this is not primarily a backend issue.
Alternative explanation considered: the message may in fact be created on the transaction thread (nested under B) and the tester simply expected it on Report B's top-level chat. Worth confirming the intended product placement.
Open questions:
Was source Report A an open/draft report in the repro? (determines whether the !isOpenReport gate is the exact cause)
Product intent: should "moved this expense from A" appear on the top-level destination chat, on the transaction thread, or both?
Confidence: Medium — code paths are confirmed, but the exact mechanism (gate vs. thread-only placement) and the regressing PR aren't yet pinned down.
Possibly related:#93799 (unreported expenses can't be moved — missing IOU report action) and #95866 (error opening moved report reply thread) touch the same move-report code.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/96326) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
When an expense is moved from Report A to Report B, a report action message should be created in Report B indicating the expense was moved. The root cause is that the action that handles moving expenses likely creates a "moved" report action only in Report A (source report) but fails to create/display the corresponding action in Report B (destination report), so the recipient report never shows the "moved this expense from Report A" message.
What changes do you think we should make in order to solve the problem?
I'd look at the IOU action handler responsible for moving expenses — likely in src/libs/actions/IOU.ts. When moving an expense, we need to ensure a MOVED report action is optimistically created and added to Report B's action list.
// In the moveMoneyRequest or equivalent function in src/libs/actions/IOU.ts
+ const movedReportAction = ReportUtils.buildOptimisticMovedReportAction(+ sourceReportID,+ destinationReportID,+ amount,+ currency,+ );
const optimisticData = [
// ... existing optimistic data for Report A
+ {+ onyxMethod: Onyx.METHOD.MERGE,+ key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${destinationReportID}`,+ value: {+ [movedReportAction.reportActionID]: movedReportAction,+ },+ },
];
This ensures Report B's action list gets the "moved this expense from Report A" message optimistically, and the server response should confirm it.
What alternative solutions did you explore?
An alternative would be to trigger a re-fetch of Report B's actions after the move completes, but that's less reliable and introduces latency — the optimistic approach above is more consistent with the existing patterns in the codebase.
Please re-state the problem that we are trying to solve in this issue.
When a user moves an expense from Report A to Report B on Web (NewDot), and Report A is still in the OPEN state (e.g. was just created in OldDot with an expense but never submitted), opening Report B shows no "moved this expense from Report A" report action message. The expected behavior is that a MOVED_TRANSACTION report action is created describing the source report so the destination report reflects where the expense came from.
What is the root cause of that problem?
In src/libs/actions/Transaction.ts:1591, changeTransactionsReport only builds the optimistic buildOptimisticMovedTransactionAction when the source report is NOT open (!isOpenReport(oldReport)). isOpenReport in src/libs/ReportUtils.ts:1994-1996 returns true when stateNum === OPEN && statusNum === OPEN, which is exactly the state of Report A in the repro (created in OldDot, expense added, never submitted before moving). So the movedAction is never produced (line 1588 let movedAction; remains undefined), the optimistic push at line 1595-1600 is skipped, and no "moved this expense from Report A" action ever gets written to the transaction thread that Report B surfaces. The UNREPORTED branch at line 1589 also doesn't apply because the destination is a real report (Report B), not the unreported/self‑DM sentinel.
What changes do you think we should make in order to solve the problem?
src/libs/actions/Transaction.ts:1587-1593 — Remove the !isOpenReport(oldReport) gate for the report-to-report move case. When reportID !== CONST.REPORT.UNREPORTED_REPORT_ID and oldReportID is a real report distinct from the destination, always call buildOptimisticMovedTransactionAction(transactionThreadReportID, oldReportID) so the destination reflects the origin regardless of the source report's state.
Keep the existing UNREPORTED_REPORT_ID branch (line 1589-1590) that produces the UNREPORTED_TRANSACTION action — only the second branch's isOpenReport guard needs to go.
Verify the produced action still routes correctly: it is pushed to ${REPORT_ACTIONS}${transactionThreadReportID} (line 1598), and movedReportActionID is threaded into transactionIDToReportActionAndThreadData at line 1617 so the backend ChangeTransactionsReport command receives the same optimistic ID.
Add/adjust a unit test around changeTransactionsReport covering the OPEN→OPEN move case (Report A open, Report B open) to lock in that movedAction is produced.
🚨 Edited by proposal-police: This proposal was edited at 2026-07-16 15:59:10 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
After moving an expense from Report A to Report B via the Report push row, no "moved this expense from Report A" system message appears on Report B. Staging-only regression (production shows the message).
What is the root cause of that problem?
This is a regression from PR #95979 (merged 2026-07-14, so it is on staging but not production — matching the repro matrix), which fixed #95866 by suppressing the optimistic MOVEDTRANSACTION action with a gate that is too broad.
Moving an expense between reports runs changeTransactionsReport. Step 7 builds the "moved this expense from…" action, but PR #95979 made it conditional on the source report not being open:
. Substituting the repro into the gate: destination is Report B (not UNREPORTED_REPORT_ID) → first branch false; !isOpenReport(oldReport) → false. So movedAction stays undefined and no optimistic action is written.
The same PR made movedReportActionID optional and it is now omitted from the API params (
), so the backend does not create the message either. The absence is total, not just optimistic — exactly what the tester sees.
Structural cause:#95866's actual bug scenario was the "Create report" flow — moving an expense out of its draft report into a brand-new optimistic report, where the backend never creates the message, so the optimistic action was orphaned and its reply thread errored. The fix keyed the suppression on the wrong discriminator: "source report is open" instead of "destination report is being created in this same action". Every ordinary move whose source happens to be unsubmitted (the most common state) lost its audit-trail message.
Affected call sites of changeTransactionsReport (all funnel through the same gate):
What changes do you think we should make in order to solve the problem?
Narrow the suppression to the scenario #95866 actually targeted: skip the moved message only when the expense is moving into a newly-created report. Add an optional isMovingToNewReport?: boolean to ChangeTransactionsReportProps and change the step-7 gate (
// Move ALL selected transactions to the new report
changeTransactionsReport({
This restores the message (optimistically AND server-side, since movedReportActionID is sent again) for moves between existing reports, while #95866's repro (expense → Report → Create report) stays fixed: destination is new + source open → still suppressed. Regression safety: the UNREPORTED_TRANSACTION branch, unreported→report moves (oldReport undefined → isOpenReport false), and all four create-report flows are unchanged. Update the PR's test in tests/actions/TransactionTest.ts to cover both cases.
Why the simple fix fails: plainly reverting the gate (else { movedAction = build… }) reintroduces #95866 — in the Create-report flow the backend never adopts the client rand64() ID, the optimistic action is orphaned, and opening its reply thread calls OpenReport with a parentReportActionID the server doesn't know, writing errorFields.createChatThread. Suppression must stay for that flow; it just must key on the destination being new, not on the source being open.
What alternative solutions did you explore? (Optional)
Revert PR #95979 — restores this message but reintroduces the #95866 reply-thread error. Incomplete.
Detect the new destination inside changeTransactionsReport (e.g. !allReports[report_ + reportID]) — no call-site changes, but timing-fragile: it depends on the useOnyx snapshot not yet containing the optimistic report. The explicit flag is deterministic.
Keep client suppression and have the backend create the message — the message would appear only after a round trip and never offline; the App-side flag fix above works optimistically and offline.
🚨 Edited by proposal-police: This proposal was edited at 2026-07-16 16:00:20 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When the user moves an expense from Report A to Report B (Report push row > select Report B), no "moved this expense from Report A" system message appears on Report B. This works in production but not on staging, so it is a regression.
What is the root cause of that problem?
This regressed in PR #95979 (commit 215eb86e328, "fix chat - Unexpected error on opening moved report reply thread", fixing #95866). That PR made changeTransactionsReport skip building the optimistic MOVED_TRANSACTION action whenever the source report is open:
The isOpenReport(oldReport) gate is far too broad. isOpenReport is just stateNum === OPEN && statusNum === OPEN, and virtually every report an expense can be moved out of is a draft in the open state — including Report A in this repro (reports created manually in OldDot are open). So the gate suppresses the audit message for the mainline "move expense between existing reports" flow, not just for the flow #95866 targeted. The suppression is also not merely cosmetic on the client: when movedAction is undefined, movedReportActionID is omitted from transactionIDToReportActionAndThreadData in the ChangeTransactionsReport API params (the PR even changed movedReportActionID to optional in ChangeTransactionsReportParams.ts), so the backend never receives the reportActionID it uses to create the system message either. The message therefore never appears — neither optimistically nor via Pusher — which is exactly what the tester sees on Report B.
The scenario #95866 actually needed to fix is much narrower: moving an expense into a report that was just created in the same interaction (expense > Report > "Create report"), where the backend intentionally creates no "moved" message and the orphaned optimistic action (with a client rand64() ID the server never adopted) errored when its reply thread was opened. In this issue's repro both Report A and Report B are pre-existing reports, the backend does create the message for that move (which is why production, without PR #95979, shows it persistently), but the client now suppresses it and withholds the ID from the API.
What changes do you think we should make in order to solve the problem?
We should narrow the suppression from "source report is open" to the actual #95866 case: the destination report was just created optimistically in the same flow. Add an optional isMovingToNewReport?: boolean to ChangeTransactionsReportProps and use it in step 7 of changeTransactionsReport:
Then pass isMovingToNewReport: true only from the call sites that create the target report with createNewReport right before moving: createReport in src/pages/DynamicNewReportWorkspaceSelectionPage.tsx and the createReportForPolicy path in src/pages/iou/request/step/IOURequestEditReport.tsx (its selectReport(item, report?) receives the optimistic report as the second argument only in the create flow, so isMovingToNewReport: !!report distinguishes it for free). All other callers (moving to an existing report from the Report push row, Search bulk move, AddExistingExpenseFooter) default to false and get the moved message back, and movedReportActionID is again sent to the backend so the server-created action matches the optimistic one. This preserves the #95866 fix exactly — its repro (create expense, don't submit, Report > Create report) still builds no moved action because the destination is the just-created draft and the source is open — while restoring the audit trail for genuine moves between existing reports, matching production behavior and the regression TC.
What alternative solutions did you explore? (Optional)
Reverting PR #95979 outright would restore this message but reintroduce the #95866 "Unexpected error" thread bug. We also considered detecting the just-created destination inside changeTransactionsReport via reportMetadata.isOptimisticReport instead of a new param, but the metadata write from createNewReport is queued asynchronously and may not have landed when changeTransactionsReport runs in the same tick, so an explicit caller flag is more reliable.
Please re-state the problem that we are trying to solve in this issue.
When a user moves an expense from Report A to Report B in NewDot, no "moved this expense from Report A" system message is added to the expense's report action history on Report B, even though the expense was successfully moved.
What is the root cause of that problem?
The optimistic report action for a moved expense is only built when the source report is not an "Open" (draft/unsubmitted) report. Report A in the repro is a freshly created report that hasn't been submitted yet, so it's in the Open state, and the code skips creating the MOVED_TRANSACTION action entirely.
isOpenReport is what determines this: it returns true only when both stateNum and statusNum are OPEN, i.e. exactly the state of a brand-new, unsubmitted report like Report A in this repro.
Because movedAction ends up undefined in this case, the subsequent block that pushes the optimistic/success/failure Onyx updates for the moved action is skipped, so no report action is ever written to the transaction thread, and the user never sees a "moved this expense from Report A" message on Report B.
What changes do you think we should make in order to solve the problem?
Always create the MOVED_TRANSACTION action when an expense is moved between two actual reports, regardless of the source report's state, so users get a system message describing the move whether the source report was a draft or already submitted.
Please re-state the problem that we are trying to solve in this issue.
After moving an expense from Report A to Report B, no "moved this expense from Report A" system message is shown, whereas regression TC 41237659 expects one.
What is the root cause of that problem?
This is not a regression — the message is being suppressed intentionally, and this TC hits exactly the case that was deliberately scoped for suppression.
In this TC, Report A is created in OldDot and the expense is moved out of it without submitting it, so Report A is still Open (stateNum: OPEN, statusNum: OPEN) — what the product surfaces as a Draft report:
Step 7 of changeTransactionsReport gates the moved system message on precisely that state, so for a draft source report movedAction stays undefined and no MOVED_TRANSACTION is built:
Because movedAction is undefined, movedReportActionID is also omitted from the ChangeTransactionsReport params, so nothing is created server-side either — which is why the message never appears, even after a refresh:
It is locked in by a unit test in tests/actions/TransactionTest.ts asserting noMOVED_TRANSACTION is created when an expense is moved out of a draft report, "because moves between drafts aren't part of the audit trail".
The "Reproducible in production: No" line is consistent with this: #95979 merged on Jul 14 and has only reached staging, so production still shows the old, pre-decision behavior.
What changes do you think we should make in order to solve the problem?
No App-side change. Restoring the message here would mean reverting an intentional, Slack-confirmed product decision and breaking the unit test that guards it.
The correct follow-up is to update regression TC 41237659 so that moving an expense out of a Draft report expects no moved system message, and to cover the message expectation with a source report that has been submitted instead.
One caveat worth confirming with the tester: if Report A was in fact submitted before the move, this is not the draft gate at all but the separate backend gap already flagged by @mkhutornyi in the same comment — "it looks like there's backend bug - system message isn't generated even when the action is taken on a Submitted report" — which was explicitly ruled out of scope for #95979 and needs a backend fix, not an App one. In that case this issue should be re-routed to an internal engineer rather than fixed in this repo.
What alternative solutions did you explore? (Optional)
Removing the !isOpenReport(oldReport) gate so the message is always built — rejected: it reverts the approved decision above, reintroduces #95866 (the phantom optimistic action the server never adopts, whose reply thread fails with genericCreateReportFailureMessage), and fails the existing test.
The missing message is intentional, documented behavior — not a code bug. Report A in this TC is created in OldDot with one expense and never submitted, so it is in the Draft (OPEN/OPEN) state, which is precisely the state the App was changed to suppress the moved message for.
Primary Root Cause:src/libs/actions/Transaction.ts, step 7 of getChangeTransactionsReportOnyxData. The moved action is only built when the source report is not open:
// 7. Add MOVED_TRANSACTION or UNREPORTED_TRANSACTION report actionsletmovedAction;if(reportID===CONST.REPORT.UNREPORTED_REPORT_ID){movedAction=buildOptimisticUnreportedTransactionAction(transactionThreadReportID,oldReportID);}elseif(!isOpenReport(oldReport)){movedAction=buildOptimisticMovedTransactionAction(transactionThreadReportID,oldReportID);}
oldReport is the source (Report A). For a Draft source isOpenReport(oldReport) is true, so movedAction stays undefined. No optimistic action is written, and — critically — movedReportActionID is then omitted from the API payload, so the backend never creates the message either.
Secondary Root Cause (the real "why absent even after refresh"):src/libs/API/parameters/ChangeTransactionsReportParams.ts. The type contract itself documents that this omission is by design:
/** * ... * movedReportActionID is omitted when the move doesn't create a system message (moves out of a draft report). * ... */typeTransactionThreadInfo={movedReportActionID?: string;
...
};
movedReportActionID is optional on purpose. The backend also does not generate the message for a Draft source, so the message is absent both optimistically and after sync — matching the video.
Confirmation it is intended, not incidental — tests/actions/TransactionTest.ts locks the behavior in with three cases that pass a plain existing destinationReport:
draft source → asserts 0MOVED_TRANSACTION ("moves between drafts aren't part of the audit trail")
submitted source → asserts 1MOVED_TRANSACTION
draft → personal space → asserts 1UNREPORTED_TRANSACTION
Affected Component(s): Money Requests — move expense between reports (changeTransactionsReport).
Bug Category: Model-vs-reality divergence — the regression TC encodes an expectation the product deliberately removed (stale test/spec), not a defect in the code.
Mechanism: Open Report A (Draft) → user moves expense → changeTransactionsReport runs → oldReport = Report A → isOpenReport(oldReport) === true → step-7 else if (!isOpenReport(oldReport)) is false → movedAction === undefined → no Onyx push AND movedReportActionID omitted from params → backend (which also suppresses for Draft sources) writes nothing → Report B shows no moved message.
What changes do you think we should make in order to solve the problem?
No App source change. Restoring the message for a Draft source would revert a deliberate decision, fail the three guarding tests, and re-open the phantom-optimistic-action problem the current gate was added to solve. The correct fix layer is the test case / spec, not the code.
Fix Option 1 (Recommended): Update regression TC 41237659 so that moving an expense out of a Draft Report A expects no "moved this expense from Report A" message. Keep steps 1–12; invert the step that asserts the message. To cover the message itself, add a variant that submits Report A before moving, since the code path for a submitted source does build the action:
// src/libs/actions/Transaction.ts (unchanged — this branch already fires for a submitted source)}elseif(!isOpenReport(oldReport)){movedAction=buildOptimisticMovedTransactionAction(transactionThreadReportID,oldReportID);}
Why best: it aligns the TC with the shipped behavior and the existing unit tests, and touches no production code — zero regression risk.
Fix Option 2 (Alternative, only if product reverses the decision): In src/libs/actions/Transaction.ts step 7, gate on the destination being newly created rather than the source being open, so genuine moves between two existing reports show the message while the "move into a just-created report" flow stays suppressed:
Trade-off: contradicts the current draft-source unit tests and the documented ChangeTransactionsReportParams contract; requires product sign-off and a test rewrite. Not recommended.
Revert Option: Revert the gate (else { movedAction = build… }). Not ideal — reintroduces the phantom optimistic MOVED_TRANSACTION (client rand64() ID the server never adopts) whose reply thread errors on open, and breaks all three guarding tests.
Alternate fix (rejected): Attach a second moved action to Report B's own report actions. Rejected — Report B already surfaces the transaction thread's actions inline for a single-transaction report; placement was never the issue, and it just doubles the phantom action.
Fix
Description
Files to Change
Effort
Risk
Status
1
Update TC 41237659: Draft source → expect no message; add a submitted-source variant for message coverage
Test-management only (no repo code)
Low
None
Recommended
2
Gate on destination-is-new instead of source-is-open
What alternative solutions did you explore? (Optional)
Add only the m flag — matches the line but still erases the title (rejected above).
Move the subtitle to its own label on the server — leaves old charts broken and keeps the App brittle.
Revert the localizer — restores the original wrong behavior.
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Please re-state the problem that we are trying to solve in this issue.
After moving an expense from Report A (a draft report created in OldDot) to Report B, the "moved this expense from Report A" system message never shows up when Report B / the expense is opened.
What is the root cause of that problem?
The message is missing because ChangeTransactionsReport on the server never creates a MOVEDTRANSACTION when the expense leaves an Open (draft) report — the client's optimistic action is the only copy that ever exists, and it is discarded the moment the transaction thread is fetched.
The reason I don't think the client gate is the root cause: this issue reproduces in production ("Reproducible in production?: Yes"), and the gate is not in production. PR #95979 (commit 215eb86), which introduced !isOpenReport(oldReport), only has a staging deploy comment (9.4.35-1) — no production deploy. So on production the client still builds the optimistic action unconditionally and still sends movedReportActionID, and the tester still sees nothing. A client-side gate that isn't running cannot be why the message is absent on production.
What is running on both is this: the moved action lives only in Onyx as optimistic data:
#95866 is the direct evidence that the server drops it. There, the same draft-source move did render the message, but opening its reply thread threw "Unexpected error" — a thread can only fail like that if the parent report action does not exist server-side. Once OpenReport returns the canonical action list for the transaction thread, the orphan is gone — which is exactly the repro here (navigate to Report B, open the expense → thread fetched → nothing). #95866 and #96326 are the same server-side omission observed at two different points in its lifetime: before the thread is fetched (phantom message, broken thread) and after (no message).
The author of #95979 documented this server behaviour rather than fixed it, and made the ID optional to match:
So the gate is a symptom-level patch that hides an already-broken message sooner; removing it restores a message that survives until the next fetch and re-opens #95866.
What changes do you think we should make in order to solve the problem?
Fix it where the message is actually missing — the server — and only then let the client stop suppressing it, so the two sides agree in a single deploy.
Web-Expensify ChangeTransactionsReport: create the MOVEDTRANSACTION report action on the transaction thread using the movedReportActionID the client already sends, whenever the destination is a real report — regardless of the source report's stateNum/statusNum. The audit trail belongs to the report the expense landed in; the state of the report it left shouldn't decide whether that trail exists. This is the only change that makes the message survive a refresh, and it fixes the production repro that no App-side change can reach.
App, same deploy: make movedReportActionID required again and drop the source-state condition, so the optimistic action matches what the server will confirm:
If the server behaviour turns out to be intentional product policy ("no audit trail before submit"), then this issue is invalid as filed and the fix is to correct the docs and the BrowserStack test case instead — but either way the answer is decided server-side, not by the gate.
What alternative solutions did you explore? (Optional)
Remove !isOpenReport(oldReport) in changeTransactionsReport and ship the client alone. This is what the App-only proposals do. It makes the message appear on staging long enough to pass a manual test, but the action is still not created server-side, so it vanishes on the next OpenReport of the thread and the [Due for payment 2026-07-30] [$250] chat-Unexpected error on opening moved report reply thread. #95866 reply-thread error comes straight back. It also cannot explain — or fix — the production repro, where no gate exists.
Attach the moved action to Report B's top-level chat as well. Doesn't help — the action's absence is total, not misplaced. Duplicating an action the server never creates just puts the phantom in two places.
⚠️@lorretheboy Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.
The BE is not creating the msgs the TC must be updated
Agreed.
Pulling up engineer to confirm and update TC
Thanks both for flagging. @FitseTLT is correct. This behaviour is expected.
@Expensify/applauseleads Please could you update this test case. In the reported issue above, both Report A and Report B are draft/open reports because they are created in OldDot and never submitted. For moves involving draft reports, we intentionally suppress the MOVED_TRANSACTION system message in the backend.
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Activity
applause-bot commentedon Jul 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/fffb5a25a51376cf1aad4f7aab6dd4d4539f2463a5f9c54c645f6a9700287833
https://platform.applause.com/services/links/v1/external/b64914a45e33305831bafc40bda2a7ec89ea28827daf3e28f8c7a833ac75a279
MelvinBot commentedon Jul 16, 2026
Proposal
What is the root cause of that problem?
When an expense is moved between reports in NewDot, the client entry point is
changeTransactionsReportinsrc/libs/actions/Transaction.ts. The "moved this expense from Report A" system message (aMOVED_TRANSACTIONreport action) is built optimistically here — but it is only ever attached to the transaction thread report, never to the destination Report B's top-level chat, and it is only created at all when the source report is not open.Two things combine to produce "no message on Report B":
The moved action targets the transaction thread, not Report B. The optimistic
MOVED_TRANSACTIONaction is pushed to Onyx under${REPORT_ACTIONS}${transactionThreadReportID}(Transaction.ts:1595-1613), and the builder hardcodesreportID: transactionThreadReportIDwith only afromReportIDin the original message (ReportUtils.ts:7442-7487). The top-level Report B chat only receives the IOU/money-request preview action (Transaction.ts:1436-1445).A gate suppresses the action for open source reports. The action is only built in the
else if (!isOpenReport(oldReport))branch (Transaction.ts:1587-1593). If Report A is an open/draft report,movedActionstaysundefinedand no moved message is created anywhere.Because this is reproducible on staging but not production, and
Transaction.tshas seen heavy recent churn around the merge/move-report feature (e.g. thefeat/mergeReports-actionwork and "fix chat - Unexpected error on opening moved report reply thread"), this looks like a recent regression in where the moved action is placed.What changes do you think we should make in order to solve the problem?
Ensure a moved report action lands on the destination report (Report B) — not only on the transaction thread — so the "moved this expense from Report A" message is visible when the user opens Report B, matching production behavior. Concretely, in
changeTransactionsReport, additionally build/attach a moved (or IOU) report action keyed on the destinationreportID(Report B), and re-check the!isOpenReport(oldReport)gate so a valid move between two workspace reports isn't silently dropped.Investigation details & open questions
changeTransactionsReport— Transaction.ts:851getMovedTransactionMessage— ReportUtils.ts:6900-6915; translation keysiou.movedTransactionFrometc. at en.ts:1365-1368CHANGE_TRANSACTIONS_REPORT(Transaction.ts:1926); the moved message text is generated client-side, so this is not primarily a backend issue.Alternative explanation considered: the message may in fact be created on the transaction thread (nested under B) and the tester simply expected it on Report B's top-level chat. Worth confirming the intended product placement.
Open questions:
!isOpenReportgate is the exact cause)Confidence: Medium — code paths are confirmed, but the exact mechanism (gate vs. thread-only placement) and the regressing PR aren't yet pinned down.
Possibly related: #93799 (unreported expenses can't be moved — missing IOU report action) and #95866 (error opening moved report reply thread) touch the same move-report code.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/96326)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
yusufdeveloper2903 commentedon Jul 16, 2026
Proposal
What is the root cause of that problem?
When an expense is moved from Report A to Report B, a report action message should be created in Report B indicating the expense was moved. The root cause is that the action that handles moving expenses likely creates a "moved" report action only in Report A (source report) but fails to create/display the corresponding action in Report B (destination report), so the recipient report never shows the "moved this expense from Report A" message.
What changes do you think we should make in order to solve the problem?
I'd look at the IOU action handler responsible for moving expenses — likely in
src/libs/actions/IOU.ts. When moving an expense, we need to ensure aMOVEDreport action is optimistically created and added to Report B's action list.This ensures Report B's action list gets the "moved this expense from Report A" message optimistically, and the server response should confirm it.
What alternative solutions did you explore?
An alternative would be to trigger a re-fetch of Report B's actions after the move completes, but that's less reliable and introduces latency — the optimistic approach above is more consistent with the existing patterns in the codebase.
aswin-s commentedon Jul 16, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user moves an expense from Report A to Report B on Web (NewDot), and Report A is still in the OPEN state (e.g. was just created in OldDot with an expense but never submitted), opening Report B shows no "moved this expense from Report A" report action message. The expected behavior is that a MOVED_TRANSACTION report action is created describing the source report so the destination report reflects where the expense came from.
What is the root cause of that problem?
In src/libs/actions/Transaction.ts:1591,
changeTransactionsReportonly builds the optimisticbuildOptimisticMovedTransactionActionwhen the source report is NOT open (!isOpenReport(oldReport)).isOpenReportin src/libs/ReportUtils.ts:1994-1996 returnstruewhenstateNum === OPEN && statusNum === OPEN, which is exactly the state of Report A in the repro (created in OldDot, expense added, never submitted before moving). So the movedAction is never produced (line 1588let movedAction;remainsundefined), the optimistic push at line 1595-1600 is skipped, and no "moved this expense from Report A" action ever gets written to the transaction thread that Report B surfaces. TheUNREPORTEDbranch at line 1589 also doesn't apply because the destination is a real report (Report B), not the unreported/self‑DM sentinel.What changes do you think we should make in order to solve the problem?
!isOpenReport(oldReport)gate for the report-to-report move case. WhenreportID !== CONST.REPORT.UNREPORTED_REPORT_IDandoldReportIDis a real report distinct from the destination, always callbuildOptimisticMovedTransactionAction(transactionThreadReportID, oldReportID)so the destination reflects the origin regardless of the source report's state.UNREPORTED_REPORT_IDbranch (line 1589-1590) that produces theUNREPORTED_TRANSACTIONaction — only the second branch'sisOpenReportguard needs to go.${REPORT_ACTIONS}${transactionThreadReportID}(line 1598), andmovedReportActionIDis threaded intotransactionIDToReportActionAndThreadDataat line 1617 so the backendChangeTransactionsReportcommand receives the same optimistic ID.changeTransactionsReportcovering the OPEN→OPEN move case (Report A open, Report B open) to lock in thatmovedActionis produced.buildOptimisticMovedTransactionAction(src/libs/actions/IOU/TrackExpense.ts:1245, src/libs/actions/IOU/RejectMoneyRequest.ts:501) — those flows are unaffected by this repro and should remain as-is.What alternative solutions did you explore? (Optional)
ahmdshrif commentedon Jul 16, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-07-16 15:59:10 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
After moving an expense from Report A to Report B via the Report push row, no "moved this expense from Report A" system message appears on Report B. Staging-only regression (production shows the message).
What is the root cause of that problem?
This is a regression from PR
#95979(merged 2026-07-14, so it is on staging but not production — matching the repro matrix), which fixed#95866by suppressing the optimisticMOVEDTRANSACTIONaction with a gate that is too broad.changeTransactionsReport. Step 7 builds the "moved this expense from…" action, but PR#95979made it conditional on the source report not being open:App/src/libs/actions/Transaction.ts
Lines 1587 to 1593 in 6c61fe9
isOpenReport(oldReport)is true (stateNum === OPEN && statusNum === OPEN):App/src/libs/ReportUtils.ts
Lines 1994 to 1996 in 6c61fe9
UNREPORTED_REPORT_ID) → first branch false;!isOpenReport(oldReport)→ false. SomovedActionstaysundefinedand no optimistic action is written.movedReportActionIDoptional and it is now omitted from the API params (App/src/libs/actions/Transaction.ts
Line 1617 in 6c61fe9
App/src/libs/API/parameters/ChangeTransactionsReportParams.ts
Line 9 in 6c61fe9
Structural cause:
#95866's actual bug scenario was the "Create report" flow — moving an expense out of its draft report into a brand-new optimistic report, where the backend never creates the message, so the optimistic action was orphaned and its reply thread errored. The fix keyed the suppression on the wrong discriminator: "source report is open" instead of "destination report is being created in this same action". Every ordinary move whose source happens to be unsubmitted (the most common state) lost its audit-trail message.Affected call sites of
changeTransactionsReport(all funnel through the same gate):App/src/pages/iou/request/step/IOURequestEditReport.tsx
Line 89 in 6c61fe9
App/src/pages/iou/request/step/IOURequestStepReport/hooks/useReportSelectionActions.ts
Line 181 in 6c61fe9
App/src/pages/Search/SearchTransactionsChangeReport.tsx
Line 233 in 6c61fe9
App/src/components/AddExistingExpenseFooter.tsx
Line 95 in 6c61fe9
What changes do you think we should make in order to solve the problem?
Narrow the suppression to the scenario
#95866actually targeted: skip the moved message only when the expense is moving into a newly-created report. Add an optionalisMovingToNewReport?: booleantoChangeTransactionsReportPropsand change the step-7 gate (App/src/libs/actions/Transaction.ts
Lines 1587 to 1593 in 6c61fe9
Pass
isMovingToNewReport: trueonly from the four call sites that callcreateNewReportand immediately move transactions into the optimistic report:App/src/pages/iou/request/step/IOURequestEditReport.tsx
Lines 147 to 170 in 6c61fe9
selectReport)App/src/pages/Search/SearchTransactionsChangeReport.tsx
Lines 147 to 161 in 6c61fe9
App/src/pages/DynamicNewReportWorkspaceSelectionPage.tsx
Lines 123 to 129 in 6c61fe9
App/src/pages/iou/request/step/IOURequestStepUpgrade.tsx
Lines 135 to 141 in 6c61fe9
This restores the message (optimistically AND server-side, since
movedReportActionIDis sent again) for moves between existing reports, while#95866's repro (expense → Report → Create report) stays fixed: destination is new + source open → still suppressed. Regression safety: theUNREPORTED_TRANSACTIONbranch, unreported→report moves (oldReportundefined →isOpenReportfalse), and all four create-report flows are unchanged. Update the PR's test intests/actions/TransactionTest.tsto cover both cases.Why the simple fix fails: plainly reverting the gate (
else { movedAction = build… }) reintroduces#95866— in the Create-report flow the backend never adopts the clientrand64()ID, the optimistic action is orphaned, and opening its reply thread callsOpenReportwith aparentReportActionIDthe server doesn't know, writingerrorFields.createChatThread. Suppression must stay for that flow; it just must key on the destination being new, not on the source being open.What alternative solutions did you explore? (Optional)
#95979— restores this message but reintroduces the#95866reply-thread error. Incomplete.changeTransactionsReport(e.g.!allReports[report_ + reportID]) — no call-site changes, but timing-fragile: it depends on theuseOnyxsnapshot not yet containing the optimistic report. The explicit flag is deterministic.MobileMage commentedon Jul 16, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-07-16 16:00:20 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When the user moves an expense from Report A to Report B (Report push row > select Report B), no "moved this expense from Report A" system message appears on Report B. This works in production but not on staging, so it is a regression.
What is the root cause of that problem?
This regressed in PR #95979 (commit
215eb86e328, "fix chat - Unexpected error on opening moved report reply thread", fixing #95866). That PR madechangeTransactionsReportskip building the optimisticMOVED_TRANSACTIONaction whenever the source report is open:App/src/libs/actions/Transaction.ts
Lines 1588 to 1592 in 6c61fe9
The
isOpenReport(oldReport)gate is far too broad.isOpenReportis juststateNum === OPEN && statusNum === OPEN, and virtually every report an expense can be moved out of is a draft in the open state — including Report A in this repro (reports created manually in OldDot are open). So the gate suppresses the audit message for the mainline "move expense between existing reports" flow, not just for the flow #95866 targeted. The suppression is also not merely cosmetic on the client: whenmovedActionis undefined,movedReportActionIDis omitted fromtransactionIDToReportActionAndThreadDatain theChangeTransactionsReportAPI params (the PR even changedmovedReportActionIDto optional inChangeTransactionsReportParams.ts), so the backend never receives the reportActionID it uses to create the system message either. The message therefore never appears — neither optimistically nor via Pusher — which is exactly what the tester sees on Report B.The scenario #95866 actually needed to fix is much narrower: moving an expense into a report that was just created in the same interaction (expense > Report > "Create report"), where the backend intentionally creates no "moved" message and the orphaned optimistic action (with a client
rand64()ID the server never adopted) errored when its reply thread was opened. In this issue's repro both Report A and Report B are pre-existing reports, the backend does create the message for that move (which is why production, without PR #95979, shows it persistently), but the client now suppresses it and withholds the ID from the API.What changes do you think we should make in order to solve the problem?
We should narrow the suppression from "source report is open" to the actual #95866 case: the destination report was just created optimistically in the same flow. Add an optional
isMovingToNewReport?: booleantoChangeTransactionsReportPropsand use it in step 7 ofchangeTransactionsReport:Then pass
isMovingToNewReport: trueonly from the call sites that create the target report withcreateNewReportright before moving:createReportinsrc/pages/DynamicNewReportWorkspaceSelectionPage.tsxand thecreateReportForPolicypath insrc/pages/iou/request/step/IOURequestEditReport.tsx(itsselectReport(item, report?)receives the optimistic report as the second argument only in the create flow, soisMovingToNewReport: !!reportdistinguishes it for free). All other callers (moving to an existing report from the Report push row, Search bulk move,AddExistingExpenseFooter) default tofalseand get the moved message back, andmovedReportActionIDis again sent to the backend so the server-created action matches the optimistic one. This preserves the #95866 fix exactly — its repro (create expense, don't submit, Report > Create report) still builds no moved action because the destination is the just-created draft and the source is open — while restoring the audit trail for genuine moves between existing reports, matching production behavior and the regression TC.What alternative solutions did you explore? (Optional)
Reverting PR #95979 outright would restore this message but reintroduce the #95866 "Unexpected error" thread bug. We also considered detecting the just-created destination inside
changeTransactionsReportviareportMetadata.isOptimisticReportinstead of a new param, but the metadata write fromcreateNewReportis queued asynchronously and may not have landed whenchangeTransactionsReportruns in the same tick, so an explicit caller flag is more reliable.abbasifaizan70 commentedon Jul 16, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
MOVED_TRANSACTIONaction entirely.App/src/libs/actions/Transaction.ts
Lines 1587 to 1593 in 6c61fe9
isOpenReportis what determines this: it returns true only when bothstateNumandstatusNumareOPEN, i.e. exactly the state of a brand-new, unsubmitted report like Report A in this repro.App/src/libs/ReportUtils.ts
Lines 1994 to 1996 in 6c61fe9
movedActionends upundefinedin this case, the subsequent block that pushes the optimistic/success/failure Onyx updates for the moved action is skipped, so no report action is ever written to the transaction thread, and the user never sees a "moved this expense from Report A" message on Report B.What changes do you think we should make in order to solve the problem?
MOVED_TRANSACTIONaction when an expense is moved between two actual reports, regardless of the source report's state, so users get a system message describing the move whether the source report was a draft or already submitted.App/src/libs/actions/Transaction.ts
Lines 1587 to 1593 in 6c61fe9
samranahm commentedon Jul 16, 2026
🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.
Abdulloh0109 commentedon Jul 16, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
After moving an expense from Report A to Report B, no "moved this expense from Report A" system message is shown, whereas regression TC 41237659 expects one.
What is the root cause of that problem?
This is not a regression — the message is being suppressed intentionally, and this TC hits exactly the case that was deliberately scoped for suppression.
In this TC, Report A is created in OldDot and the expense is moved out of it without submitting it, so Report A is still Open (
stateNum: OPEN,statusNum: OPEN) — what the product surfaces as a Draft report:App/src/libs/ReportUtils.ts
Lines 1994 to 1996 in 59a6998
Step 7 of
changeTransactionsReportgates the moved system message on precisely that state, so for a draft source reportmovedActionstaysundefinedand noMOVED_TRANSACTIONis built:App/src/libs/actions/Transaction.ts
Lines 1592 to 1598 in 59a6998
Because
movedActionisundefined,movedReportActionIDis also omitted from theChangeTransactionsReportparams, so nothing is created server-side either — which is why the message never appears, even after a refresh:App/src/libs/actions/Transaction.ts
Line 1622 in 59a6998
That gate was added by #95979 (fix for #95866) and is intentional, not incidental:
tests/actions/TransactionTest.tsasserting noMOVED_TRANSACTIONis created when an expense is moved out of a draft report, "because moves between drafts aren't part of the audit trail".The "Reproducible in production: No" line is consistent with this: #95979 merged on Jul 14 and has only reached staging, so production still shows the old, pre-decision behavior.
What changes do you think we should make in order to solve the problem?
No App-side change. Restoring the message here would mean reverting an intentional, Slack-confirmed product decision and breaking the unit test that guards it.
The correct follow-up is to update regression TC 41237659 so that moving an expense out of a Draft report expects no moved system message, and to cover the message expectation with a source report that has been submitted instead.
One caveat worth confirming with the tester: if Report A was in fact submitted before the move, this is not the draft gate at all but the separate backend gap already flagged by @mkhutornyi in the same comment — "it looks like there's backend bug - system message isn't generated even when the action is taken on a Submitted report" — which was explicitly ruled out of scope for #95979 and needs a backend fix, not an App one. In that case this issue should be re-routed to an internal engineer rather than fixed in this repo.
What alternative solutions did you explore? (Optional)
Removing the
!isOpenReport(oldReport)gate so the message is always built — rejected: it reverts the approved decision above, reintroduces #95866 (the phantom optimistic action the server never adopts, whose reply thread fails withgenericCreateReportFailureMessage), and fails the existing test.melvin-bot commentedon Jul 16, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (
External)14 remaining items
Dip-G-Git commentedon Jul 16, 2026
Proposal
What is the root cause of that problem?
The missing message is intentional, documented behavior — not a code bug. Report A in this TC is created in OldDot with one expense and never submitted, so it is in the Draft (OPEN/OPEN) state, which is precisely the state the App was changed to suppress the moved message for.
Primary Root Cause:
src/libs/actions/Transaction.ts, step 7 ofgetChangeTransactionsReportOnyxData. The moved action is only built when the source report is not open:oldReportis the source (Report A). For a Draft sourceisOpenReport(oldReport)istrue, somovedActionstaysundefined. No optimistic action is written, and — critically —movedReportActionIDis then omitted from the API payload, so the backend never creates the message either.src/libs/API/parameters/ChangeTransactionsReportParams.ts. The type contract itself documents that this omission is by design:movedReportActionIDis optional on purpose. The backend also does not generate the message for a Draft source, so the message is absent both optimistically and after sync — matching the video.Confirmation it is intended, not incidental —
tests/actions/TransactionTest.tslocks the behavior in with three cases that pass a plain existingdestinationReport:MOVED_TRANSACTION("moves between drafts aren't part of the audit trail")MOVED_TRANSACTIONUNREPORTED_TRANSACTIONAffected Files:
src/libs/actions/Transaction.ts(step-7 gate);src/libs/API/parameters/ChangeTransactionsReportParams.ts(documented contract);tests/actions/TransactionTest.ts(guards the behavior).Affected Component(s): Money Requests — move expense between reports (
changeTransactionsReport).Bug Category: Model-vs-reality divergence — the regression TC encodes an expectation the product deliberately removed (stale test/spec), not a defect in the code.
Mechanism: Open Report A (Draft) → user moves expense →
changeTransactionsReportruns →oldReport= Report A →isOpenReport(oldReport) === true→ step-7else if (!isOpenReport(oldReport))isfalse→movedAction === undefined→ no Onyx push ANDmovedReportActionIDomitted from params → backend (which also suppresses for Draft sources) writes nothing → Report B shows no moved message.What changes do you think we should make in order to solve the problem?
No App source change. Restoring the message for a Draft source would revert a deliberate decision, fail the three guarding tests, and re-open the phantom-optimistic-action problem the current gate was added to solve. The correct fix layer is the test case / spec, not the code.
Fix Option 1 (Recommended): Update regression TC 41237659 so that moving an expense out of a Draft Report A expects no "moved this expense from Report A" message. Keep steps 1–12; invert the step that asserts the message. To cover the message itself, add a variant that submits Report A before moving, since the code path for a submitted source does build the action:
Why best: it aligns the TC with the shipped behavior and the existing unit tests, and touches no production code — zero regression risk.
src/libs/actions/Transaction.tsstep 7, gate on the destination being newly created rather than the source being open, so genuine moves between two existing reports show the message while the "move into a just-created report" flow stays suppressed:Trade-off: contradicts the current draft-source unit tests and the documented
ChangeTransactionsReportParamscontract; requires product sign-off and a test rewrite. Not recommended.Revert Option: Revert the gate (
else { movedAction = build… }). Not ideal — reintroduces the phantom optimisticMOVED_TRANSACTION(clientrand64()ID the server never adopts) whose reply thread errors on open, and breaks all three guarding tests.Alternate fix (rejected): Attach a second moved action to Report B's own report actions. Rejected — Report B already surfaces the transaction thread's actions inline for a single-transaction report; placement was never the issue, and it just doubles the phantom action.
Transaction.ts,TransactionTest.ts,ChangeTransactionsReportParams.tsisOpenReportgateTransaction.ts,TransactionTest.tsWhat alternative solutions did you explore? (Optional)
mflag — matches the line but still erases the title (rejected above).Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
lorretheboy commentedon Jul 16, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
After moving an expense from Report A (a draft report created in OldDot) to Report B, the "moved this expense from Report A" system message never shows up when Report B / the expense is opened.
What is the root cause of that problem?
The message is missing because
ChangeTransactionsReporton the server never creates aMOVEDTRANSACTIONwhen the expense leaves an Open (draft) report — the client's optimistic action is the only copy that ever exists, and it is discarded the moment the transaction thread is fetched.The reason I don't think the client gate is the root cause: this issue reproduces in production ("Reproducible in production?: Yes"), and the gate is not in production. PR #95979 (commit
215eb86), which introduced!isOpenReport(oldReport), only has a staging deploy comment (9.4.35-1) — no production deploy. So on production the client still builds the optimistic action unconditionally and still sendsmovedReportActionID, and the tester still sees nothing. A client-side gate that isn't running cannot be why the message is absent on production.What is running on both is this: the moved action lives only in Onyx as optimistic data:
App/src/libs/actions/Transaction.ts
Lines 1593 to 1599 in 01ca161
App/src/libs/actions/Transaction.ts
Lines 1621 to 1631 in 01ca161
#95866is the direct evidence that the server drops it. There, the same draft-source move did render the message, but opening its reply thread threw "Unexpected error" — a thread can only fail like that if the parent report action does not exist server-side. OnceOpenReportreturns the canonical action list for the transaction thread, the orphan is gone — which is exactly the repro here (navigate to Report B, open the expense → thread fetched → nothing).#95866and#96326are the same server-side omission observed at two different points in its lifetime: before the thread is fetched (phantom message, broken thread) and after (no message).The author of #95979 documented this server behaviour rather than fixed it, and made the ID optional to match:
App/src/libs/API/parameters/ChangeTransactionsReportParams.ts
Lines 1 to 9 in 01ca161
App/src/libs/ReportUtils.ts
Lines 1994 to 1996 in 01ca161
So the gate is a symptom-level patch that hides an already-broken message sooner; removing it restores a message that survives until the next fetch and re-opens #95866.
What changes do you think we should make in order to solve the problem?
Fix it where the message is actually missing — the server — and only then let the client stop suppressing it, so the two sides agree in a single deploy.
ChangeTransactionsReport: create theMOVEDTRANSACTIONreport action on the transaction thread using themovedReportActionIDthe client already sends, whenever the destination is a real report — regardless of the source report'sstateNum/statusNum. The audit trail belongs to the report the expense landed in; the state of the report it left shouldn't decide whether that trail exists. This is the only change that makes the message survive a refresh, and it fixes the production repro that no App-side change can reach.movedReportActionIDrequired again and drop the source-state condition, so the optimistic action matches what the server will confirm:App/src/libs/API/parameters/ChangeTransactionsReportParams.ts
Lines 1 to 9 in 01ca161
App/src/libs/actions/Transaction.ts
Lines 1593 to 1599 in 01ca161
successData(server-confirmed), not justoptimisticData:App/tests/actions/TransactionTest.ts
Lines 535 to 541 in 01ca161
UNREPORTED_TRANSACTIONand thefromReportID === UNREPORTED_REPORT_IDvisibility rule stay exactly as they are — the personal-space path is unaffected:App/src/libs/ReportActionsUtils.ts
Lines 1254 to 1261 in 01ca161
If the server behaviour turns out to be intentional product policy ("no audit trail before submit"), then this issue is invalid as filed and the fix is to correct the docs and the BrowserStack test case instead — but either way the answer is decided server-side, not by the gate.
What alternative solutions did you explore? (Optional)
!isOpenReport(oldReport)inchangeTransactionsReportand ship the client alone. This is what the App-only proposals do. It makes the message appear on staging long enough to pass a manual test, but the action is still not created server-side, so it vanishes on the nextOpenReportof the thread and the [Due for payment 2026-07-30] [$250] chat-Unexpected error on opening moved report reply thread. #95866 reply-thread error comes straight back. It also cannot explain — or fix — the production repro, where no gate exists.createNewReportcall sites). Same problem in reverse: it re-enables an optimistic-only message for every ordinary draft-source move, i.e. it converts this issue back into [Due for payment 2026-07-30] [$250] chat-Unexpected error on opening moved report reply thread. #95866 for exactly the repro reported here.github-actions commentedon Jul 16, 2026
melvin-bot commentedon Jul 21, 2026
@situchan Eep! 4 days overdue now. Issues have feelings too...
situchan commentedon Jul 23, 2026
Agreed.
Pulling up engineer to confirm and update TC
🎀 👀 🎀
melvin-bot commentedon Jul 23, 2026
Triggered auto assignment to @inimaga, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
inimaga commentedon Jul 23, 2026
Thanks both for flagging. @FitseTLT is correct. This behaviour is expected.
@Expensify/applauseleads Please could you update this test case. In the reported issue above, both Report A and Report B are draft/open reports because they are created in OldDot and never submitted. For moves involving draft reports, we intentionally suppress the
MOVED_TRANSACTIONsystem message in the backend.inimaga commentedon Jul 27, 2026
Posted internally about this here, and the TC has now been updated. Closing.