fix: reliable todo panel updates + close when work stops#511
Merged
Conversation
TaskUpdate calls with ids the server didn't know (taskSeq reset on TodoWrite, empty task map after process restart) were silently dropped, leaving the chat todo panel stale and preventing it from ever reaching all-done. Server now upserts unknown ids, keeps task ids monotonic, honors explicit ids, and seeds restarted processes from the last todo_update in history. Frontend panel is now turn-aware: dismisses 3s after completion once the turn ends (10s while processing), collapses to the pill when a turn ends with unfinished tasks, and detects replaced lists by id signature so a dismissed panel re-shows for new task lists. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codex emits the full plan on every turn/plan/updated notification, so there is no incremental task state to seed after a restart. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
alari76
force-pushed
the
fix/todo-panel-updates
branch
from
June 12, 2026 08:03
5c3f413 to
3b8b882
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TaskUpdatewith an unknown task id was silently dropped (notodo_updateemitted), leaving the chat todo panel stale and unable to ever reach all-done. Causes:taskSeqreset on everyTodoWriteand an empty task map after process restarts while the CLI's task list survives the resume. Now: upsert unknown ids, keep ids monotonic across list generations, honor explicittaskId/idonTaskCreate, and seed restarted processes from the lasttodo_updatein session history. Emitted snapshots are copied to avoid aliasing into stored history. Same fixes mirrored inOpenCodeProcess.TodoPanelis now turn-aware via anisProcessingprop — auto-dismisses 3s after all tasks complete once the turn ends (10s while still processing), collapses to the compact pill when a turn ends with unfinished tasks (Claude often forgets the final update), and detects replaced task lists by id signature (not just count) so a dismissed panel re-shows for the next list.Test plan
npm run build(typecheck + vite) passesnpm test— 2170 tests pass, incl. 9 new TodoPanel tests covering turn transitions with fake timersnpm run lint— 0 errors, no new warnings in touched files🤖 Generated with Claude Code