- Shipped
- September 23, 2026 at 6:08 AM UTC
- Author
- Kamo
- Commit
- c1ea69f
/api/checklists: list, get, create, update, delete, duplicate, reset, clear-done, sequence ("do in order"), clear links, and per task add, edit, tick/untick, set prerequisites, move and delete. Every mutation answers the whole checklist so every surface redraws from one answer. The rules live in ChecklistRules, pure and exhaustively tested, and hold one invariant: a done task never waits on an open one. A tick is refused while a prerequisite is open (409 PREREQUISITES_OPEN, naming them); an untick that done tasks depend on is refused unless cascade=true; a link that would loop is refused (409 CYCLE, with the loop); a link that would leave finished work waiting on open work needs reopen=true (409 REOPEN_REQUIRED). The same rules run in the browser for instant feedback, but this is the one that decides — a sticky, the calendar or a stale tab cannot get round it. Rights are the Notes app's: VIEW_NOTES to read, CREATE_NOTES, EDIT_NOTES and DELETE_NOTES to change. Mutations carry @RetryOnDbConflict and bump the checklist's version, so two tabs ticking at once serialize. create_checklists.sql is the DDL, idempotent, applied as the owner.
