Skip to content

Allow editing and deleting income entries from the UI - #49

Merged
derekl-beep merged 1 commit into
mainfrom
claude/income-edit-delete
Jul 11, 2026
Merged

Allow editing and deleting income entries from the UI#49
derekl-beep merged 1 commit into
mainfrom
claude/income-edit-delete

Conversation

@derekl-beep

Copy link
Copy Markdown
Owner

Summary

  • Income entries were read-only in the UI (edit/delete was chat-only). Clicking an income row (mobile card or desktop table) now opens an IncomeEditDialog, mirroring ExpenseEditDialog, with a read-only note when the entry is a reimbursement link.
  • Delete lives in the dialog's footer and uses the same soft-delete + 5s undo-toast pattern as expenses (client-side deferred delete, no permanent-delete-with-confirm).
  • Backend: income gets a deleted_at column and soft delete (previously a hard delete). update_income, delete_income, link_income_to_expense, get_income, budget netting, and the reimbursed flag on expenses are all updated to respect it, so a deleted reimbursement correctly reverts an expense's spend/reimbursed status.
  • Adds GET /income/categories for the edit dialog's category select.

Test plan

  • uv run pytest tests/ — 168 passed (6 new: soft-delete semantics, rejecting updates/links on deleted income, budget/reimbursed-flag behavior after delete)
  • uv run ruff check . — clean
  • npm run build (tsc -b + vite build) — clean
  • npm run lint — clean
  • npx playwright test e2e/income.spec.js — 8 passed (3 new: edit pre-fill, edit persists after reload, delete-with-undo), mobile + desktop
  • Related specs re-run for shared-file regressions (expenses, reimbursement, cashflow, breakdown) — 30 passed, mobile + desktop

🤖 Generated with Claude Code

https://claude.ai/code/session_01Qz6JBNFwhgem5GY3i2BEMY


Generated by Claude Code

Income was read-only in the UI (chat-only edit/delete). Adds click-to-edit
rows in IncomeList, an IncomeEditDialog mirroring ExpenseEditDialog, and
soft-delete-with-undo-toast on the frontend to match the expense pattern.

Backend: income gets a deleted_at column and soft delete (was a hard
delete), with existing reads/updates/links filtered to exclude deleted
rows so budget netting and reimbursement flags stay correct after a
delete. Adds GET /income/categories for the edit dialog's category select.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qz6JBNFwhgem5GY3i2BEMY
@derekl-beep
derekl-beep merged commit 2712b25 into main Jul 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants