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 shows 0.00 then reverts to empty field after editing merchant #98697
Version Number: 9.4.54-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod 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):soidjnosdjoidsjosjoj@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 Merchant.
Enter merchant and save it.
Expected Result:
Amount will not show 0.00 after editing merchant.
Actual Result:
Amount shows 0.00 then reverts to empty field after editing merchant.
👋 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 (the issue #96772 was fixing)
Recommendation: ROLL FORWARD
The offending PR is a brand-new, otherwise-desirable feature (failed-scan amount is not in production), and reverting it would reintroduce the original bug it fixed ($0.00 always showing for failed scans, #94494). The flicker has a small, targeted fix, so we should roll forward rather than revert.
Assigned: @x-dev90 (PR author), @Ollyws and @arosiclair (approving reviewers) from the causing PR. Labels: No change. DeployBlockerCash is kept (App deploy is blocked, frontend bug). DeployBlocker was not present.
📋 Detailed Analysis
Evidence
PR fix: show scan error instead of populating $0 amount when scan fails #96772 introduced the exact behavior described: it hides the placeholder $0.00 for failed scans and shows the missing-amount error / empty amount instead. Before this PR the amount for a failed scan simply showed $0.00, so the empty amount (and the flicker back to it) only exists because of this PR.
The reproduction (edit merchant on a failed-scan expense → amount flashes $0.00 then reverts to empty) is a transient state that appears only during the optimistic merchant-edit update.
Reproducible on staging only; N/A for production because the feature does not exist there yet.
Verification
Affected display logic lives in src/components/ReportActionItem/MoneyRequestView.tsx (amount title), which reads isFailedScanAmountPlaceholder(updatedTransaction ?? transaction).
When the user edits the merchant, getUpdatedTransaction sets shouldStopSmartscan = true and then optimistically flips the receipt state from SCAN_FAILED to OPEN:
Because the optimistic transaction now has receipt.state === OPEN (not SCAN_FAILED), isFailedScanAmountPlaceholder returns false, so the amount title in MoneyRequestView falls back to the formatted amount $0.00:
Once the server response lands, the transaction is restored to receipt.state === SCAN_FAILED (amount still 0, no user-entered modifiedAmount), the predicate becomes true again, and the amount reverts to empty — producing the observed "shows 0.00 then reverts to empty" flicker. The end state is correct; the transient $0.00 is the defect.
Suggested targeted fix: make isFailedScanAmountPlaceholder (or its callers) resilient to the transient optimistic OPEN state during unrelated edits — e.g. treat a still-amountless scan request that failed as a placeholder even when the receipt state was optimistically flipped (consult the transaction backup / pending state), rather than requiring receipt.state === SCAN_FAILED at the exact render moment.
Activity
applause-bot commentedon Aug 14, 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/244387a669ff91b1cb579b66dc34296a8dc5eff1ed87f528a028b7ad8406a4fc
melvin-bot commentedon Aug 14, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #96772
melvin-bot commentedon Aug 14, 2026
@arosiclair @Ollyws you have been assigned to this deploy blocker because you reviewed the offending PR: #96772
github-actions commentedon Aug 14, 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:
melvin-bot commentedon Aug 14, 2026
💬 A slack conversation has been started in #expensify-open-source
MelvinBot commentedon Aug 14, 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 (the issue #96772 was fixing)
Recommendation: ROLL FORWARD
The offending PR is a brand-new, otherwise-desirable feature (failed-scan amount is not in production), and reverting it would reintroduce the original bug it fixed (
$0.00always showing for failed scans, #94494). The flicker has a small, targeted fix, so we should roll forward rather than revert.Assigned: @x-dev90 (PR author), @Ollyws and @arosiclair (approving reviewers) from the causing PR.
Labels: No change.
DeployBlockerCashis kept (App deploy is blocked, frontend bug).DeployBlockerwas not present.📋 Detailed Analysis
Evidence
$0.00for failed scans and shows the missing-amount error / empty amount instead. Before this PR the amount for a failed scan simply showed$0.00, so the empty amount (and the flicker back to it) only exists because of this PR.$0.00then reverts to empty) is a transient state that appears only during the optimistic merchant-edit update.N/Afor production because the feature does not exist there yet.Verification
src/components/ReportActionItem/MoneyRequestView.tsx(amount title), which readsisFailedScanAmountPlaceholder(updatedTransaction ?? transaction).isFailedScanAmountPlaceholderis added by PR fix: show scan error instead of populating $0 amount when scan fails #96772 insrc/libs/TransactionUtils/index.ts.git/gh pr view --json files), and the function/handling are present in the current staging checkout (HEAD9980966). PR fix: show scan error instead of populating $0 amount when scan fails #96772 is item 72 on the currentStagingDeployCashchecklist (Deploy Checklist: New Expensify 2026-08-14 #98677).Root Cause
isFailedScanAmountPlaceholdergates entirely on the receipt state beingSCAN_FAILED:TransactionUtils/index.tsL560-L567When the user edits the merchant,
getUpdatedTransactionsetsshouldStopSmartscan = trueand then optimistically flips the receipt state fromSCAN_FAILEDtoOPEN:TransactionUtils/index.tsL905-L914Because the optimistic transaction now has
receipt.state === OPEN(notSCAN_FAILED),isFailedScanAmountPlaceholderreturnsfalse, so the amount title inMoneyRequestViewfalls back to the formatted amount$0.00:MoneyRequestView.tsxL626-L631Once the server response lands, the transaction is restored to
receipt.state === SCAN_FAILED(amount still0, no user-enteredmodifiedAmount), the predicate becomestrueagain, and the amount reverts to empty — producing the observed "shows0.00then reverts to empty" flicker. The end state is correct; the transient$0.00is the defect.Suggested targeted fix: make
isFailedScanAmountPlaceholder(or its callers) resilient to the transient optimisticOPENstate during unrelated edits — e.g. treat a still-amountless scan request that failed as a placeholder even when the receipt state was optimistically flipped (consult the transaction backup / pending state), rather than requiringreceipt.state === SCAN_FAILEDat the exact render moment.Beamanator commentedon Aug 16, 2026
@x-dev90 can you please take a look here since you authored #96772?
x-dev90 commentedon Aug 17, 2026
@Beamanator , @arosiclair Yes, this is from our PR. Please assign me — I have a draft PR ready. Thanks!
melvin-bot commentedon Aug 17, 2026
@Beamanator — to hire @x-dev90 on Upwork, add the External label so a job is created and the offer is sent automatically.
m-natarajan commentedon Aug 18, 2026
Amount field displayed as 0.00 after scanning, Win 11/Chrome, v9.4.54-4
Recording.3383.mp4
Beamanator commentedon Aug 18, 2026
ok looks like we're back to the old version, closing this out 👍