| 04-shared-lists-live-sync |
03 |
api-routes, pwa-components |
| lists-crud |
| scoped-access |
| D-01 |
| D-04 |
| D-06 |
| tdd |
| optimistic-ui |
| list-01 |
|
| requires |
provides |
affects |
| 04-01 (lists/list_shares schema, test harness, BrowserRouter shell) |
| 04-02 (listAccess.ts, listEmitter.ts primitives) |
|
| POST/GET/PATCH/DELETE /api/lists with scoped access (D-04) and auto-share (D-01/D-02) |
| listsRouter mounted at /api/lists in index.ts |
| ListsIndex wired to real data (useQuery + useMutation) |
| ListCard with name/count badge/Shared pill + hover-reveal delete |
| CreateListSheet (Shared default D-01, optimistic useMutation) |
| ListDeleteDialog (mirrors Phase 3 pattern, props-driven, D-06) |
| ListsEmptyState (standalone component) |
| listsClient |
| fetchLists/createList/patchList/deleteList + List/ListItem types |
|
|
| apps/api/src/routes/lists.ts (new) |
| apps/api/src/index.ts (listsRouter mount added) |
| apps/api/tests/routes/lists.test.ts (it.todo stubs replaced with real assertions) |
| apps/pwa/src/api/listsClient.ts (expanded with create/patch/delete) |
| apps/pwa/src/routes/ListsIndex.tsx (rewritten with real data) |
|
|
| added |
patterns |
|
|
| resolveUserId helper copied verbatim from events.ts (per-router duplication convention) |
| getAccessibleListIds via two-select+Set for D-04 scoped GET |
| Auto-share on create |
| INSERT list_shares for all users WHERE id != creator (OQ-3/D-01/D-02) |
|
| Plan 06 SSE seam comments at every mutation handler (publishListEvent) |
| useMutation with optimistic update + onError rollback + onSettled invalidate |
| Props-driven ListDeleteDialog (not Zustand-coupled) to avoid modifying stable calendarStore dialog |
|
|
| created |
modified |
| apps/api/src/routes/lists.ts |
| apps/pwa/src/components/ListCard.tsx |
| apps/pwa/src/components/CreateListSheet.tsx |
| apps/pwa/src/components/ListDeleteDialog.tsx |
| apps/pwa/src/components/ListsEmptyState.tsx |
|
| apps/api/src/index.ts (listsRouter import + app.route mount) |
| apps/api/tests/routes/lists.test.ts (it.todo stubs replaced with 23 real integration tests) |
| apps/pwa/src/api/listsClient.ts (createList/patchList/deleteList + List type expanded) |
| apps/pwa/src/routes/ListsIndex.tsx (rewritten — real data, ListCard, CreateListSheet, ListDeleteDialog) |
|
|
| D-04 GET scoped: two-select + Set union (owner + list_shares) matches listAccess.ts pattern |
| DELETE owner-only: safe default per plan spec; sharees can edit but not delete in LIST-01 |
| ListDeleteDialog is props-driven (not Zustand) to keep calendarStore dialog untouched (stable) |
| Plan 06 SSE seam comments left at every mutation handler (publishListEvent not yet wired) |
| dev-user (id=1) must exist in users table for dev bypass to work with write endpoints (pre-existing env constraint) |
| [Rule 1] @hono/zod-validator returns 400 (not 422); tests corrected to match events.ts convention |
|
| duration |
completed |
task_count |
file_count |
| ~12 minutes |
2026-06-09 |
2 |
9 |
|