Section groups with collapsible headers + Sinking Funds section #11

Closed
opened 2026-04-17 12:39:20 -06:00 by claude-code · 0 comments
Collaborator

Goal

Restructure the budget and month pages into four collapsible groups and introduce a Sinking Funds section for savings goals (emergency fund, car maintenance, Christmas, etc).

Groups

Group Sections Default open
Income income yes
Committed fixed_bill, debt_minimum, Primary Debt Target card no
Savings sinking_fund (new) no
Flexible food, subscription, other yes

Primary Debt Target sits inside the Committed group after Debt Minimums. It is not a section; it is a pseudo-row within Committed.

Income and Flexible are open by default because those are the sections users edit day to day. Committed and Savings collapse by default because they are set-and-forget.

Collapsibility

Use native HTML <details> / <summary> so no JavaScript is required. Chevron rotation via CSS on [open]. Per-page-load state only; no persistence across reloads (add localStorage later if needed).

New section

Section enum gains sinking_fund with label "Sinking Funds". An alembic migration covers the schema delta (the non-native enum is a VARCHAR with a CHECK, which needs a batch migration to update).

Group subtotals

Each group header displays its total alongside the group name.

  • Budget (/): single number per group, sum(section.amount) across the group's sections (debt target is excluded since its amount comes from a debt_minimum row already counted)
  • Month (/month/YYYY-MM): Applied $X / Planned $Y per group header

Acceptance criteria

  • sinking_fund added to Section enum with label "Sinking Funds"
  • Alembic migration upgrades and downgrades cleanly
  • Budget page renders four <details> groups in order: Income, Committed, Savings, Flexible
  • Month page uses the same grouping with Applied / Planned totals
  • Income and Flexible groups open by default, Committed and Savings closed
  • Primary Debt Target card sits inside the Committed group after Debt Minimums
  • Group subtotals update via OOB swap when any entry inside the group changes
  • Pytest covers group subtotals, default-open state, and sinking_fund CRUD
  • No regression in existing tests, zero-amount widget, or debt target behaviour

Out of scope

  • localStorage persistence of open/closed state
  • Notes field per entry (separate issue)
  • Reconciliation / close-out flow (separate issue)
## Goal Restructure the budget and month pages into four collapsible groups and introduce a Sinking Funds section for savings goals (emergency fund, car maintenance, Christmas, etc). ## Groups | Group | Sections | Default open | |---|---|---| | Income | income | yes | | Committed | fixed_bill, debt_minimum, Primary Debt Target card | no | | Savings | sinking_fund (new) | no | | Flexible | food, subscription, other | yes | Primary Debt Target sits inside the Committed group after Debt Minimums. It is not a section; it is a pseudo-row within Committed. Income and Flexible are open by default because those are the sections users edit day to day. Committed and Savings collapse by default because they are set-and-forget. ## Collapsibility Use native HTML `<details>` / `<summary>` so no JavaScript is required. Chevron rotation via CSS on `[open]`. Per-page-load state only; no persistence across reloads (add localStorage later if needed). ## New section Section enum gains `sinking_fund` with label "Sinking Funds". An alembic migration covers the schema delta (the non-native enum is a VARCHAR with a CHECK, which needs a batch migration to update). ## Group subtotals Each group header displays its total alongside the group name. * Budget (`/`): single number per group, `sum(section.amount)` across the group's sections (debt target is excluded since its amount comes from a debt_minimum row already counted) * Month (`/month/YYYY-MM`): `Applied $X / Planned $Y` per group header ## Acceptance criteria * [ ] `sinking_fund` added to Section enum with label "Sinking Funds" * [ ] Alembic migration upgrades and downgrades cleanly * [ ] Budget page renders four `<details>` groups in order: Income, Committed, Savings, Flexible * [ ] Month page uses the same grouping with Applied / Planned totals * [ ] Income and Flexible groups open by default, Committed and Savings closed * [ ] Primary Debt Target card sits inside the Committed group after Debt Minimums * [ ] Group subtotals update via OOB swap when any entry inside the group changes * [ ] Pytest covers group subtotals, default-open state, and sinking_fund CRUD * [ ] No regression in existing tests, zero-amount widget, or debt target behaviour ## Out of scope * localStorage persistence of open/closed state * Notes field per entry (separate issue) * Reconciliation / close-out flow (separate issue)
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: archeious/quartermaster#11
No description provided.