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

Open
opened 2026-05-26 14:27:02 -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: 🔄 Open

Base: masterHead: monthly-spending-average-range


📝 Commits (5)

  • 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

📊 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 33 14.01 MB → 14.01 MB (+6.36 kB) +0.04%
loot-core 1 5.34 MB 0%
api 2 3.96 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
33 14.01 MB → 14.01 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.04%) 9.13 kB → 9.22 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.26 MB (+6.26 kB) +0.49%
static/js/index.js 2.02 MB → 2.02 MB (+97 B) +0.00%

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/ScheduleEditForm.js 146.45 kB 0%
static/js/TransactionEdit.js 89.65 kB 0%
static/js/TransactionList.js 85.81 kB 0%
static/js/Value.js 5.08 MB 0%
static/js/bankSyncUtils.js 54.15 kB 0%
static/js/ca.js 186.78 kB 0%
static/js/chart-theme.js 800.6 kB 0%
static/js/client.js 451.37 kB 0%
static/js/da.js 101.17 kB 0%
static/js/de.js 170.58 kB 0%
static/js/en-GB.js 9.25 kB 0%
static/js/en.js 197.86 kB 0%
static/js/es.js 178.71 kB 0%
static/js/extends.js 500.57 kB 0%
static/js/fr.js 178.61 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 165.02 kB 0%
static/js/narrow.js 364.2 kB 0%
static/js/nb-NO.js 148.08 kB 0%
static/js/nl.js 106.24 kB 0%
static/js/pt-BR.js 188.46 kB 0%
static/js/resize-observer.js 18.06 kB 0%
static/js/th.js 174.48 kB 0%
static/js/theme.js 31.77 kB 0%
static/js/uk.js 207.38 kB 0%
static/js/useFormatList.js 4.96 kB 0%
static/js/wide.js 453 B 0%
static/js/workbox-window.prod.es5.js 7.33 kB 0%
static/js/zh-Hans.js 116.92 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.34 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.Cn6Jnyv4.js 5.34 MB 0%

api

Total

Files count Total bundle size % Changed
2 3.96 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.96 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:** 🔄 Open **Base:** `master` ← **Head:** `monthly-spending-average-range` --- ### 📝 Commits (5) - [`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 ### 📊 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 | 33 | 14.01 MB → 14.01 MB (+6.36 kB) | +0.04% loot-core | 1 | 5.34 MB | 0% api | 2 | 3.96 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 ----------- | ----------------- | --------- 33 | 14.01 MB → 14.01 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.04%) | 9.13 kB → 9.22 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.26 MB (+6.26 kB) | +0.49% static/js/index.js | 2.02 MB → 2.02 MB (+97 B) | +0.00% **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/ScheduleEditForm.js | 146.45 kB | 0% static/js/TransactionEdit.js | 89.65 kB | 0% static/js/TransactionList.js | 85.81 kB | 0% static/js/Value.js | 5.08 MB | 0% static/js/bankSyncUtils.js | 54.15 kB | 0% static/js/ca.js | 186.78 kB | 0% static/js/chart-theme.js | 800.6 kB | 0% static/js/client.js | 451.37 kB | 0% static/js/da.js | 101.17 kB | 0% static/js/de.js | 170.58 kB | 0% static/js/en-GB.js | 9.25 kB | 0% static/js/en.js | 197.86 kB | 0% static/js/es.js | 178.71 kB | 0% static/js/extends.js | 500.57 kB | 0% static/js/fr.js | 178.61 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.46 kB | 0% static/js/it.js | 165.02 kB | 0% static/js/narrow.js | 364.2 kB | 0% static/js/nb-NO.js | 148.08 kB | 0% static/js/nl.js | 106.24 kB | 0% static/js/pt-BR.js | 188.46 kB | 0% static/js/resize-observer.js | 18.06 kB | 0% static/js/th.js | 174.48 kB | 0% static/js/theme.js | 31.77 kB | 0% static/js/uk.js | 207.38 kB | 0% static/js/useFormatList.js | 4.96 kB | 0% static/js/wide.js | 453 B | 0% static/js/workbox-window.prod.es5.js | 7.33 kB | 0% static/js/zh-Hans.js | 116.92 kB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.34 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.Cn6Jnyv4.js | 5.34 MB | 0% </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 2 | 3.96 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.96 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-05-26 14:27:02 -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#97393