Skip to content

feat(slice-009): portfolio edit and delete#10

Merged
fredericomozzato merged 2 commits into
mainfrom
feat/009-portfolio-edit-delete
Apr 12, 2026
Merged

feat(slice-009): portfolio edit and delete#10
fredericomozzato merged 2 commits into
mainfrom
feat/009-portfolio-edit-delete

Conversation

@fredericomozzato
Copy link
Copy Markdown
Owner

@fredericomozzato fredericomozzato commented Apr 12, 2026

Summary

  • Add edit portfolio name (e) and delete portfolio (X) interactions in the portfolio panel
  • Add RenamePortfolio and DeletePortfolio to the Store interface and SQLiteStore implementation
  • Add UNIQUE constraint on portfolios.name to enforce uniqueness at the DB level
  • Full test coverage: rename happy path, duplicate name rejection, not-found, cascade delete on holdings

Test Plan

  • e on a portfolio opens edit dialog pre-filled with current name; Enter saves, Esc cancels
  • Renaming to an existing portfolio name shows error and does not save
  • X on a portfolio opens delete confirmation; Enter deletes with holdings, Esc cancels
  • make test passes with race detector clean

fredericomozzato and others added 2 commits April 12, 2026 15:35
…o edit/delete

- F1: Friendly error message for duplicate portfolio names with red styling
- F2: Fixed width dialogs for create/edit portfolio (proportional sizing)
- F3: Removed 'a' key from browsing mode (list-mode only for add holding)
- F4: Enter key now enters holdings panel even when portfolio is empty
- C1: Added TestUniquePortfolioName to verify schema UNIQUE constraint

Closes findings F1-F4, C1 in docs/reviews/009-portfolio-edit-delete/revision-1.md
- Add RenamePortfolio and DeletePortfolio to Store interface
- Implement both methods in SQLiteStore with proper error wrapping
- Add UNIQUE constraint on portfolios.name in schema
- Cover new methods with tests: happy path, duplicate name, not found, cascade delete
- Update StubStore in UI tests to satisfy new interface
- Update roadmap: mark slice 9 done, renumber slice 10

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@fredericomozzato fredericomozzato merged commit 2ae5960 into main Apr 12, 2026
5 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.

1 participant