Edit name/amount on budget template entries (#21) #22
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/21-edit-template-entries"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #21.
Summary
Adds inline edit for name, amount, and notes on budget template entries. Click the new ✎ icon on a row (visible on hover); the row cells are replaced by inputs in the same slot, with Save and Cancel. Notes live inside edit mode; empty notes render nothing in read mode, and a set note renders as a small italic badge after the name (
Spotify · family plan).Forward-only guarantee
The snapshot-over-mirror architecture already isolates months from the template at the data layer. This PR confirms that invariant in two dedicated tests:
tests/test_service.py::test_update_entry_does_not_mutate_existing_month_snapshot(unit-level assertion on all four snapshot fields)tests/test_template_edit_isolation.py::test_template_edit_does_not_mutate_existing_month_and_applies_to_next(end-to-end: seed template, snapshot April, edit template, assert April unchanged, create May, assert May reflects the edit)Editing
Entry.nameorEntry.amountnever touchesMonthEntry.planned,MonthEntry.name,MonthEntry.origin_name, orMonthEntry.origin_plannedon existing months.Notable changes
service.update_entry(mirrorsmonth_service.update_month_entry).GET /entries/{id}/edit,POST /entries/{id},GET /sections/{section}(cancel path).POST /entries/{id}/notes(notes now edited via the Save flow). Removed function:service.set_entry_notes(superseded byupdate_entry).partials/section.htmlrewritten: read row with optional note badge, edit row with name/amount/notes inputs, Save, Cancel. Separate notes row is gone..entry-row.reading/.entry-row.editinglayouts. Target-card table layout kept scoped under.target-section.Spec and plan
docs/superpowers/specs/2026-04-17-edit-budget-template-entries-design.mddocs/superpowers/plans/2026-04-17-edit-budget-template-entries.mdTest plan
uv run pytest -q→ 137 passing (previously 117; net +20).Out of scope