[PR #7884] [MERGED] [AI] Add tracking budget forecast mode #122185

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

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7884
Author: @samaluk
Created: 5/18/2026
Status: Merged
Merged: 6/11/2026
Merged by: @youngcw

Base: masterHead: feature/tracking-budget-forecast-mode


📝 Commits (9)

  • 938a4db [AI] Add forecast source types
  • 2879359 [AI] Add tracking budget forecast projection helper
  • 0cf04f3 [AI] Route forecast generation by source
  • ceda74d [AI] Add forecast source selector to report
  • ad0a3dd [AI] Persist forecast source on dashboard widgets
  • 9637e92 [AI] Add tracking forecast UI coverage
  • 1cf866d [AI] Add tracking budget forecast VRT coverage
  • c6c4334 [AI] Document tracking budget forecast mode
  • 5a2015a [AI] Add release notes for tracking budget forecast mode

📊 Changes

20 files changed (+637 additions, -66 deletions)

View changed files

📝 packages/desktop-client/e2e/page-models/budget-page.ts (+64 -2)
📝 packages/desktop-client/e2e/page-models/navigation.ts (+9 -0)
📝 packages/desktop-client/e2e/page-models/reports-page.ts (+16 -0)
📝 packages/desktop-client/e2e/reports.test.ts (+24 -2)
packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-tracking-budget-forecast-report-1-chromium-linux.png (+0 -0)
packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-tracking-budget-forecast-report-2-chromium-linux.png (+0 -0)
packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-tracking-budget-forecast-report-3-chromium-linux.png (+0 -0)
📝 packages/desktop-client/src/components/budget/MonthPicker.tsx (+2 -0)
📝 packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx (+118 -43)
📝 packages/desktop-client/src/components/reports/reports/BalanceForecastCard.tsx (+23 -6)
packages/desktop-client/src/hooks/useBalanceForecast.test.ts (+54 -0)
📝 packages/desktop-client/src/hooks/useBalanceForecast.ts (+41 -9)
📝 packages/docs/docs/experimental/balance-forecast-report.md (+8 -3)
📝 packages/loot-core/src/server/forecast/app.test.ts (+48 -0)
📝 packages/loot-core/src/server/forecast/app.ts (+38 -1)
packages/loot-core/src/server/forecast/forecast-tracking-budget.test.ts (+88 -0)
packages/loot-core/src/server/forecast/forecast-tracking-budget.ts (+93 -0)
📝 packages/loot-core/src/types/models/dashboard.ts (+2 -0)
📝 packages/loot-core/src/types/models/forecast.ts (+3 -0)
upcoming-release-notes/7884.md (+6 -0)

📄 Description

Description

Adds a Tracking Budget forecast source for the Balance Forecast report. In Tracking Budget files, the report can project balances from the current on-budget balance plus budgeted income minus budgeted expenses, while preserving the existing scheduled-transaction forecast mode for schedule/account-based projections.

This also wires the forecast source through report widgets, dashboard cards, documentation, release notes, and VRT/E2E coverage.

Relates to #7669

Testing

  • Added unit coverage for tracking-budget forecast projection and request building.
  • Added E2E/VRT coverage for the tracking budget forecast report flow.
  • Ran yarn workspace @actual-app/web test src/hooks/useBalanceForecast.test.ts (3 tests passed; Vitest then hung during Vite shutdown after reporting success).
  • Ran yarn workspace @actual-app/web run playwright test e2e/reports.test.ts --list to verify the reports suite loads after fixing the serial/parallel configuration conflict.

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.14 MB → 14.14 MB (+3.26 kB) +0.02%
loot-core 1 5.28 MB → 5.29 MB (+2.62 kB) +0.05%
api 2 3.87 MB → 3.87 MB (+2.55 kB) +0.06%
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.14 MB → 14.14 MB (+3.26 kB) +0.02%
Changeset
File Δ Size
src/hooks/useBalanceForecast.ts 📈 +425 B (+63.24%) 672 B → 1.07 kB
src/components/reports/reports/BalanceForecast.tsx 📈 +2.1 kB (+14.13%) 14.85 kB → 16.95 kB
src/components/reports/reports/BalanceForecastCard.tsx 📈 +657 B (+6.03%) 10.64 kB → 11.28 kB
src/components/budget/MonthPicker.tsx 📈 +107 B (+1.22%) 8.59 kB → 8.7 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.27 MB → 1.27 MB (+3.15 kB) +0.24%
static/js/wide.js 298.88 kB → 298.99 kB (+107 B) +0.03%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/index.js 1.6 MB 0%
static/js/BackgroundImage.js 121.09 kB 0%
static/js/FormulaEditor.js 962.55 kB 0%
static/js/ManageRules.js 46.63 kB 0%
static/js/PayeeRuleCountLabel.js 7.33 kB 0%
static/js/ScheduleEditForm.js 146.57 kB 0%
static/js/SchedulesTable.js 206.3 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 185.63 kB 0%
static/js/client.js 451.37 kB 0%
static/js/da.js 100.19 kB 0%
static/js/de.js 182.38 kB 0%
static/js/en-GB.js 9.25 kB 0%
static/js/en.js 201.71 kB 0%
static/js/es.js 177.58 kB 0%
static/js/extends.js 508.79 kB 0%
static/js/fr.js 177.35 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 163.93 kB 0%
static/js/narrow.js 365.05 kB 0%
static/js/nb-NO.js 147.07 kB 0%
static/js/nl.js 119.71 kB 0%
static/js/pt-BR.js 187.34 kB 0%
static/js/resize-observer.js 18.06 kB 0%
static/js/th.js 173.33 kB 0%
static/js/theme.js 31.88 kB 0%
static/js/toString.js 705.18 kB 0%
static/js/uk.js 216.7 kB 0%
static/js/useFormatList.js 2.52 kB 0%
static/js/useTransactionBatchActions.js 9.71 kB 0%
static/js/workbox-window.prod.es5.js 7.33 kB 0%
static/js/zh-Hans.js 116.44 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.28 MB → 5.29 MB (+2.62 kB) +0.05%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/forecast/forecast-tracking-budget.ts 🆕 +1.82 kB 0 B → 1.82 kB
home/runner/work/actual/actual/packages/loot-core/src/server/forecast/app.ts 📈 +728 B (+29.45%) 2.41 kB → 3.13 kB
home/runner/work/actual/actual/packages/loot-core/src/shared/months.ts 📈 +84 B (+1.56%) 5.25 kB → 5.33 kB
View detailed bundle breakdown

Added

Asset File Size % Changed
kcab.worker.DjCqYlkp.js 0 B → 5.29 MB (+5.29 MB) -

Removed

Asset File Size % Changed
kcab.worker.AuU5VhIL.js 5.28 MB → 0 B (-5.28 MB) -100%

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged
No assets were unchanged


api

Total

Files count Total bundle size % Changed
2 3.87 MB → 3.87 MB (+2.55 kB) +0.06%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/forecast/forecast-tracking-budget.ts 🆕 +1.78 kB 0 B → 1.78 kB
home/runner/work/actual/actual/packages/loot-core/src/server/forecast/app.ts 📈 +709 B (+29.37%) 2.36 kB → 3.05 kB
home/runner/work/actual/actual/packages/loot-core/src/shared/months.ts 📈 +81 B (+1.56%) 5.06 kB → 5.14 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
index.js 3.87 MB → 3.87 MB (+2.55 kB) +0.06%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
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/7884 **Author:** [@samaluk](https://github.com/samaluk) **Created:** 5/18/2026 **Status:** ✅ Merged **Merged:** 6/11/2026 **Merged by:** [@youngcw](https://github.com/youngcw) **Base:** `master` ← **Head:** `feature/tracking-budget-forecast-mode` --- ### 📝 Commits (9) - [`938a4db`](https://github.com/actualbudget/actual/commit/938a4db13d00e28821ceec92182230db6d2b2696) [AI] Add forecast source types - [`2879359`](https://github.com/actualbudget/actual/commit/287935956aae7d510d19438e062db78e66a559b8) [AI] Add tracking budget forecast projection helper - [`0cf04f3`](https://github.com/actualbudget/actual/commit/0cf04f355f31a747b318cbdb8dd3f19586b26bad) [AI] Route forecast generation by source - [`ceda74d`](https://github.com/actualbudget/actual/commit/ceda74dc76f37f3d5591cc55d3cbc1d4da407148) [AI] Add forecast source selector to report - [`ad0a3dd`](https://github.com/actualbudget/actual/commit/ad0a3dd09c5ee270b4fc489a73d130472fe08b3c) [AI] Persist forecast source on dashboard widgets - [`9637e92`](https://github.com/actualbudget/actual/commit/9637e9201de91c5eff881867baf7414559aa9a76) [AI] Add tracking forecast UI coverage - [`1cf866d`](https://github.com/actualbudget/actual/commit/1cf866da50ee7864d9f9ee49aa5b2a66c145aaf2) [AI] Add tracking budget forecast VRT coverage - [`c6c4334`](https://github.com/actualbudget/actual/commit/c6c433463ae95e51bbfab4670b1640f8b712d096) [AI] Document tracking budget forecast mode - [`5a2015a`](https://github.com/actualbudget/actual/commit/5a2015a12c4822fe6bfa7590e872089785d23cc9) [AI] Add release notes for tracking budget forecast mode ### 📊 Changes **20 files changed** (+637 additions, -66 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/e2e/page-models/budget-page.ts` (+64 -2) 📝 `packages/desktop-client/e2e/page-models/navigation.ts` (+9 -0) 📝 `packages/desktop-client/e2e/page-models/reports-page.ts` (+16 -0) 📝 `packages/desktop-client/e2e/reports.test.ts` (+24 -2) ➕ `packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-tracking-budget-forecast-report-1-chromium-linux.png` (+0 -0) ➕ `packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-tracking-budget-forecast-report-2-chromium-linux.png` (+0 -0) ➕ `packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-tracking-budget-forecast-report-3-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/src/components/budget/MonthPicker.tsx` (+2 -0) 📝 `packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx` (+118 -43) 📝 `packages/desktop-client/src/components/reports/reports/BalanceForecastCard.tsx` (+23 -6) ➕ `packages/desktop-client/src/hooks/useBalanceForecast.test.ts` (+54 -0) 📝 `packages/desktop-client/src/hooks/useBalanceForecast.ts` (+41 -9) 📝 `packages/docs/docs/experimental/balance-forecast-report.md` (+8 -3) 📝 `packages/loot-core/src/server/forecast/app.test.ts` (+48 -0) 📝 `packages/loot-core/src/server/forecast/app.ts` (+38 -1) ➕ `packages/loot-core/src/server/forecast/forecast-tracking-budget.test.ts` (+88 -0) ➕ `packages/loot-core/src/server/forecast/forecast-tracking-budget.ts` (+93 -0) 📝 `packages/loot-core/src/types/models/dashboard.ts` (+2 -0) 📝 `packages/loot-core/src/types/models/forecast.ts` (+3 -0) ➕ `upcoming-release-notes/7884.md` (+6 -0) </details> ### 📄 Description ## Description Adds a Tracking Budget forecast source for the Balance Forecast report. In Tracking Budget files, the report can project balances from the current on-budget balance plus budgeted income minus budgeted expenses, while preserving the existing scheduled-transaction forecast mode for schedule/account-based projections. This also wires the forecast source through report widgets, dashboard cards, documentation, release notes, and VRT/E2E coverage. ## Related issue(s) Relates to #7669 ## Testing - Added unit coverage for tracking-budget forecast projection and request building. - Added E2E/VRT coverage for the tracking budget forecast report flow. - Ran `yarn workspace @actual-app/web test src/hooks/useBalanceForecast.test.ts` (3 tests passed; Vitest then hung during Vite shutdown after reporting success). - Ran `yarn workspace @actual-app/web run playwright test e2e/reports.test.ts --list` to verify the reports suite loads after fixing the serial/parallel configuration conflict. ## 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.14 MB → 14.14 MB (+3.26 kB) | +0.02% loot-core | 1 | 5.28 MB → 5.29 MB (+2.62 kB) | +0.05% api | 2 | 3.87 MB → 3.87 MB (+2.55 kB) | +0.06% 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.14 MB → 14.14 MB (+3.26 kB) | +0.02% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/hooks/useBalanceForecast.ts` | 📈 +425 B (+63.24%) | 672 B → 1.07 kB `src/components/reports/reports/BalanceForecast.tsx` | 📈 +2.1 kB (+14.13%) | 14.85 kB → 16.95 kB `src/components/reports/reports/BalanceForecastCard.tsx` | 📈 +657 B (+6.03%) | 10.64 kB → 11.28 kB `src/components/budget/MonthPicker.tsx` | 📈 +107 B (+1.22%) | 8.59 kB → 8.7 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.27 MB → 1.27 MB (+3.15 kB) | +0.24% static/js/wide.js | 298.88 kB → 298.99 kB (+107 B) | +0.03% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/index.js | 1.6 MB | 0% static/js/BackgroundImage.js | 121.09 kB | 0% static/js/FormulaEditor.js | 962.55 kB | 0% static/js/ManageRules.js | 46.63 kB | 0% static/js/PayeeRuleCountLabel.js | 7.33 kB | 0% static/js/ScheduleEditForm.js | 146.57 kB | 0% static/js/SchedulesTable.js | 206.3 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 | 185.63 kB | 0% static/js/client.js | 451.37 kB | 0% static/js/da.js | 100.19 kB | 0% static/js/de.js | 182.38 kB | 0% static/js/en-GB.js | 9.25 kB | 0% static/js/en.js | 201.71 kB | 0% static/js/es.js | 177.58 kB | 0% static/js/extends.js | 508.79 kB | 0% static/js/fr.js | 177.35 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.46 kB | 0% static/js/it.js | 163.93 kB | 0% static/js/narrow.js | 365.05 kB | 0% static/js/nb-NO.js | 147.07 kB | 0% static/js/nl.js | 119.71 kB | 0% static/js/pt-BR.js | 187.34 kB | 0% static/js/resize-observer.js | 18.06 kB | 0% static/js/th.js | 173.33 kB | 0% static/js/theme.js | 31.88 kB | 0% static/js/toString.js | 705.18 kB | 0% static/js/uk.js | 216.7 kB | 0% static/js/useFormatList.js | 2.52 kB | 0% static/js/useTransactionBatchActions.js | 9.71 kB | 0% static/js/workbox-window.prod.es5.js | 7.33 kB | 0% static/js/zh-Hans.js | 116.44 kB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.28 MB → 5.29 MB (+2.62 kB) | +0.05% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/server/forecast/forecast-tracking-budget.ts` | 🆕 +1.82 kB | 0 B → 1.82 kB `home/runner/work/actual/actual/packages/loot-core/src/server/forecast/app.ts` | 📈 +728 B (+29.45%) | 2.41 kB → 3.13 kB `home/runner/work/actual/actual/packages/loot-core/src/shared/months.ts` | 📈 +84 B (+1.56%) | 5.25 kB → 5.33 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.DjCqYlkp.js | 0 B → 5.29 MB (+5.29 MB) | - **Removed** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.AuU5VhIL.js | 5.28 MB → 0 B (-5.28 MB) | -100% **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** No assets were unchanged </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 2 | 3.87 MB → 3.87 MB (+2.55 kB) | +0.06% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/server/forecast/forecast-tracking-budget.ts` | 🆕 +1.78 kB | 0 B → 1.78 kB `home/runner/work/actual/actual/packages/loot-core/src/server/forecast/app.ts` | 📈 +709 B (+29.37%) | 2.36 kB → 3.05 kB `home/runner/work/actual/actual/packages/loot-core/src/shared/months.ts` | 📈 +81 B (+1.56%) | 5.06 kB → 5.14 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 ----- | --------- | --------- index.js | 3.87 MB → 3.87 MB (+2.55 kB) | +0.06% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- 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:53:43 -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#122185