[PR #6685] [MERGED] Add Age of Money report (#2994) #55973

Closed
opened 2026-05-01 03:25:47 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6685
Author: @sztomi
Created: 1/17/2026
Status: Merged
Merged: 4/7/2026
Merged by: @youngcw

Base: masterHead: age-of-money


📝 Commits (1)

📊 Changes

12 files changed (+2024 additions, -2 deletions)

View changed files

📝 packages/desktop-client/src/components/reports/Overview.tsx (+23 -1)
📝 packages/desktop-client/src/components/reports/ReportRouter.tsx (+8 -0)
packages/desktop-client/src/components/reports/graphs/AgeOfMoneyGraph.tsx (+195 -0)
packages/desktop-client/src/components/reports/reports/AgeOfMoney.tsx (+450 -0)
packages/desktop-client/src/components/reports/reports/AgeOfMoneyCard.tsx (+208 -0)
packages/desktop-client/src/components/reports/spreadsheets/age-of-money-spreadsheet.test.ts (+695 -0)
packages/desktop-client/src/components/reports/spreadsheets/age-of-money-spreadsheet.ts (+416 -0)
📝 packages/desktop-client/src/components/settings/Experimental.tsx (+6 -0)
📝 packages/desktop-client/src/hooks/useFeatureFlag.ts (+1 -0)
📝 packages/loot-core/src/types/models/dashboard.ts (+15 -1)
📝 packages/loot-core/src/types/prefs.ts (+1 -0)
upcoming-release-notes/6685.md (+6 -0)

📄 Description

resolves #2994

This PR adds an "Age of money" report. Please note that this metric is not very well-defined, so I came up with this bucket-based algorithm based on other implementations and what I could gather. The values it calculates seem sensible to me. Currently, the report is behind a feature flag, but maybe that's not necessary - let me know. I tried to follow the patterns in the Crossover report.

Screenshots

image image image

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 27 12.37 MB → 12.4 MB (+38.86 kB) +0.31%
loot-core 1 4.84 MB 0%
api 1 3.83 MB 0%
cli 1 7.88 MB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
27 12.37 MB → 12.4 MB (+38.86 kB) +0.31%
Changeset
File Δ Size
src/components/reports/reports/AgeOfMoney.tsx 🆕 +17.68 kB 0 B → 17.68 kB
src/components/reports/reports/AgeOfMoneyCard.tsx 🆕 +8.13 kB 0 B → 8.13 kB
src/components/reports/graphs/AgeOfMoneyGraph.tsx 🆕 +5.78 kB 0 B → 5.78 kB
src/components/reports/spreadsheets/age-of-money-spreadsheet.ts 🆕 +5.73 kB 0 B → 5.73 kB
src/components/reports/ReportRouter.tsx 📈 +676 B (+10.24%) 6.45 kB → 7.11 kB
src/hooks/useFeatureFlag.ts 📈 +26 B (+5.02%) 518 B → 544 B
src/components/reports/DateRange.tsx 📈 +98 B (+3.00%) 3.19 kB → 3.28 kB
src/components/reports/Overview.tsx 📈 +751 B (+2.86%) 25.61 kB → 26.34 kB
src/components/settings/Experimental.tsx 📈 +280 B (+2.53%) 10.79 kB → 11.07 kB
src/components/reports/graphs/CashFlowGraph.tsx 📈 +52 B (+0.57%) 8.98 kB → 9.03 kB
src/components/reports/spreadsheets/cash-flow-spreadsheet.tsx 📈 +10 B (+0.16%) 5.93 kB → 5.94 kB
src/components/reports/spreadsheets/net-worth-spreadsheet.ts 📈 +6 B (+0.12%) 5.02 kB → 5.02 kB
src/components/reports/graphs/CalendarGraph.tsx 📈 +8 B (+0.08%) 10.03 kB → 10.04 kB
src/components/reports/ReportSummary.tsx 📈 +2 B (+0.05%) 3.8 kB → 3.8 kB
src/components/reports/ReportSidebar.tsx 📈 +4 B (+0.02%) 17.75 kB → 17.75 kB
src/components/reports/reports/Sankey.tsx 📈 +4 B (+0.02%) 23.84 kB → 23.84 kB
src/components/reports/Header.tsx 📈 +2 B (+0.01%) 13.24 kB → 13.24 kB
src/components/formula/QueryManager.tsx 📈 +2 B (+0.01%) 23.51 kB → 23.52 kB
src/components/reports/reports/CustomReport.tsx 📉 -2 B (-0.00%) 41.78 kB → 41.78 kB
src/components/reports/reports/Crossover.tsx 📉 -6 B (-0.01%) 41.27 kB → 41.27 kB
src/components/reports/reports/Calendar.tsx 📉 -7 B (-0.02%) 27.61 kB → 27.6 kB
src/components/reports/reports/Spending.tsx 📉 -8 B (-0.03%) 22.8 kB → 22.79 kB
src/components/reports/spreadsheets/custom-spreadsheet.ts 📉 -2 B (-0.04%) 5.53 kB → 5.53 kB
src/components/reports/reports/NetWorth.tsx 📉 -6 B (-0.04%) 14.16 kB → 14.15 kB
src/components/reports/spreadsheets/crossover-spreadsheet.ts 📉 -4 B (-0.05%) 7.96 kB → 7.95 kB
src/components/reports/reports/SankeyCard.tsx 📉 -4 B (-0.05%) 7.26 kB → 7.26 kB
src/components/reports/reports/CrossoverCard.tsx 📉 -6 B (-0.06%) 9.66 kB → 9.65 kB
src/components/reports/reports/BudgetAnalysis.tsx 📉 -16 B (-0.08%) 20.01 kB → 19.99 kB
src/components/reports/reports/Summary.tsx 📉 -26 B (-0.10%) 25.57 kB → 25.55 kB
src/components/reports/reports/CashFlow.tsx 📉 -10 B (-0.11%) 9.27 kB → 9.26 kB
src/components/reports/spreadsheets/calendar-spreadsheet.ts 📉 -6 B (-0.12%) 5.05 kB → 5.04 kB
src/components/reports/spreadsheets/summary-spreadsheet.ts 📉 -16 B (-0.28%) 5.57 kB → 5.56 kB
src/components/reports/graphs/BudgetAnalysisGraph.tsx 📉 -93 B (-0.68%) 13.31 kB → 13.22 kB
src/components/EditablePageHeaderTitle.tsx 📉 -106 B (-3.80%) 2.72 kB → 2.62 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.13 MB → 1.17 MB (+38.59 kB) +3.33%
static/js/index.js 3.31 MB → 3.31 MB (+280 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 852.77 kB 0%
static/js/TransactionList.js 82.49 kB 0%
static/js/ca.js 190.11 kB 0%
static/js/da.js 104.66 kB 0%
static/js/de.js 174.79 kB 0%
static/js/en-GB.js 7.16 kB 0%
static/js/en.js 173.2 kB 0%
static/js/es.js 182.18 kB 0%
static/js/fr.js 177.47 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 166.25 kB 0%
static/js/narrow.js 363.02 kB 0%
static/js/nb-NO.js 152.2 kB 0%
static/js/nl.js 108.93 kB 0%
static/js/pl.js 88.34 kB 0%
static/js/pt-BR.js 177.84 kB 0%
static/js/resize-observer.js 18.06 kB 0%
static/js/th.js 179.94 kB 0%
static/js/theme.js 30.79 kB 0%
static/js/uk.js 213.14 kB 0%
static/js/useTransactionBatchActions.js 4.33 MB 0%
static/js/wide.js 295 B 0%
static/js/workbox-window.prod.es5.js 7.33 kB 0%
static/js/zh-Hans.js 94.19 kB 0%

loot-core

Total

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

api

Total

Files count Total bundle size % Changed
1 3.83 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.83 MB 0%

cli

Total

Files count Total bundle size % Changed
1 7.88 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.88 MB 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/6685 **Author:** [@sztomi](https://github.com/sztomi) **Created:** 1/17/2026 **Status:** ✅ Merged **Merged:** 4/7/2026 **Merged by:** [@youngcw](https://github.com/youngcw) **Base:** `master` ← **Head:** `age-of-money` --- ### 📝 Commits (1) - [`688e4a9`](https://github.com/actualbudget/actual/commit/688e4a9d2b25f894224182af612a8f918694b31f) Add Age of Money report (#2994) ### 📊 Changes **12 files changed** (+2024 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/reports/Overview.tsx` (+23 -1) 📝 `packages/desktop-client/src/components/reports/ReportRouter.tsx` (+8 -0) ➕ `packages/desktop-client/src/components/reports/graphs/AgeOfMoneyGraph.tsx` (+195 -0) ➕ `packages/desktop-client/src/components/reports/reports/AgeOfMoney.tsx` (+450 -0) ➕ `packages/desktop-client/src/components/reports/reports/AgeOfMoneyCard.tsx` (+208 -0) ➕ `packages/desktop-client/src/components/reports/spreadsheets/age-of-money-spreadsheet.test.ts` (+695 -0) ➕ `packages/desktop-client/src/components/reports/spreadsheets/age-of-money-spreadsheet.ts` (+416 -0) 📝 `packages/desktop-client/src/components/settings/Experimental.tsx` (+6 -0) 📝 `packages/desktop-client/src/hooks/useFeatureFlag.ts` (+1 -0) 📝 `packages/loot-core/src/types/models/dashboard.ts` (+15 -1) 📝 `packages/loot-core/src/types/prefs.ts` (+1 -0) ➕ `upcoming-release-notes/6685.md` (+6 -0) </details> ### 📄 Description <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://github.com/actualbudget/docs#writing-good-release-notes. Try running yarn generate:release-notes *before* pushing your PR for an interactive experience. --> resolves #2994 This PR adds an "Age of money" report. Please note that this metric is not very well-defined, so I came up with this bucket-based algorithm based on other implementations and what I could gather. The values it calculates seem sensible to me. Currently, the report is behind a feature flag, but maybe that's not necessary - let me know. I tried to follow the patterns in the Crossover report. ## Screenshots <img width="782" height="222" alt="image" src="https://github.com/user-attachments/assets/920fff6c-0709-4ae8-9001-ebf1a5efef90" /> <img width="779" height="230" alt="image" src="https://github.com/user-attachments/assets/1e3c8f8e-630a-4054-9df4-349fc4a7d9fb" /> <img width="1196" height="763" alt="image" src="https://github.com/user-attachments/assets/dd7569d7-4f3b-4bd6-a442-abc7ff7ce69b" /> <!--- actual-bot-sections ---> <hr /> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 27 | 12.37 MB → 12.4 MB (+38.86 kB) | +0.31% loot-core | 1 | 4.84 MB | 0% api | 1 | 3.83 MB | 0% cli | 1 | 7.88 MB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 27 | 12.37 MB → 12.4 MB (+38.86 kB) | +0.31% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/components/reports/reports/AgeOfMoney.tsx` | 🆕 +17.68 kB | 0 B → 17.68 kB `src/components/reports/reports/AgeOfMoneyCard.tsx` | 🆕 +8.13 kB | 0 B → 8.13 kB `src/components/reports/graphs/AgeOfMoneyGraph.tsx` | 🆕 +5.78 kB | 0 B → 5.78 kB `src/components/reports/spreadsheets/age-of-money-spreadsheet.ts` | 🆕 +5.73 kB | 0 B → 5.73 kB `src/components/reports/ReportRouter.tsx` | 📈 +676 B (+10.24%) | 6.45 kB → 7.11 kB `src/hooks/useFeatureFlag.ts` | 📈 +26 B (+5.02%) | 518 B → 544 B `src/components/reports/DateRange.tsx` | 📈 +98 B (+3.00%) | 3.19 kB → 3.28 kB `src/components/reports/Overview.tsx` | 📈 +751 B (+2.86%) | 25.61 kB → 26.34 kB `src/components/settings/Experimental.tsx` | 📈 +280 B (+2.53%) | 10.79 kB → 11.07 kB `src/components/reports/graphs/CashFlowGraph.tsx` | 📈 +52 B (+0.57%) | 8.98 kB → 9.03 kB `src/components/reports/spreadsheets/cash-flow-spreadsheet.tsx` | 📈 +10 B (+0.16%) | 5.93 kB → 5.94 kB `src/components/reports/spreadsheets/net-worth-spreadsheet.ts` | 📈 +6 B (+0.12%) | 5.02 kB → 5.02 kB `src/components/reports/graphs/CalendarGraph.tsx` | 📈 +8 B (+0.08%) | 10.03 kB → 10.04 kB `src/components/reports/ReportSummary.tsx` | 📈 +2 B (+0.05%) | 3.8 kB → 3.8 kB `src/components/reports/ReportSidebar.tsx` | 📈 +4 B (+0.02%) | 17.75 kB → 17.75 kB `src/components/reports/reports/Sankey.tsx` | 📈 +4 B (+0.02%) | 23.84 kB → 23.84 kB `src/components/reports/Header.tsx` | 📈 +2 B (+0.01%) | 13.24 kB → 13.24 kB `src/components/formula/QueryManager.tsx` | 📈 +2 B (+0.01%) | 23.51 kB → 23.52 kB `src/components/reports/reports/CustomReport.tsx` | 📉 -2 B (-0.00%) | 41.78 kB → 41.78 kB `src/components/reports/reports/Crossover.tsx` | 📉 -6 B (-0.01%) | 41.27 kB → 41.27 kB `src/components/reports/reports/Calendar.tsx` | 📉 -7 B (-0.02%) | 27.61 kB → 27.6 kB `src/components/reports/reports/Spending.tsx` | 📉 -8 B (-0.03%) | 22.8 kB → 22.79 kB `src/components/reports/spreadsheets/custom-spreadsheet.ts` | 📉 -2 B (-0.04%) | 5.53 kB → 5.53 kB `src/components/reports/reports/NetWorth.tsx` | 📉 -6 B (-0.04%) | 14.16 kB → 14.15 kB `src/components/reports/spreadsheets/crossover-spreadsheet.ts` | 📉 -4 B (-0.05%) | 7.96 kB → 7.95 kB `src/components/reports/reports/SankeyCard.tsx` | 📉 -4 B (-0.05%) | 7.26 kB → 7.26 kB `src/components/reports/reports/CrossoverCard.tsx` | 📉 -6 B (-0.06%) | 9.66 kB → 9.65 kB `src/components/reports/reports/BudgetAnalysis.tsx` | 📉 -16 B (-0.08%) | 20.01 kB → 19.99 kB `src/components/reports/reports/Summary.tsx` | 📉 -26 B (-0.10%) | 25.57 kB → 25.55 kB `src/components/reports/reports/CashFlow.tsx` | 📉 -10 B (-0.11%) | 9.27 kB → 9.26 kB `src/components/reports/spreadsheets/calendar-spreadsheet.ts` | 📉 -6 B (-0.12%) | 5.05 kB → 5.04 kB `src/components/reports/spreadsheets/summary-spreadsheet.ts` | 📉 -16 B (-0.28%) | 5.57 kB → 5.56 kB `src/components/reports/graphs/BudgetAnalysisGraph.tsx` | 📉 -93 B (-0.68%) | 13.31 kB → 13.22 kB `src/components/EditablePageHeaderTitle.tsx` | 📉 -106 B (-3.80%) | 2.72 kB → 2.62 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.13 MB → 1.17 MB (+38.59 kB) | +3.33% static/js/index.js | 3.31 MB → 3.31 MB (+280 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 | 852.77 kB | 0% static/js/TransactionList.js | 82.49 kB | 0% static/js/ca.js | 190.11 kB | 0% static/js/da.js | 104.66 kB | 0% static/js/de.js | 174.79 kB | 0% static/js/en-GB.js | 7.16 kB | 0% static/js/en.js | 173.2 kB | 0% static/js/es.js | 182.18 kB | 0% static/js/fr.js | 177.47 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.46 kB | 0% static/js/it.js | 166.25 kB | 0% static/js/narrow.js | 363.02 kB | 0% static/js/nb-NO.js | 152.2 kB | 0% static/js/nl.js | 108.93 kB | 0% static/js/pl.js | 88.34 kB | 0% static/js/pt-BR.js | 177.84 kB | 0% static/js/resize-observer.js | 18.06 kB | 0% static/js/th.js | 179.94 kB | 0% static/js/theme.js | 30.79 kB | 0% static/js/uk.js | 213.14 kB | 0% static/js/useTransactionBatchActions.js | 4.33 MB | 0% static/js/wide.js | 295 B | 0% static/js/workbox-window.prod.es5.js | 7.33 kB | 0% static/js/zh-Hans.js | 94.19 kB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 4.84 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.D0KH5_ze.js | 4.84 MB | 0% </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 3.83 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.83 MB | 0% </div> </details> --- #### cli **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 7.88 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.88 MB | 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-01 03:25:47 -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#55973