Repository navigation
v0.330.0 — treemap depth selector
Container
ghcr.io/budgets-au/budgets:0.330.0
ghcr.io/budgets-au/budgets:latest
Added
- Depth selector on the Expenses / Income treemap. A
Levels 1 · 2 · 3control in the card header caps how many category levels the treemap subdivides below its current root.- Why it was needed. The tree was always built three deep, but Recharts paints child tiles over their parents — so an unpruned hierarchy effectively rendered only the leaves, and there was no way to see the grandparent or parent split without drilling in and losing the whole-picture view. "3" reproduces the previous rendering exactly, so it's the default and nothing changes until you reach for the control.
- Values are preserved when pruning. Each node's
valueis alreadyown + rolled-up children, so a capped parent still shows its full total — it just stops being subdivided. A pruned treemap covers the same area as an unpruned one. - Pruned tiles stay drillable. The click-to-drill affordance keys off a
hasKidsflag captured from the source tree rather thanchildren.length, which the prune empties. Without that, choosing "1" would strand you with no way into level 2 — the one thing the selector must not break. - Depth is relative to whatever node the drilldown is currently rooted at, so it composes with the existing drill-in / Up / category-filter navigation.
- Persisted as
displayPrefs.treemapDepthrather than local component state, so it follows you across devices.
Verify
- tsc clean,
pnpm buildclean. - 740/750 unit — seven new cases covering
pruneToDepth: each level, over-asking, value preservation,hasKidssurvival, and input immutability. - pages-smoke 12/12, reports-tabs 15/15.
Upgrade
Pull ghcr.io/budgets-au/budgets:0.330.0 and roll. No migrations. The treemap renders exactly as before until you change the Levels control.