Public: anyone can read this; the crew can change it.

Renaming a board can be undone: renameBoard logs the row it overwrote #59

opened this

Merged 79d 2h ago, live in production

renameBoard now runs inside a transaction and calls logAction, just like every other mutation, so it's trimmed by MAXUNDODEPTH and shows up in the undo log like anything else.

Notes

opened this

renameBoard now runs inside a transaction and calls logAction, just like every other mutation, so it's trimmed by MAX_UNDO_DEPTH and shows up in the undo log like anything else.

Payload gained restoreBoardName?: { id: string; name: string }, and undo restores only the name — not the whole board row — so undoing a rename can never revert a claimBoard. renameBoard now returns boolean (false for an unknown board id, doing nothing) instead of void; the one caller in routes.ts already validates the board first, so this doesn't change route behavior.

Added three tests to src/db.test.ts:

  • move a card, rename the board, undo → old name back, card untouched; a second undo then reverses the move.
  • renaming a nonexistent board returns false and logs nothing.
  • an action row written in the old shape (no restoreBoardName) still undoes cleanly.

bun test is green (113 pass). Left untouched per the issue: static/board.*.js and src/pages/board.ts — no client-side label or button changes here.

Closes #42

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs