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
Offline - Report preview shows $0 total after moving multi-currency expenses to a newly crea #93919
Version Number: 9.4.10-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#89564 Email or phone of affected tester (no customers):jsat@applausemail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Macbook Pro/iOS 13.7.8, iPhone 13/18.6.2, Samsung S21/Android 15 App Component: Other
Action Performed:
Launch Expensify App
Log in with valid credentials
Go to a workspace chat
Create 2 expenses with different currencies
Click Submit
Go to Spend > Reports
Go offline
Select the expense report via the checkbox
Click Move expenses > Create report
Observe the newly created report in the reports list
Expected Result:
The newly created report should display the correct total amount of the moved expenses in the report preview, even while offline
Actual Result:
The newly created report appears in a pending/greyed-out state and correctly shows that it contains 2 expenses, but its amount is displayed as $0 instead of the total amount of the moved expenses
👋 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.
⚠️ Regression analysis for this deploy blocker. Suspected source: #89564 ("Fix stale expense report totals after offline mixed-currency moves"), which reworked the total logic in changeTransactionsReport.
Please re-state the problem that we are trying to solve in this issue.
Offline, moving multiple expenses with different currencies into a newly created report (Move expenses → Create report) shows the report with the correct transaction count ("2 expenses") but a $0 total instead of the summed total.
What is the root cause of that problem?
In the target-report branch of changeTransactionsReport, the second (different-currency) expense trips the mixed-currency guard and calls markReportTotalAsStale(targetReportID):
markReportTotalAsStale → clearAccumulatedReportTotalsdeletesupdatedReportTotals[targetReportID] and only sets pendingFields.total = UPDATE so the server recomputes later.
For an existing report that's harmless — it keeps showing its last real server total until the backend recomputes. But a newly created report starts at total: 0 (ReportUtils.ts buildOptimisticExpenseReport), and the final totals loop only emits entries still present in updatedReportTotals:
Expense Fix spaces #2 (currency B ≠ A): set is now {A} → new Set([A, B]).size === 2 > 1 → markReportTotalAsStale(targetReportID).
clearAccumulatedReportTotals deletes updatedReportTotals[newReportID]; only pendingFields.total = UPDATE is set.
The totals loop at line 1637 finds no entry for the new report → no total pushed to optimisticData.
Report keeps total: 0; transactionCount is pushed separately so the UI shows "2 expenses" + $0. Offline → server never recomputes → persists until reconnect.
This explains why it's reproducible in staging (post-#89564) but not production, and why it manifests specifically on newly created targets (base total 0) rather than existing reports (which retain a prior real total).
What changes do you think we should make in order to solve the problem?
For an optimistic/newly-created target report (no server-side recompute coming while offline), the mixed-currency path should still write a numeric total instead of only flagging it stale. Two viable directions:
Accumulate a best-effort total using each transaction's convertedAmount (the same value already used in the convertedAmount branch) so the new report shows a real total in its own currency, or
Skip markReportTotalAsStale when the target is the freshly-built newReport and instead keep accumulating, so the totals loop emits a value.
The stale path remains correct for existing reports — only the newly-created-report case needs a numeric total written.
What alternative solutions did you explore?
Reverting #89564 clears this blocker but reintroduces the stale-total bug that PR fixed, so a targeted fix is preferred over a revert.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/93919) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
I think this is expected behavior for the mixed-currency move-all case while offline.
As discussed in this comment, when the calculation requires online data such as currency conversion, the report row should remain pending/greyed-out until backend confirmation.
So showing 0 on the newly created destination report together with the greyed-out state looks consistent with that expectation.
Activity
applause-bot commentedon Jun 18, 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/4be73302aadf375e2a6cc07971cb46a535dd596cf4597a036da1b5e568078535
https://platform.applause.com/services/links/v1/external/90f831304c3d11aea5be8e004f88765cf4dc11b88731bd44f41a91546b589c54
https://platform.applause.com/services/links/v1/external/fd9a82908c87cc32e6f50db964711e2d084ac94306a2dbedd378b9f3840b39fa
melvin-bot commentedon Jun 18, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #89564
melvin-bot commentedon Jun 18, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 18, 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 Jun 18, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Offline, moving multiple expenses with different currencies into a newly created report (Move expenses → Create report) shows the report with the correct transaction count ("2 expenses") but a $0 total instead of the summed total.
What is the root cause of that problem?
In the target-report branch of
changeTransactionsReport, the second (different-currency) expense trips the mixed-currency guard and callsmarkReportTotalAsStale(targetReportID):src/libs/actions/Transaction.ts:1376-1377markReportTotalAsStale→clearAccumulatedReportTotalsdeletesupdatedReportTotals[targetReportID]and only setspendingFields.total = UPDATEso the server recomputes later.For an existing report that's harmless — it keeps showing its last real server total until the backend recomputes. But a newly created report starts at
total: 0(ReportUtils.ts buildOptimisticExpenseReport), and the final totals loop only emits entries still present inupdatedReportTotals:src/libs/actions/Transaction.ts:1637Since that entry was deleted, no optimistic total is ever written, and offline the server never recomputes → the new report stays at $0.
Data flow & evidence
total: 0.changeTransactionsReportloops the 2 moved transactions.getTargetReportCurrenciesreturns an empty set → guardsize > 1is false → a total branch runs and currency A is added to the set (line 1403).{A}→new Set([A, B]).size === 2 > 1→markReportTotalAsStale(targetReportID).clearAccumulatedReportTotalsdeletesupdatedReportTotals[newReportID]; onlypendingFields.total = UPDATEis set.totalpushed tooptimisticData.total: 0;transactionCountis pushed separately so the UI shows "2 expenses" + $0. Offline → server never recomputes → persists until reconnect.This explains why it's reproducible in staging (post-#89564) but not production, and why it manifests specifically on newly created targets (base total 0) rather than existing reports (which retain a prior real total).
What changes do you think we should make in order to solve the problem?
For an optimistic/newly-created target report (no server-side recompute coming while offline), the mixed-currency path should still write a numeric total instead of only flagging it stale. Two viable directions:
convertedAmount(the same value already used in theconvertedAmountbranch) so the new report shows a real total in its own currency, ormarkReportTotalAsStalewhen the target is the freshly-builtnewReportand instead keep accumulating, so the totals loop emits a value.The stale path remains correct for existing reports — only the newly-created-report case needs a numeric total written.
What alternative solutions did you explore?
Reverting #89564 clears this blocker but reintroduces the stale-total bug that PR fixed, so a targeted fix is preferred over a revert.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/93919)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
nabi-ebrahimi commentedon Jun 18, 2026
I think this is expected behavior for the mixed-currency move-all case while offline.
As discussed in this comment, when the calculation requires online data such as currency conversion, the report row should remain pending/greyed-out until backend confirmation.
So showing
0on the newly created destination report together with the greyed-out state looks consistent with that expectation.cc @iwiznia @sobitneupane
iwiznia commentedon Jun 18, 2026
@nabi-ebrahimi you are right about the total, but why is the new report not showing the transactions in the list?

nabi-ebrahimi commentedon Jun 18, 2026
@iwiznia I think this is out of scope of this PR and looks more like a navigation issue.
The expenses are moved to the new report, but we stay on the old report instead of navigating to the newly created one.
Screen.Recording.2026-06-18.at.4.58.27.PM.mov
iwiznia commentedon Jun 18, 2026
Oh got it, closing then