[PR #7920] [MERGED] [AI] Add configurable average ranges to Monthly Spending report #122212

Closed
opened 2026-06-11 20:56:19 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7920
Author: @MattFaz
Created: 5/22/2026
Status: Merged
Merged: 6/5/2026
Merged by: @youngcw

Base: masterHead: monthly-spending-average-range


📝 Commits (6)

  • d7e1cdc Add configurable average ranges to Monthly Spending report
  • 29d9d03 Delete upcoming-release-notes/temp.md
  • 09b966f Update packages/desktop-client/src/components/reports/spendingAverageRange.test.ts
  • 74edd35 Fix spending average range test import
  • 2310948 Update VRT screenshots
  • f917b83 Merge branch 'master' into monthly-spending-average-range

📊 Changes

16 files changed (+512 additions, -66 deletions)

View changed files

📝 packages/desktop-client/e2e/command-bar.test.ts-snapshots/Command-bar-Check-the-command-bar-search-works-correctly-1-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/command-bar.test.ts-snapshots/Command-bar-Check-the-command-bar-search-works-correctly-2-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/command-bar.test.ts-snapshots/Command-bar-Check-the-command-bar-search-works-correctly-3-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-and-cash-flow-reports-1-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-and-cash-flow-reports-2-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-and-cash-flow-reports-3-chromium-linux.png (+0 -0)
📝 packages/desktop-client/package.json (+1 -0)
📝 packages/desktop-client/src/components/reports/DateRange.tsx (+9 -2)
📝 packages/desktop-client/src/components/reports/reports/Spending.tsx (+50 -37)
📝 packages/desktop-client/src/components/reports/reports/SpendingCard.tsx (+18 -1)
packages/desktop-client/src/components/reports/spendingAverageRange.test.ts (+171 -0)
packages/desktop-client/src/components/reports/spendingAverageRange.ts (+174 -0)
📝 packages/desktop-client/src/components/reports/spreadsheets/spending-spreadsheet.ts (+64 -26)
📝 packages/loot-core/src/types/models/dashboard.ts (+14 -0)
📝 packages/loot-core/src/types/models/reports.ts (+5 -0)
upcoming-release-notes/7920.md (+6 -0)

📄 Description

Description

Add configurable average ranges to the Monthly Spending report.

In Average mode, the second comparison selector now lets users choose Last 3 months, Last 6 months, Last 12 months, YTD, or All time. Existing reports keep the current Last 3 months behavior by default. The summary label also shows the selected average range, so values like all-time averages are easier to understand.

N/A

Testing

Ran the automated tests:

  • yarn workspace @actual-app/web test src/components/reports/spendingAverageRange.test.ts src/components/reports/reportRanges.test.ts
  • yarn workspace @actual-app/web typecheck
  • yarn lint:fix

Performed manual testing:

  • Opened the Monthly Spending report
  • Switched to Average mode
  • Confirmed the comparison selector shows Last 3 months, Last 6 months, Last 12 months, YTD, and All time
  • Confirmed the summary label reflects the selected range

Checklist

  • Release notes added (see link above)
  • No obvious regressions in affected areas
  • Self-review has been performed - I understand what each change in the code does and why it is needed

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 37 14.05 MB → 14.06 MB (+6.36 kB) +0.04%
loot-core 1 5.28 MB 0%
api 2 3.86 MB 0%
cli 1 7.97 MB 0%
crdt 1 11.12 kB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
37 14.05 MB → 14.06 MB (+6.36 kB) +0.04%
Changeset
File Δ Size
src/components/reports/spendingAverageRange.ts 🆕 +2.88 kB 0 B → 2.88 kB
src/components/reports/spreadsheets/spending-spreadsheet.ts 📈 +954 B (+16.75%) 5.56 kB → 6.49 kB
src/components/reports/reports/Spending.tsx 📈 +1.78 kB (+7.81%) 22.8 kB → 24.58 kB
src/components/reports/reports/SpendingCard.tsx 📈 +534 B (+6.85%) 7.61 kB → 8.13 kB
src/components/reports/DateRange.tsx 📈 +153 B (+4.69%) 3.19 kB → 3.34 kB
package.json 📈 +97 B (+1.01%) 9.39 kB → 9.49 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/ReportRouter.js 1.26 MB → 1.27 MB (+6.26 kB) +0.49%
static/js/index.js 1.56 MB → 1.56 MB (+97 B) +0.01%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/BackgroundImage.js 121.09 kB 0%
static/js/FormulaEditor.js 962.55 kB 0%
static/js/ManageRules.js 46.6 kB 0%
static/js/PayeeRuleCountLabel.js 7.33 kB 0%
static/js/ScheduleEditForm.js 146.44 kB 0%
static/js/SchedulesTable.js 202.7 kB 0%
static/js/TransactionEdit.js 90.63 kB 0%
static/js/TransactionList.js 85.81 kB 0%
static/js/Value.js 5.08 MB 0%
static/js/_baseIsEqual.js 98.38 kB 0%
static/js/ca.js 186.26 kB 0%
static/js/client.js 451.37 kB 0%
static/js/da.js 100.8 kB 0%
static/js/de.js 170.65 kB 0%
static/js/en-GB.js 9.25 kB 0%
static/js/en.js 200.02 kB 0%
static/js/es.js 178.21 kB 0%
static/js/extends.js 508.06 kB 0%
static/js/fr.js 178.06 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 164.53 kB 0%
static/js/narrow.js 364.2 kB 0%
static/js/nb-NO.js 147.72 kB 0%
static/js/nl.js 106.82 kB 0%
static/js/pt-BR.js 187.97 kB 0%
static/js/resize-observer.js 18.06 kB 0%
static/js/th.js 174.31 kB 0%
static/js/theme.js 31.88 kB 0%
static/js/toString.js 705.14 kB 0%
static/js/uk.js 208.65 kB 0%
static/js/useFormatList.js 2.52 kB 0%
static/js/useTransactionBatchActions.js 9.71 kB 0%
static/js/wide.js 298.88 kB 0%
static/js/workbox-window.prod.es5.js 7.33 kB 0%
static/js/zh-Hans.js 116.84 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.28 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.BkkH_8jr.js 5.28 MB 0%

api

Total

Files count Total bundle size % Changed
2 3.86 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
index.js 3.86 MB 0%
models.js 0 B 0%

cli

Total

Files count Total bundle size % Changed
1 7.97 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
cli.js 7.97 MB 0%

crdt

Total

Files count Total bundle size % Changed
1 11.12 kB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
index.js 11.12 kB 0%

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/7920 **Author:** [@MattFaz](https://github.com/MattFaz) **Created:** 5/22/2026 **Status:** ✅ Merged **Merged:** 6/5/2026 **Merged by:** [@youngcw](https://github.com/youngcw) **Base:** `master` ← **Head:** `monthly-spending-average-range` --- ### 📝 Commits (6) - [`d7e1cdc`](https://github.com/actualbudget/actual/commit/d7e1cdc1700b7dce1f7f83fa840faf1ab3d44d5b) Add configurable average ranges to Monthly Spending report - [`29d9d03`](https://github.com/actualbudget/actual/commit/29d9d0380031edef4dba350c894afce8ba1efda8) Delete upcoming-release-notes/temp.md - [`09b966f`](https://github.com/actualbudget/actual/commit/09b966f0dc5f5649324379aad1d6b3f40842867d) Update packages/desktop-client/src/components/reports/spendingAverageRange.test.ts - [`74edd35`](https://github.com/actualbudget/actual/commit/74edd3534c221dfd487a16130a9d517659be2d42) Fix spending average range test import - [`2310948`](https://github.com/actualbudget/actual/commit/23109481e3791195256fcc987a174506211ab00a) Update VRT screenshots - [`f917b83`](https://github.com/actualbudget/actual/commit/f917b8362e29244f4964f7962a1d62246741988c) Merge branch 'master' into monthly-spending-average-range ### 📊 Changes **16 files changed** (+512 additions, -66 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/e2e/command-bar.test.ts-snapshots/Command-bar-Check-the-command-bar-search-works-correctly-1-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/command-bar.test.ts-snapshots/Command-bar-Check-the-command-bar-search-works-correctly-2-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/command-bar.test.ts-snapshots/Command-bar-Check-the-command-bar-search-works-correctly-3-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-and-cash-flow-reports-1-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-and-cash-flow-reports-2-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-and-cash-flow-reports-3-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/package.json` (+1 -0) 📝 `packages/desktop-client/src/components/reports/DateRange.tsx` (+9 -2) 📝 `packages/desktop-client/src/components/reports/reports/Spending.tsx` (+50 -37) 📝 `packages/desktop-client/src/components/reports/reports/SpendingCard.tsx` (+18 -1) ➕ `packages/desktop-client/src/components/reports/spendingAverageRange.test.ts` (+171 -0) ➕ `packages/desktop-client/src/components/reports/spendingAverageRange.ts` (+174 -0) 📝 `packages/desktop-client/src/components/reports/spreadsheets/spending-spreadsheet.ts` (+64 -26) 📝 `packages/loot-core/src/types/models/dashboard.ts` (+14 -0) 📝 `packages/loot-core/src/types/models/reports.ts` (+5 -0) ➕ `upcoming-release-notes/7920.md` (+6 -0) </details> ### 📄 Description ## Description Add configurable average ranges to the Monthly Spending report. In Average mode, the second comparison selector now lets users choose Last 3 months, Last 6 months, Last 12 months, YTD, or All time. Existing reports keep the current Last 3 months behavior by default. The summary label also shows the selected average range, so values like all-time averages are easier to understand. ## Related issue(s) N/A ## Testing Ran the automated tests: - `yarn workspace @actual-app/web test src/components/reports/spendingAverageRange.test.ts src/components/reports/reportRanges.test.ts` - `yarn workspace @actual-app/web typecheck` - `yarn lint:fix` Performed manual testing: - Opened the Monthly Spending report - Switched to Average mode - Confirmed the comparison selector shows Last 3 months, Last 6 months, Last 12 months, YTD, and All time - Confirmed the summary label reflects the selected range ## Checklist - [x] Release notes added (see link above) - [x] No obvious regressions in affected areas - [x] Self-review has been performed - I understand what each change in the code does and why it is needed <!--- actual-bot-sections ---> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 37 | 14.05 MB → 14.06 MB (+6.36 kB) | +0.04% loot-core | 1 | 5.28 MB | 0% api | 2 | 3.86 MB | 0% cli | 1 | 7.97 MB | 0% crdt | 1 | 11.12 kB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 37 | 14.05 MB → 14.06 MB (+6.36 kB) | +0.04% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/components/reports/spendingAverageRange.ts` | 🆕 +2.88 kB | 0 B → 2.88 kB `src/components/reports/spreadsheets/spending-spreadsheet.ts` | 📈 +954 B (+16.75%) | 5.56 kB → 6.49 kB `src/components/reports/reports/Spending.tsx` | 📈 +1.78 kB (+7.81%) | 22.8 kB → 24.58 kB `src/components/reports/reports/SpendingCard.tsx` | 📈 +534 B (+6.85%) | 7.61 kB → 8.13 kB `src/components/reports/DateRange.tsx` | 📈 +153 B (+4.69%) | 3.19 kB → 3.34 kB `package.json` | 📈 +97 B (+1.01%) | 9.39 kB → 9.49 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- static/js/ReportRouter.js | 1.26 MB → 1.27 MB (+6.26 kB) | +0.49% static/js/index.js | 1.56 MB → 1.56 MB (+97 B) | +0.01% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/BackgroundImage.js | 121.09 kB | 0% static/js/FormulaEditor.js | 962.55 kB | 0% static/js/ManageRules.js | 46.6 kB | 0% static/js/PayeeRuleCountLabel.js | 7.33 kB | 0% static/js/ScheduleEditForm.js | 146.44 kB | 0% static/js/SchedulesTable.js | 202.7 kB | 0% static/js/TransactionEdit.js | 90.63 kB | 0% static/js/TransactionList.js | 85.81 kB | 0% static/js/Value.js | 5.08 MB | 0% static/js/_baseIsEqual.js | 98.38 kB | 0% static/js/ca.js | 186.26 kB | 0% static/js/client.js | 451.37 kB | 0% static/js/da.js | 100.8 kB | 0% static/js/de.js | 170.65 kB | 0% static/js/en-GB.js | 9.25 kB | 0% static/js/en.js | 200.02 kB | 0% static/js/es.js | 178.21 kB | 0% static/js/extends.js | 508.06 kB | 0% static/js/fr.js | 178.06 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.46 kB | 0% static/js/it.js | 164.53 kB | 0% static/js/narrow.js | 364.2 kB | 0% static/js/nb-NO.js | 147.72 kB | 0% static/js/nl.js | 106.82 kB | 0% static/js/pt-BR.js | 187.97 kB | 0% static/js/resize-observer.js | 18.06 kB | 0% static/js/th.js | 174.31 kB | 0% static/js/theme.js | 31.88 kB | 0% static/js/toString.js | 705.14 kB | 0% static/js/uk.js | 208.65 kB | 0% static/js/useFormatList.js | 2.52 kB | 0% static/js/useTransactionBatchActions.js | 9.71 kB | 0% static/js/wide.js | 298.88 kB | 0% static/js/workbox-window.prod.es5.js | 7.33 kB | 0% static/js/zh-Hans.js | 116.84 kB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.28 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.BkkH_8jr.js | 5.28 MB | 0% </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 2 | 3.86 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- index.js | 3.86 MB | 0% models.js | 0 B | 0% </div> </details> --- #### cli **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 7.97 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- cli.js | 7.97 MB | 0% </div> </details> --- #### crdt **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 11.12 kB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- index.js | 11.12 kB | 0% </div> </details> </details> <!--- bundlestats-action-comment key:combined end ---> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-11 20:56:19 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#122212