[PR #7884] [AI] Add tracking budget forecast mode #114285

Open
opened 2026-06-05 22:00:11 -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: 🔄 Open

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


📝 Commits (9)

  • 9769e0b [AI] Add forecast source types
  • d67cbac [AI] Add tracking budget forecast projection helper
  • 360a37d [AI] Route forecast generation by source
  • 8285a8f [AI] Add forecast source selector to report
  • 2a64642 [AI] Persist forecast source on dashboard widgets
  • 4085d8b [AI] Add tracking forecast UI coverage
  • cea4af8 [AI] Add tracking budget forecast VRT coverage
  • 6ad1251 [AI] Document tracking budget forecast mode
  • 439e8ac [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 33 14.02 MB → 14.02 MB (+3.26 kB) +0.02%
loot-core 1 5.34 MB → 5.34 MB (+2.62 kB) +0.05%
api 2 3.96 MB → 3.97 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
33 14.02 MB → 14.02 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.76%) 14.21 kB → 16.31 kB
src/components/reports/reports/BalanceForecastCard.tsx 📈 +657 B (+6.46%) 9.94 kB → 10.58 kB
src/components/budget/MonthPicker.tsx 📈 +107 B (+1.24%) 8.43 kB → 8.54 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 (+3.15 kB) +0.25%
static/js/index.js 2.03 MB → 2.03 MB (+107 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/ScheduleEditForm.js 146.45 kB 0%
static/js/TransactionEdit.js 89.65 kB 0%
static/js/TransactionList.js 85.81 kB 0%
static/js/bankSyncUtils.js 54.15 kB 0%
static/js/ca.js 186.78 kB 0%
static/js/chart-theme.js 803.05 kB 0%
static/js/client.js 451.37 kB 0%
static/js/da.js 101.17 kB 0%
static/js/de.js 170.79 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/merge.js 5.08 MB 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 2.52 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 → 5.34 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.62%) 2.4 kB → 3.11 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.Bz8vUBPJ.js 0 B → 5.34 MB (+5.34 MB) -

Removed

Asset File Size % Changed
kcab.worker.BYZy5hD3.js 5.34 MB → 0 B (-5.34 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.96 MB → 3.97 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.54%) 2.34 kB → 3.04 kB
home/runner/work/actual/actual/packages/loot-core/src/shared/months.ts 📈 +81 B (+1.56%) 5.08 kB → 5.16 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
index.js 3.96 MB → 3.97 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:** 🔄 Open **Base:** `master` ← **Head:** `feature/tracking-budget-forecast-mode` --- ### 📝 Commits (9) - [`9769e0b`](https://github.com/actualbudget/actual/commit/9769e0b0a946817666778d3bdc79325d257f1a62) [AI] Add forecast source types - [`d67cbac`](https://github.com/actualbudget/actual/commit/d67cbac1f719722a8cc30ffefd2bf000bc2e06a6) [AI] Add tracking budget forecast projection helper - [`360a37d`](https://github.com/actualbudget/actual/commit/360a37dd221baa7890cb2bc56222d517e21a0953) [AI] Route forecast generation by source - [`8285a8f`](https://github.com/actualbudget/actual/commit/8285a8f2cfcbcf2cd5b61d272ac24bfd487d9d90) [AI] Add forecast source selector to report - [`2a64642`](https://github.com/actualbudget/actual/commit/2a64642ff466c07d92529fa3ee9c71ee74e321c8) [AI] Persist forecast source on dashboard widgets - [`4085d8b`](https://github.com/actualbudget/actual/commit/4085d8b922f4dc2462b75cccc4c8eaded895067a) [AI] Add tracking forecast UI coverage - [`cea4af8`](https://github.com/actualbudget/actual/commit/cea4af8da7176ad1d7160b3a580896334fc3625e) [AI] Add tracking budget forecast VRT coverage - [`6ad1251`](https://github.com/actualbudget/actual/commit/6ad12510564d0acfbdc99f52bae53305c13f0821) [AI] Document tracking budget forecast mode - [`439e8ac`](https://github.com/actualbudget/actual/commit/439e8acd297910563800b1d69e9262f5eedcdef7) [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 | 33 | 14.02 MB → 14.02 MB (+3.26 kB) | +0.02% loot-core | 1 | 5.34 MB → 5.34 MB (+2.62 kB) | +0.05% api | 2 | 3.96 MB → 3.97 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 ----------- | ----------------- | --------- 33 | 14.02 MB → 14.02 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.76%) | 14.21 kB → 16.31 kB `src/components/reports/reports/BalanceForecastCard.tsx` | 📈 +657 B (+6.46%) | 9.94 kB → 10.58 kB `src/components/budget/MonthPicker.tsx` | 📈 +107 B (+1.24%) | 8.43 kB → 8.54 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 (+3.15 kB) | +0.25% static/js/index.js | 2.03 MB → 2.03 MB (+107 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/ScheduleEditForm.js | 146.45 kB | 0% static/js/TransactionEdit.js | 89.65 kB | 0% static/js/TransactionList.js | 85.81 kB | 0% static/js/bankSyncUtils.js | 54.15 kB | 0% static/js/ca.js | 186.78 kB | 0% static/js/chart-theme.js | 803.05 kB | 0% static/js/client.js | 451.37 kB | 0% static/js/da.js | 101.17 kB | 0% static/js/de.js | 170.79 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/merge.js | 5.08 MB | 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 | 2.52 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 → 5.34 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.62%) | 2.4 kB → 3.11 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.Bz8vUBPJ.js | 0 B → 5.34 MB (+5.34 MB) | - **Removed** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.BYZy5hD3.js | 5.34 MB → 0 B (-5.34 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.96 MB → 3.97 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.54%) | 2.34 kB → 3.04 kB `home/runner/work/actual/actual/packages/loot-core/src/shared/months.ts` | 📈 +81 B (+1.56%) | 5.08 kB → 5.16 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.96 MB → 3.97 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-05 22:00:11 -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#114285