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
Scan - Amount edit system message changes to "changed the expense" after reset app #98783
Version Number: 9.4.54-2 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#96772 Email or phone of affected tester (no customers):sjdoinsjdnoijnsdojo@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com
Go to workspace chat.
Create a scan expense with invalid receipt.
Wait for scan to fail.
Open the expense.
Click Amount.
Edit the amount to 0.00 and save it.
→ System message shows "changed the amount to MYR 0.00 (previously MYR 0.00)".
Go to Account > Troubleshoot > Clear cache and restart > Reset and refresh.
Open the expense from Step 3.
Expected Result:
System message will remain the same - "changed the amount to MYR 0.00 (previously MYR 0.00)".
Actual Result:
System message changes to "changed the expense" after reset app.
👋 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: #96772 - "fix: show scan error instead of populating $0 amount when scan fails" by @x-dev90 (High confidence) Related Issues: #94494 (issue the PR fixed)
Recommendation: ROLL FORWARD
PR #96772 is a legitimate, approved UX feature (blank amount + error for failed scans), so a full revert would remove valid functionality; the defect is a narrow edge case and warrants a targeted fix instead. Keeping DeployBlockerCash since an App PR caused it.
Assigned: @x-dev90 (PR author), @Ollyws and @arosiclair (approving reviewers) from the causing PR Labels: No change. DeployBlockerCash kept (App PR caused it → App deploy is blocked). No DeployBlocker present to remove.
Before this PR, editing a failed-scan placeholder amount from 0 to 0.00 was a no-op: submitEditAmount early-returned and no MODIFIED_EXPENSE action was ever created, so the "changed the amount to MYR 0.00" message could not exist. The entire flow that produces the buggy message is newly enabled by this PR.
The optimistic system-message fields are built in src/libs/ReportUtils.ts:6230-6241 (getModifiedExpenseOriginalMessage): because amount is in transactionChanges, the optimistic action gets amount: 0, oldAmount: 0, currency, oldCurrency.
Root Cause
This is an optimistic-vs-server message divergence caused by submitting a no-op amount edit:
The optimisticMODIFIED_EXPENSE includes amount/oldAmount/currency/oldCurrency (ReportUtils.ts:6230-6241). ModifiedExpenseMessage.getForReportAction sees hasModifiedAmount === true (src/libs/ModifiedExpenseMessage.ts:312-313) and renders "changed the amount to MYR 0.00 (previously MYR 0.00)" (ModifiedExpenseMessage.ts:341-350).
On cache reset, the action is rebuilt from the server. The backend (ModifiedExpense::getNewDotComment) sees no real amount change (0 → 0) and does not persist the amount/currency keys in the action's originalMessage.
Now hasModifiedAmount === false at ModifiedExpenseMessage.ts:312-313, every field check misses, message === '', and the code hits the generic fallback:
src/libs/ModifiedExpenseMessage.ts:563 → return translate('iou.changedTheExpense'); ("changed the expense").
So the amount detail is lost precisely because the frontend manufactures an amount-change action for a change the backend treats as a non-change.
Suggested targeted fix
Align optimistic behavior with the backend for the failed-scan-confirm case: still submit (to clear the scan-failure error), but don't build an amount-change originalMessage when the numeric amount is unchanged, or clear the scan error via a path that doesn't emit an amount-modification system message. This keeps the #96772 feature while eliminating the message that the server won't reproduce.
Activity
melvin-bot commentedon Aug 17, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #96772
applause-bot commentedon Aug 17, 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/63f945e1323707a7a44f37d4bb829afffd67aa999a7135d36797d6c67eab8836
melvin-bot commentedon Aug 17, 2026
@arosiclair @Ollyws you have been assigned to this deploy blocker because you reviewed the offending PR: #96772
melvin-bot commentedon Aug 17, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Aug 17, 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 17, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #96772 - "fix: show scan error instead of populating $0 amount when scan fails" by @x-dev90 (High confidence)
Related Issues: #94494 (issue the PR fixed)
Recommendation: ROLL FORWARD
PR #96772 is a legitimate, approved UX feature (blank amount + error for failed scans), so a full revert would remove valid functionality; the defect is a narrow edge case and warrants a targeted fix instead. Keeping
DeployBlockerCashsince an App PR caused it.Assigned: @x-dev90 (PR author), @Ollyws and @arosiclair (approving reviewers) from the causing PR
Labels: No change.
DeployBlockerCashkept (App PR caused it → App deploy is blocked). NoDeployBlockerpresent to remove.📋 Detailed Analysis
Evidence
StagingDeployCashchecklist.0to0.00was a no-op:submitEditAmountearly-returned and noMODIFIED_EXPENSEaction was ever created, so the "changed the amount to MYR 0.00" message could not exist. The entire flow that produces the buggy message is newly enabled by this PR.isFailedScanAmountPlaceholderguard that bypasses the "value hasn't changed" early return, allowing a0 → 0amount edit to be submitted.Verification
src/libs/ModifiedExpenseMessage.ts.src/libs/IOUAmountSubmission.ts:613-614(added by fix: show scan error instead of populating $0 amount when scan fails #96772):isFailedScanAmountPlaceholderadded insrc/libs/TransactionUtils/index.ts(also fix: show scan error instead of populating $0 amount when scan fails #96772).src/libs/ReportUtils.ts:6230-6241(getModifiedExpenseOriginalMessage): becauseamountis intransactionChanges, the optimistic action getsamount: 0,oldAmount: 0,currency,oldCurrency.Root Cause
This is an optimistic-vs-server message divergence caused by submitting a no-op amount edit:
0.00. Old amount is also0. PR fix: show scan error instead of populating $0 amount when scan fails #96772 now lets this submit instead of short-circuiting.MODIFIED_EXPENSEincludesamount/oldAmount/currency/oldCurrency(ReportUtils.ts:6230-6241).ModifiedExpenseMessage.getForReportActionseeshasModifiedAmount === true(src/libs/ModifiedExpenseMessage.ts:312-313) and renders "changed the amount to MYR 0.00 (previously MYR 0.00)" (ModifiedExpenseMessage.ts:341-350).ModifiedExpense::getNewDotComment) sees no real amount change (0 → 0) and does not persist the amount/currency keys in the action'soriginalMessage.hasModifiedAmount === falseatModifiedExpenseMessage.ts:312-313, every field check misses,message === '', and the code hits the generic fallback:src/libs/ModifiedExpenseMessage.ts:563→return translate('iou.changedTheExpense');("changed the expense").So the amount detail is lost precisely because the frontend manufactures an amount-change action for a change the backend treats as a non-change.
Suggested targeted fix
Align optimistic behavior with the backend for the failed-scan-confirm case: still submit (to clear the scan-failure error), but don't build an amount-change
originalMessagewhen the numeric amount is unchanged, or clear the scan error via a path that doesn't emit an amount-modification system message. This keeps the #96772 feature while eliminating the message that the server won't reproduce.m-natarajan commentedon Aug 18, 2026
Amount field displayed as 0.00 after scanning, Win 11/Chrome, v9.4.54-4
Recording.3381.mp4
Beamanator commentedon Aug 18, 2026
ok looks like we're back to the old version, closing this out 👍