Skip to content

[Due for payment 2026-08-21] Spend - Total spend does not update after editing expense amount #98544

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.53-1
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #98305
Email or phone of affected tester (no customers): soidnjsdjoijojdsiojdos@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an expense.
  4. Go to Spend > Reports.
  5. Select the report via checkbox.
  6. Click on the report.
  7. Click Amount.
  8. Edit the amount.
  9. Close the report.

Expected Result:

Total spend will update after editing expense amount.

Actual Result:

Total spend does not update after editing expense amount.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7232370_1786602232736.12.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7232370

Issue OwnerCurrent Issue Owner: @QichenZhu

Activity

  1. applause-bot commented on Aug 13, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/de144fdc3c6c01284bb5d4f150fc6a72d809713364bdcaf2bc3469c4d6df47ab

  2. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 13, 2026
  3. melvin-bot commented on Aug 13, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #98305

  4. melvin-bot commented on Aug 13, 2026

    @melvin-bot

    @mountiny @QichenZhu you have been assigned to this deploy blocker because you reviewed the offending PR: #98305

  5. melvin-bot commented on Aug 13, 2026

    @melvin-bot

    @BartekObudzinski you have been assigned to this deploy blocker because you authored the offending PR: #98305

  6. melvin-bot commented on Aug 13, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  7. github-actions commented on Aug 13, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  8. QichenZhu commented on Aug 13, 2026

    @QichenZhu
    Contributor

    @BartekObudzinski, it seems too many things rely on the original bug to work. Let's wait until the regression test completes, then revert the PR. What do you think?

    cc @mountiny

  9. 1 remaining item

  10. MelvinBot commented on Aug 13, 2026

    @MelvinBot
    Contributor

    Deploy blocker investigation — root cause confirmed

    Offending PR: #98305 (fix: stop Search re-firing an identical query on unrelated Onyx updates) — Melvin's flag was correct. Confidence: High. This is a frontend regression; the fix belongs in Expensify/App.

    Root cause: The bug is in src/hooks/useSearchHighlightAndScroll.ts. #98305 narrowed the Onyx-triggered refetch so that a non-chat Search (Spend › Reports/Expenses) only refetches when the set of transaction IDs changes:

    const reportActionsIDs = isChat ? Object.values(reportActions ?? {}).flatMap(...) : [];   // [] for non-chat
    ...
    if ((isChat ? hasReportActionsIDsChange : hasTransactionsIDsChange) || hasPendingSearchRef.current) {

    Editing an expense amount changes the value but not the transaction ID set, so hasTransactionsIDsChange stays false, the in-place refetch never fires, and the server-computed Total spend stays stale. Before #98305, reportActionsIDs was computed for all search types, so the MODIFIEDEXPENSE report action from the edit triggered a refetch. The PR's own "Note for reviewers" acknowledges this trade-off; it assumed all such flows already call refreshSearchAfterReportAction explicitly, but the expense-amount-edit flow does not.

    Test verification — and why it pins down the exact repro conditions

    I ran the flow on NewDot web. When I edited an amount ($25 → $75) and then did a fresh navigation back to Spend › Reports, the total updated correctly to $75 — the bug did not reproduce:

    Before After (fresh navigation)
    before after

    This is consistent with the root cause, not a contradiction: a fresh navigation re-runs the Search query from scratch and picks up the server total, bypassing the broken in-place refetch. The reported repro (steps 6–9: open the report from the list, edit the amount, close the report back to the same list) stays inside the Search view, so it depends entirely on the Onyx-triggered refetch that #98305 disabled. That is why the total shows stale there but not on a fresh navigation.

    Recommended resolution: Revert #98305 to unblock the deploy — it touches only this one production file and reverts cleanly. The perf issue it fixed (#98048) is pre-existing and non-regression, so it is safe to reintroduce. Preferred follow-up (once out from under deploy-blocker pressure): a roll-forward that keeps the perf optimization but restores a refresh path for value-only expense edits on non-chat searches (e.g. call refreshSearchAfterReportAction on the amount-edit flow, or treat a MODIFIEDEXPENSE action as a refetch trigger).


    Next Steps: Reply with @MelvinBot implement this to open a revert/fix PR, or @MelvinBot <feedback> to refine.

  11. melvin-bot commented on Aug 13, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  12. BartekObudzinski commented on Aug 13, 2026

    @BartekObudzinski
    Contributor

    PR #98305 was reverted in #98548, so this should no longer reproduce on staging.

  13. melvin-bot commented on Aug 13, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  14. melvin-bot commented on Aug 13, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  15. IuliiaHerets commented on Aug 13, 2026

    @IuliiaHerets
  16. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Aug 13, 2026
  17. changed the title [-]Spend - Total spend does not update after editing expense amount[/-] [+][Due for payment 2026-08-21] Spend - Total spend does not update after editing expense amount[/+] on Aug 14, 2026
  18. melvin-bot commented on Aug 14, 2026

    @melvin-bot

    @QichenZhu

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.53-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-08-21. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions