From f38fceefba62e5c4c52a9384d54462be85fe77a2 Mon Sep 17 00:00:00 2001
From: nmemmert <67961292+nmemmert@users.noreply.github.com>
Date: Tue, 14 Jul 2026 11:15:48 -0400
Subject: [PATCH] Include all asset accounts in Available to Budget
Previously only checked checking+savings; now includes investments and
any other non-liability account types.
Co-Authored-By: Claude Sonnet 4.6
---
src/app/page.tsx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 9b2e792..e294547 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -929,9 +929,10 @@ export default function BudgetDashboard() {
return e.allocated + incomeAlloc > 0 && e.spent > e.allocated + incomeAlloc;
});
- // Available to budget = liquid assets (checking + savings) minus total envelope allocations
+ // Available to budget = all asset accounts minus total envelope allocations
+ const LIABILITY_TYPES = ['credit_card', 'mortgage', 'loan'];
const liquidBalance = accounts
- .filter(a => a.type === 'checking' || a.type === 'savings')
+ .filter(a => !LIABILITY_TYPES.includes(a.type))
.reduce((s, a) => s + a.balance, 0);
const totalAllocated = envelopes.reduce((s, e) => s + e.allocated, 0);
const availableToBudget = liquidBalance - totalAllocated;
@@ -948,7 +949,7 @@ export default function BudgetDashboard() {
${Math.abs(availableToBudget).toFixed(2)}{availableToBudget < 0 ? ' over' : ''}
- ${liquidBalance.toFixed(2)} in checking & savings − ${totalAllocated.toFixed(2)} allocated to envelopes
+ ${liquidBalance.toFixed(2)} across all accounts − ${totalAllocated.toFixed(2)} allocated to envelopes
{availableToBudget >= 0 ? '💰' : '⚠️'}