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
Expense-Inconsistent amount display in expense preview and details when manual expense is 0.00 #98784
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 self DM.
Create a manual expense with amount 0.00.
→ Expense preview does not show amount.
Open the expense.
→ Amount field shows 0.00 despite not showing amount on expense preview.
Expected Result:
In Step 3, expense preview should show 0.00 because user manually creates expense with 0.00 amount.
Actual Result:
In Step 3, expense preview shows 0.00 when user manually creates expense with 0.00 amount.
In Step 4, Amount field shows 0.00 instead of empty field as the expense preview does not show any amount.
👋 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
A one-line targeted fix is safer than a revert: reverting would reintroduce the original $0.00-on-failed-scan bug that #96772 fixed (#94494). The preview should use the same narrow failed-scan check the details view already uses.
Assigned: @x-dev90 (PR author), @arosiclair and @Ollyws (approving reviewers) from causing PR #96772 Labels: No changes. DeployBlockerCash kept (App deploy is blocked, App PR is the cause). No DeployBlocker present.
The PR's stated goal was to blank the amount only for failed SmartScan placeholders, but it introduced a new amount-suppression branch in the transaction preview that uses a broader predicate than the details view, producing exactly the reported preview-vs-details inconsistency for a manual $0.00 expense.
src/components/ReportActionItem/MoneyRequestView.tsx — details view uses the narrowisFailedScanAmountPlaceholder (which is why details still correctly show 0.00).
Root Cause
For a manual$0.00 expense in a self DM (a non-expense-report context):
The details view (MoneyRequestView.tsx) blanks the amount only when isFailedScanAmountPlaceholder(transaction) is true. A manual expense is not a scan request, so this is false → details correctly show 0.00.
The preview (TransactionPreviewUtils.ts L381-382) instead blanks the amount when hasFieldErrors && isAmountMissing(transaction, isExpenseReport(iouReport)):
isExpenseReport(iouReport) is false for a self DM, so isAmountMissing falls to its non-expense-report branch: (amount === 0 || amount === undefined) && !hasValidModifiedAmount(transaction). For a manual $0.00, amount === 0 and there is no modifiedAmount → returns true.
Both true → displayAmountText = {text: ''} → preview renders no amount.
So a legitimate, user-entered $0.00 is wrongly treated as a "missing amount" in the preview, while the details view (using the narrow scan-failure check) shows 0.00 — the exact inconsistency reported.
Suggested targeted fix
Align the preview with the details view by gating the blank on the failed-scan placeholder rather than the broad isAmountMissing:
isFailedScanAmountPlaceholder requires isScanRequest && receipt.state === SCAN_FAILED, so a manual $0.00 is left displaying 0.00 while failed scans still render blank as #96772 intended. (Author/reviewers should confirm this preserves the split/confirmation and areRequiredFieldsEmpty behavior the PR also changed.)
I reproduced this end-to-end on a web build and confirmed the root cause in the investigation above.
What I saw: creating a manual 0.00 expense in a self DM renders the chat preview with a red "Missing amount" flag and no amount shown, while opening the expense shows Amount: 0.00 in the details — the exact preview↔details inconsistency reported.
Preview bubble — no amount, "Missing amount"
Expense details — Amount shows 0.00
Cause:#96772 (high confidence, staging-only). The preview blanks the amount via the broad hasFieldErrors && isAmountMissing(...) predicate (TransactionPreviewUtils.ts:381-382), which in a self DM (non-expense-report) treats a legitimate user-entered 0.00 as "missing". The details view uses the narrow isFailedScanAmountPlaceholder check, so it still shows 0.00.
Recommendation: ROLL FORWARD — gate the preview blank on isFailedScanAmountPlaceholder(transaction) (matching the details view) rather than the broad isAmountMissing. Reverting would reintroduce the original 0.00-on-failed-scan bug (#94494) that #96772 fixed.
Test currency was EUR on this account; the 0.00 discrepancy is identical to the reported $0.00 case.
Activity
melvin-bot commentedon Aug 17, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #96772
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 (the issue #96772 was fixing)
Recommendation: ROLL FORWARD
A one-line targeted fix is safer than a revert: reverting would reintroduce the original
$0.00-on-failed-scan bug that #96772 fixed (#94494). The preview should use the same narrow failed-scan check the details view already uses.Assigned: @x-dev90 (PR author), @arosiclair and @Ollyws (approving reviewers) from causing PR #96772
Labels: No changes.
DeployBlockerCashkept (App deploy is blocked, App PR is the cause). NoDeployBlockerpresent.📋 Detailed Analysis
Evidence
StagingDeployCashdeploy (Deploy Checklist: New Expensify 2026-08-14 #98677, 2026-08-14). Staging-only, not in production — consistent with a just-merged staging PR.$0.00expense.Verification
Affected files, all modified by #96772:
src/libs/TransactionPreviewUtils.ts— new preview amount-blanking branch:App/src/libs/TransactionPreviewUtils.ts
Lines 381 to 382 in 1235a09
src/libs/TransactionUtils/index.ts—isAmountMissing/isFailedScanAmountPlaceholder/areRequiredFieldsEmpty:App/src/libs/TransactionUtils/index.ts
Lines 560 to 578 in 1235a09
src/components/ReportActionItem/MoneyRequestView.tsx— details view uses the narrowisFailedScanAmountPlaceholder(which is why details still correctly show0.00).Root Cause
For a manual
$0.00expense in a self DM (a non-expense-report context):MoneyRequestView.tsx) blanks the amount only whenisFailedScanAmountPlaceholder(transaction)is true. A manual expense is not a scan request, so this isfalse→ details correctly show0.00.TransactionPreviewUtils.tsL381-382) instead blanks the amount whenhasFieldErrors && isAmountMissing(transaction, isExpenseReport(iouReport)):isExpenseReport(iouReport)isfalsefor a self DM, soisAmountMissingfalls to its non-expense-report branch:(amount === 0 || amount === undefined) && !hasValidModifiedAmount(transaction). For a manual$0.00,amount === 0and there is nomodifiedAmount→ returns true.hasFieldErrors=hasMissingSmartscanFields→areRequiredFieldsEmpty, which fix: show scan error instead of populating $0 amount when scan fails #96772 also rewrote to callisAmountMissing(...), so it is likewise true for the manual$0.00.displayAmountText = {text: ''}→ preview renders no amount.So a legitimate, user-entered
$0.00is wrongly treated as a "missing amount" in the preview, while the details view (using the narrow scan-failure check) shows0.00— the exact inconsistency reported.Suggested targeted fix
Align the preview with the details view by gating the blank on the failed-scan placeholder rather than the broad
isAmountMissing:isFailedScanAmountPlaceholderrequiresisScanRequest && receipt.state === SCAN_FAILED, so a manual$0.00is left displaying0.00while failed scans still render blank as #96772 intended. (Author/reviewers should confirm this preserves the split/confirmation andareRequiredFieldsEmptybehavior the PR also changed.)MelvinBot commentedon Aug 17, 2026
✅ Reproduced on web + root cause confirmed
I reproduced this end-to-end on a web build and confirmed the root cause in the investigation above.
What I saw: creating a manual
0.00expense in a self DM renders the chat preview with a red "Missing amount" flag and no amount shown, while opening the expense shows Amount: 0.00 in the details — the exact preview↔details inconsistency reported.Cause: #96772 (high confidence, staging-only). The preview blanks the amount via the broad
hasFieldErrors && isAmountMissing(...)predicate (TransactionPreviewUtils.ts:381-382), which in a self DM (non-expense-report) treats a legitimate user-entered0.00as "missing". The details view uses the narrowisFailedScanAmountPlaceholdercheck, so it still shows0.00.Recommendation: ROLL FORWARD — gate the preview blank on
isFailedScanAmountPlaceholder(transaction)(matching the details view) rather than the broadisAmountMissing. Reverting would reintroduce the original0.00-on-failed-scan bug (#94494) that #96772 fixed.Test currency was EUR on this account; the
0.00discrepancy is identical to the reported$0.00case.m-natarajan commentedon Aug 18, 2026
Not repro, Win 11/Chrome, v9.4.54-4
Recording.3380.mp4