Parent
#44
What to build
Click-to-cycle status icon on each item (todo → in-progress → done → todo). A "Done" section at the bottom of the sidebar shows the last 10 completed items. Archive spill to a separate file.
State machine: todoStore gains cycleStatus(itemId):
todo → in-progress: sets status, stays in category
in-progress → done: sets status, moves to done collection, sets completedAt
done → todo: sets status, returns to original category
Archive cutoff: when the done list exceeds 10 items, the oldest (by position) moves to ~/.t3code/todos-archive.json. The todoPersistence module handles this on each write.
UI: Status icon displays the current state (circle=empty for todo, circle=half for in-progress, checkmark for done). Clicking cycles. Done items appear in a collapsed "Done" section at the bottom of the sidebar showing the last 10. Each done item shows its original category as a small badge/tag.
Tests: Status cycling edge cases, archive spill when 11th item completes, return-to-category on un-complete.
Acceptance criteria
Blocked by
Parent
#44
What to build
Click-to-cycle status icon on each item (todo → in-progress → done → todo). A "Done" section at the bottom of the sidebar shows the last 10 completed items. Archive spill to a separate file.
State machine:
todoStoregainscycleStatus(itemId):todo→in-progress: sets status, stays in categoryin-progress→done: sets status, moves to done collection, setscompletedAtdone→todo: sets status, returns to original categoryArchive cutoff: when the done list exceeds 10 items, the oldest (by position) moves to
~/.t3code/todos-archive.json. ThetodoPersistencemodule handles this on each write.UI: Status icon displays the current state (circle=empty for todo, circle=half for in-progress, checkmark for done). Clicking cycles. Done items appear in a collapsed "Done" section at the bottom of the sidebar showing the last 10. Each done item shows its original category as a small badge/tag.
Tests: Status cycling edge cases, archive spill when 11th item completes, return-to-category on un-complete.
Acceptance criteria
~/.t3code/todos-archive.jsonbun fmt,bun lint,bun typecheckall passBlocked by