From 2cc926201c8f771a38a4afc7a6800aa5ba4a799c Mon Sep 17 00:00:00 2001 From: SkyOne771 Date: Tue, 10 Nov 2026 15:39:31 +0100 Subject: [PATCH] Show minimum monthly essentials budget on overview --- docs/CHANGELOG.md | 5 +++ docs/USER_GUIDE.md | 6 ++++ src/BillsPanel.jsx | 5 +++ src/main.jsx | 21 +++++++++++- src/model.mjs | 12 +++++++ src/style.css | 18 ++++++++++ tests/minimum-budget.test.mjs | 62 +++++++++++++++++++++++++++++++++++ 7 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 tests/minimum-budget.test.mjs diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 9106434..081ecdf 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 2026-11-10 — Minimum monthly budget + +- Overview now shows Minimum needed: essential recurring bills at the profile’s share plus active debt instalments, excluding one-off spending. +- Bills support an editable essential flag, included by default, with effective-month and paid-history preservation. Annual bills are provisioned monthly. + ## 2026-11-10 — Independent shared-bill confirmations - Restored the configured bill payer as the common default in both profiles. Existing saved payers and provider-payment history stay intact. diff --git a/docs/USER_GUIDE.md b/docs/USER_GUIDE.md index f1573a8..5a614e8 100644 --- a/docs/USER_GUIDE.md +++ b/docs/USER_GUIDE.md @@ -61,3 +61,9 @@ Bill paid by uses the configured bill payer (the bill owner when none is set) in The Bill: Paid button records payment to the provider. Each person also has an independent half-payment confirmation under the bill name. From your profile, click your named button to confirm or undo your own half; switch profiles to confirm the other person’s half. One person’s confirmation never completes the other’s. Existing bills start with no personal confirmations; the app does not infer them from the provider’s paid status. Confirmations are saved per month and sync across both views. For a bill already paid to the provider, the non-payer’s confirmation records reimbursement and removes that bill from the amount owed. Undoing it restores the reimbursement due. Personal confirmations do not change the original bill-paid status, amounts or budget. Use All halves / My half pending / My half paid to find your unfinished payments. The bulk bill-paid action only marks payments to providers, not either person’s half. + +### Minimum needed + +Overview shows Minimum needed for the selected month: your share of essential recurring bills plus active monthly debt instalments. Shared bills count at your 50% share, personal bills count fully, and annual bills are spread over 12 months. One-off spending is excluded. New accounts start at zero. + +Existing bills are included by default as a conservative starting point. Edit a bill and uncheck Essential to exclude optional costs from this figure; it remains in Bills & living and the normal budget. Essential labels appear on recurring/shared bill rows. The flag belongs to the shared bill, so changing it applies to both profiles from the selected month forward, while paid history keeps its saved terms. This is a planning total based on your records, not an estimate of food or other costs you have not entered. diff --git a/src/BillsPanel.jsx b/src/BillsPanel.jsx index 8b7863d..dead3f3 100644 --- a/src/BillsPanel.jsx +++ b/src/BillsPanel.jsx @@ -354,6 +354,11 @@ export default function BillsPanel({ : ''}{' '} · due {+billDueDate(b, month, profile).slice(-2)} + + {b.essential === false + ? 'Optional · excluded from minimum' + : 'Essential · included in minimum'} + {b.shared ? `50/50 with ${state.profiles.find((p) => p.id === partner)?.name || 'partner'}` diff --git a/src/main.jsx b/src/main.jsx index dd33d4a..6afca4f 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -893,7 +893,7 @@ function App() { )} {page === 'Overview' && ( <> -
+
setPage('Debts & goals')} actionLabel="Manage debts" /> + setPage('Recurring bills')} + actionLabel="Choose essential bills" + /> + +

+ Minimum needed includes your share of essential bills and active debt instalments. Mark + optional expenses unchecked. One-off spending is excluded; annual bills are spread over + 12 months. +