[Due for payment 2026-11-25] [Insights polish] [R2] Stop plotting future periods and future-dated expenses on the Spend dashboard
Background
When the Date range ends after today, e.g. This month, This quarter, or This year, the Spend dashboard plots every period through the end of the range. Periods that haven't happened yet are drawn as $0, expenses dated in the future are plotted on their dates, and the Compare: Average line divides spend by every period, future ones included.
On Nov 3 with This month by Week:
Spend over timedrops from $251,313.62 to $0.00 for Nov 8–14, then plots a future-dated $381.90 for Nov 15–21. The line reads as spend collapsing.- The
$50k avgline is $251,695.52 ÷ 5 weeks, three of which haven't started. - An AI insight card reads
Spend was 399% above average in Nov 1–7, because it compares against that same average.
This issue counts only what has happened: the Spend dashboard stops at today and shows the total of future-dated expenses in a note on Spend over time. Date ranges that end before today don't change. The average fix, and comparing the in-progress period against an average to date, are in #
Product and design details
This year by Month, desktop, with the note on Spend over time
[The same, on mobile]
What counts
- The Spend dashboard counts expenses dated through today, using the same day the Date filter uses for
This month. - This applies to everything on the dashboard: every graph, tooltip,
Share of total, bothCompareoptions, the AI insight cards,Explain, and theDetailspanel opened from a graph. - Expenses dated after today are left out, even when the Date range includes their date.
- Ranges that already end today or earlier, like
Last 30 daysorLast month, aren't affected.
Spend over time
- The x-axis ends at the period that contains today. Later periods in the Date range aren't drawn or labeled.
- The period containing today keeps its in-progress styling from #103089.
- When that leaves one period, the graph draws it as a single bar.
Running totalends at today too.- With
Compare: Previous period: the x-axis spans the full Date range, so the previous period's line runs through every period, e.g. Oct 1–31 withThis monthbyDay. The current line stops at today, and nothing is drawn for it after today, not even $0. - The current-period Date options offer fewer
Group byoptions, since the larger groupings leave one or two points, mostly partial, for much of the period:
| Date | Group by options |
|---|---|
This week |
Day, Running total (no change) |
This month |
Day, Running total (Week removed) |
This quarter |
Week, Running total (Month removed) |
This year |
Week, Month, Running total (Quarter removed) |
- A saved option that's no longer offered switches to the nearest one and is saved, the same way #103450 handles an option that no longer fits, e.g.
WeekonThis monthbecomesDay. - The
Lastand rolling options, e.g.Last monthorLast 90 days, keep the options #103450 gives them.
Average
Compare: AverageonSpend over timecounts complete periods only, per #, so periods after today never count. - The ranking graphs' all-item averages (#104931) don't otherwise change. They follow What counts, so each item's total stops at today.
Future-dated expenses
- When the Date range includes expenses dated after today,
Spend over timeshows a note below its header and above the plot, left-aligned, in the small secondary text style:Not shown: $1,204.50 in future expenses. View. - The note only appears on
Spend over time, but every graph on the dashboard leaves these expenses out, per What counts. - The amount is in the
Group currency. Only expenses the person can already see on the Spend page count. Viewopens the Spend page filtered to expenses dated after today through the end of the Date range, with the dashboard'sWorkspacefilter, e.g.type:expense date>2026-11-03 date<2026-12-01.- Desktop and mobile show the note in the same place, wrapping on mobile as needed.
- The note is hidden when there are no future-dated expenses in the range.
- The Home
Spend over timewidget leaves future-dated expenses out the same way, but doesn't show the note.
Issue Owner
Current Issue Owner: @mallenexpensify
With Compare: Previous period: the x-axis spans the full Date range, so the previous period's line runs through every period, e.g. Oct 1–31 with This month by Day. The current line stops at today, and nothing is drawn for it after today, not even $0.
just to confirm: previous-period line runs the whole period even if there are no expenses? we no longer want this (the previous period line goes as far as there are expenses) condition?
Yeah, I think we should undo that too after spending more time with the data. Example to illustrate my thinking:
- User has
this monthselected andprevious period - All the filters are sticky and they come and check the graph several times a week
In this case, they'll see the data fill in as time goes on, all compared against the previous period, and then they end in the same place at the end of the month.
makes sense, thanks
@OlGierd03 BE PR is deployed
Great! I'll open the PR for review today
@truph01
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.5.41-2 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/106514
If no regressions arise, payment will be issued on 2026-11-25. :confetti_ball:
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]
Triggered auto assignment to @mallenexpensify (Awaiting Payment)
Payment Summary
Resolving PRs:
-
https://github.com/Expensify/App/pull/106514
-
Contributor: @mhawryluk does not require payment (Contractor)
-
Reviewer: @truph01 owed $175 via NewDot
BugZero Checklist (@mallenexpensify)
- [ ] I have confirmed assignees, roles, and Upwork contracts look correct
- [ ] I have paid out Upwork contracts / manual NewDot requests
- [ ] [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
@mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
Contributor+ Checklist:
-
[x] [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: N/A Link to the comment on the Issue:
-
[ ] [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
-
[ ] [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
Test:
- Open Insights > Spend, set Date to
This monthand Group by toDay. Verify Spend over time ends at today and draws nothing, not even $0, for later days. - Verify
Not shown: <amount> in future expenses. Viewshows below the chart. PressViewand verify Spend opens with expenses dated after today through the end of the month, in the dashboard's workspaces. - Set Compare to
Previous periodand verify the previous month's line runs through the whole month while the current line stops at today. - Open Group by and verify
This monthoffers onlyDay,This quarteronlyWeekandThis yearWeekandMonth. VerifyLast monthstill offersWeek. - With
Weekselected onLast month, switch Date toThis monthand verify the pill showsRunning total. Switch Date back toLast monthand verify the pill showsWeekagain. - Open the details of today's point and verify Top expenses leaves out expenses dated after today.
- Download the Spend over time CSV and verify it has no rows after today.
- Switch to Compliance, set Date to
This yearand Group by toMonth. Verify Violations over time starts at the month tracking started andViolations are tracked from <date>.shows below the chart. - Set Compare to
Previous periodand verify no compared line is drawn and the note still shows. - Set Date to
Last 30 dayswith Compare off and verify the note is hidden. - Repeat steps 2 and 8 on a narrow layout and verify the notes wrap.
Do we agree 👍 or 👎
Matt's AI agent:
Prep notes for the CM. This is not a payment approval. Do not request payment until the CM posts the final amount.
Ready.
Job price: $250.
- truph01 (C+): 100%, via NewDot
Price basis: project started before 2026-09-19 (645498): bernhardoj assigned, 2026-09-10.
Next: press Caps+Y, then pay.
Evidence
PAYPREP v1
Payment Summary
Contributor+: @truph01 due $250 via NewDot