Skip to content

feat(chat): pin the agent's todo list to the bottom of the chat - #43

Merged
devswha merged 1 commit into
mainfrom
feat/chat-todo-panel
Sep 25, 2026
Merged

devswha merged 1 commit into
mainfrom
feat/chat-todo-panel

Conversation

@devswha

@devswha devswha commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Summary

Before this change, a todo list only showed inside its tool row in the work block, and only partly:

Agent Tool What the chat showed
omp / omo todo Only the init list, with every item unchecked. The done, start, drop and append calls that follow showed as raw JSON
gjc todo_write Raw JSON, because the operations are wrapped in ops
Codex update_plan Raw JSON
Claude Code TodoWrite Rendered, but only inside the collapsed row

Nothing said where the plan stood.

How the state is worked out (src/lib/todos.ts)

  • Whole lists: Claude Code's TodoWrite and Codex's update_plan send the whole list every time, so the newest call wins.
  • Operations: omp/omo todo, gjc todo_write and omo's mcp__…__todo are replayed one operation at a time: init, append (into its phase), start, done, drop, block (with its reason), note and clear.
  • The tool's own answer wins. These tools print the whole list after every call: [X] / [ ] … (in progress|dropped|blocked: …) for omp and omo, and ✓ → ○ for gjc. When that answer is complete, it replaces the replay. So a list started before the loaded pages is still right.
  • Incomplete answers are ignored: an answer that was trimmed, is shorter than its Overall: n/N, or has no list at all.

Checked against the 50 newest omp/omo/gjc sessions on this machine: the answer parses in all 50, and the replay alone matches it in 42. The rest come from the tool auto-correcting the agent's input, which the answer already reflects.

UI

  • Todo panel, pinned to the bottom of the chat.
    • Closed, it is one line: 3/6 · Now: Wire the panel into ChatView, or "Blocked: …" or "All done".
    • Open, it shows the list grouped by phase, with an icon per state: done ✓, in progress ●, to do ○, blocked, and dropped (struck through).
    • Whether it is open is remembered. Dropped items don't count toward the total.
  • Todo calls in the work block now read as one line (plan · 7 items, done · Research, start · Fix, add · 1 to B). Opened, a row shows the list as it stood after that call, instead of its JSON and the answer text.

Testing

  • Unit tests (src/lib/todos.test.ts):
    • Whole-list replacement for TodoWrite and update_plan.
    • The omp replay: auto-advance, append into its phase, block, and drop of a phase.
    • gjc ops, and an answer that overrides the replay when the list began earlier.
    • A cleared list.
    • Both answer formats, including a blocked item's reason and a label that ends in parentheses.
    • Cut or unparseable answers are refused.
    • The one-line summaries.
  • Browser, desktop and a 390×844 phone, with a stubbed omp conversation: the panel shows 3/6 · Now: … closed, and opened it groups items by phase with the right states. The work rows read plan · 7 items, done · Research and so on. No page errors.
  • bun run typecheck passes, bun test passes 337/337, bun run test:ui passes 8/8, and scripts/chat-browser-qa.ts passes 5/5.

🤖 Generated with Claude Code

A todo list only showed inside its tool row, and only as the list an
omp/omo `init` started with (every item unchecked): the done, start,
drop and append operations that follow read as raw JSON, and gjc's
`todo_write` (operations wrapped in `ops`) and Codex's `update_plan` did
not render at all. Nothing said where the plan stood.

src/lib/todos.ts works the list out from every todo call in the loaded
turns: Claude Code's TodoWrite and Codex's update_plan replace it whole;
omp/omo `todo`, gjc `todo_write` and omo's `mcp__…__todo` are replayed
operation by operation (init, append into its phase, start, done, drop,
block with its reason, note, clear), and the whole-list answer those
tools print after every call ([X]/[ ] boxes, or gjc's ✓ → ○) wins over
the replay whenever it is complete, so a list started before the loaded
pages is right too. Checked on the 50 newest omp/omo/gjc sessions here:
the answer parses in all 50, and the replay alone agrees in 42.

The chat pins a TodoPanel to its bottom: the done count and the item in
progress (or blocked) on one line, opening to the list by phase with an
icon per state; whether it is open is remembered. In the work block a
todo call reads as one line ("done · Build", "plan · 7 items") and opens
to the list as it stood after it, instead of its JSON and answer text.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@devswha
devswha force-pushed the feat/chat-todo-panel branch from c0bc931 to 5d2c833 Compare September 25, 2026 18:17
@devswha
devswha merged commit d664c74 into main Sep 25, 2026
@devswha
devswha deleted the feat/chat-todo-panel branch September 26, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant