Allow editing and deleting income entries from the UI - #49
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IncomeEditDialog, mirroringExpenseEditDialog, with a read-only note when the entry is a reimbursement link.incomegets adeleted_atcolumn and soft delete (previously a hard delete).update_income,delete_income,link_income_to_expense,get_income, budget netting, and thereimbursedflag on expenses are all updated to respect it, so a deleted reimbursement correctly reverts an expense's spend/reimbursed status.GET /income/categoriesfor 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 .— cleannpm run build(tsc -b + vite build) — cleannpm run lint— cleannpx playwright test e2e/income.spec.js— 8 passed (3 new: edit pre-fill, edit persists after reload, delete-with-undo), mobile + desktopexpenses,reimbursement,cashflow,breakdown) — 30 passed, mobile + desktop🤖 Generated with Claude Code
https://claude.ai/code/session_01Qz6JBNFwhgem5GY3i2BEMY
Generated by Claude Code