Parent
#44
What to build
A per-category inline composer for creating new todo items, plus the WebSocket mutation API to persist them. Items render within their category section, sorted by creation time (newest last).
State machine: todoStore gains createItem(categoryId, title) — creates a new item with status todo, assigns an order, generates an ID, sets createdAt.
WebSocket: todo.mutate NativeApi method accepts a mutation and returns the updated state. Batched mutations so future slices (drag) can commit atomically.
UI: Each category header has a "+" icon button inline. Clicking it reveals a small text input. Pressing Enter creates the item with the entered title. Items appear below the category header in creation-time order.
Tests: todoStore — item creation, ordering. todoPersistence — items survive restart.
Acceptance criteria
Blocked by
Parent
#44
What to build
A per-category inline composer for creating new todo items, plus the WebSocket mutation API to persist them. Items render within their category section, sorted by creation time (newest last).
State machine:
todoStoregainscreateItem(categoryId, title)— creates a new item with statustodo, assigns an order, generates an ID, setscreatedAt.WebSocket:
todo.mutateNativeApi method accepts a mutation and returns the updated state. Batched mutations so future slices (drag) can commit atomically.UI: Each category header has a "+" icon button inline. Clicking it reveals a small text input. Pressing Enter creates the item with the entered title. Items appear below the category header in creation-time order.
Tests:
todoStore— item creation, ordering.todoPersistence— items survive restart.Acceptance criteria
todoStore.createItem(categoryId, title)creates item with correct defaults (status=todo, order, id, createdAt)todo.mutateWebSocket method accepts mutation payload and returns updated state~/.t3code/todos.jsonvia debounced atomic writecreatedAtwithin their categorybun fmt,bun lint,bun typecheckall passBlocked by