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
Home - Spend over time chart does not auto update after editing it #86533
Version Number: 9.3.50-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:#84011 Email or phone of affected tester (no customers):snodijosdnjoijiosnj@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com
Go to workspace chat.
Create an expense.
Go to Home.
Click Begin next to Submit 1 report.
Click Amount.
Edit amount and save it.
Close the report RHP.
Expected Result:
Spend over time chart will auto update.
Actual Result:
Spend over time chart does not auto update.
It only updates after changing to a different tab and back to Home.
👋 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 (requires App repository fix) Causing PR: Unknown - Unable to identify with high confidence Related Issues: None found
Recommendation: NEEDS INVESTIGATION
The SpendOverTime chart caching/refresh mechanism appears to be broken, but I cannot confidently identify which PR in the current staging deploy caused this regression. PR #84011 (mentioned in the issue) modifies ForYouSection but is not the root cause - ForYouSection and SpendOverTimeSection are independent sibling components.
Labels: No label changes - keeping DeployBlockerCash since this is staging-only and requires investigation
Detailed Analysis
Evidence
The bug report indicates:
SpendOverTime chart does not auto-update after editing an expense amount
Chart only updates after switching tabs and returning to Home
Reproducible on staging: YES
Reproducible on production: NO
This is a staging-only regression introduced in deploy 9.3.50-0.
Technical Root Cause
The useSpendOverTimeData hook (in src/pages/home/SpendOverTimeSection/useSpendOverTimeData.ts) fetches search data based on two dependencies:
The config.hash for SPEND_OVER_TIME is static - it is computed from the search query parameters (last 12 months, grouped by month), NOT from the actual transaction data. When a transaction amount is edited:
The transaction data in Onyx is updated
The search results snapshot (ONYXKEYS.COLLECTION.SNAPSHOT${queryJSON?.hash}) becomes stale
But config.hash does NOT change (it is query-based, not data-based)
Therefore, the useEffect never re-runs to fetch fresh data
The chart continues showing stale cached data until the component unmounts and remounts (e.g., switching tabs)
PR #84011 "fixed Begin button behavior in Home" modified:
src/pages/home/ForYouSection/index.tsx - Added memoization for navigation handlers
src/selectors/Todos.ts - Added selector for single report IDs
These changes only affect the ForYouSection component. SpendOverTimeSection is a sibling component in the HomePage layout and does not share any state, selectors, or dependencies with ForYouSection. The memoization changes in ForYouSection cannot affect SpendOverTimeSection rendering or data fetching.
Investigation Needed
To identify the causing PR, we need to:
Check if any PRs in this deploy modified search snapshot caching/invalidation logic
Check if any PRs modified transaction update flows that should trigger search data refresh
Review PRs that touched src/libs/actions/IOU/index.ts or src/libs/actions/Search.ts
Test on staging to see if there are missing invalidation calls when transactions are modified
Candidate PRs to investigate (from staging deploy checklist):
Any PR modifying IOU/transaction editing flows
Any PR modifying search data caching or snapshot management
Any PR affecting the Home page widget rendering lifecycle
@mukhrr (author of PR #84011) - While your PR was linked to this issue by melvin-bot, my investigation shows it is not the cause of this bug. The SpendOverTime chart issue is related to search snapshot caching, which your PR does not modify.
Can the reporter or QA team help identify if there are other PRs in this deploy that modified transaction editing or search caching behavior?
I think it'd be fair to accept this as a separate issue rather than regression since this feature (Spend over time) was merged to main after a day from my last commit in the PR. cc @justinpersaud@mallenexpensify
making the widget update when the data changes is tricky, because we get the data for the chart by querying the backend and we don't keep the snapshot up to date when the data changes when it is grouped.
we can fix the issue by invoking the search action not only when we navigate to the home page or come back online, but also when the page regains focus, so e.g. after opening and closing an RHP.
however, this has its cost as this will increase the number of backend calls we schedule, with Search command being potentially a quite heavy operation. and a lot of the times we would call it when no data changed at all. but maybe this isn't an issue since this depends on the number of user interactions and same could currently happen when repeatedly switching between the tabs?
Thanks for the analysis @mhawryluk. I'm thinking that we should just not worry about this. I don't think anyone really expects it to get updated in that scenario or is going to notice that it doesn't. I don't think it's worth adding the complexity for.
@trjExpensify or others, feel free to reopen this and keep the discussion going if you disagree.
Activity
melvin-bot commentedon Mar 27, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #84011
melvin-bot commentedon Mar 27, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Mar 27, 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 Mar 27, 2026
I have failed to help you. I let you down and for that I am sorry. Please try again later. This may be due to a Claude outage (check here).
Failure details: https://github.com/Expensify/Expensify/actions/runs/23647316674
OSBotify commentedon Mar 27, 2026
Investigation Summary
Classification: Frontend bug (requires App repository fix)
Causing PR: Unknown - Unable to identify with high confidence
Related Issues: None found
Recommendation: NEEDS INVESTIGATION
The SpendOverTime chart caching/refresh mechanism appears to be broken, but I cannot confidently identify which PR in the current staging deploy caused this regression. PR #84011 (mentioned in the issue) modifies ForYouSection but is not the root cause - ForYouSection and SpendOverTimeSection are independent sibling components.
Labels: No label changes - keeping DeployBlockerCash since this is staging-only and requires investigation
Detailed Analysis
Evidence
The bug report indicates:
This is a staging-only regression introduced in deploy 9.3.50-0.
Technical Root Cause
The
useSpendOverTimeDatahook (insrc/pages/home/SpendOverTimeSection/useSpendOverTimeData.ts) fetches search data based on two dependencies:The
config.hashfor SPEND_OVER_TIME is static - it is computed from the search query parameters (last 12 months, grouped by month), NOT from the actual transaction data. When a transaction amount is edited:ONYXKEYS.COLLECTION.SNAPSHOT${queryJSON?.hash}) becomes staleconfig.hashdoes NOT change (it is query-based, not data-based)Why PR #84011 is NOT the cause
PR #84011 "fixed Begin button behavior in Home" modified:
src/pages/home/ForYouSection/index.tsx- Added memoization for navigation handlerssrc/selectors/Todos.ts- Added selector for single report IDsThese changes only affect the ForYouSection component. SpendOverTimeSection is a sibling component in the HomePage layout and does not share any state, selectors, or dependencies with ForYouSection. The memoization changes in ForYouSection cannot affect SpendOverTimeSection rendering or data fetching.
Investigation Needed
To identify the causing PR, we need to:
src/libs/actions/IOU/index.tsorsrc/libs/actions/Search.tsCandidate PRs to investigate (from staging deploy checklist):
@mukhrr (author of PR #84011) - While your PR was linked to this issue by melvin-bot, my investigation shows it is not the cause of this bug. The SpendOverTime chart issue is related to search snapshot caching, which your PR does not modify.
Can the reporter or QA team help identify if there are other PRs in this deploy that modified transaction editing or search caching behavior?
Fix spend over time chart not auto-updating after expense edit
mukhrr commentedon Mar 27, 2026
I think it'd be fair to accept this as a separate issue rather than regression since this feature (Spend over time) was merged to main after a day from my last commit in the PR. cc @justinpersaud @mallenexpensify
4 remaining items
puneetlath commentedon Mar 27, 2026
@trjExpensify do you think it's important for this graph to update when someone creates/edits an expense from the homepage? I'm ambivalent.
trjExpensify commentedon Mar 27, 2026
Ehh... yeah, me too. It's better UX if it does update on edit, as the tables do when you edit in the RHP and close them.
mhawryluk commentedon Mar 30, 2026
making the widget update when the data changes is tricky, because we get the data for the chart by querying the backend and we don't keep the snapshot up to date when the data changes when it is grouped.
we can fix the issue by invoking the search action not only when we navigate to the home page or come back online, but also when the page regains focus, so e.g. after opening and closing an RHP.
it would look like this:
however, this has its cost as this will increase the number of backend calls we schedule, with Search command being potentially a quite heavy operation. and a lot of the times we would call it when no data changed at all. but maybe this isn't an issue since this depends on the number of user interactions and same could currently happen when repeatedly switching between the tabs?
melvin-bot commentedon Mar 30, 2026
@puneetlath Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Mar 30, 2026
@puneetlath Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Mar 30, 2026
@puneetlath Whoops! This issue is 2 days overdue. Let's get this updated quick!
puneetlath commentedon Apr 1, 2026
Thanks for the analysis @mhawryluk. I'm thinking that we should just not worry about this. I don't think anyone really expects it to get updated in that scenario or is going to notice that it doesn't. I don't think it's worth adding the complexity for.
@trjExpensify or others, feel free to reopen this and keep the discussion going if you disagree.