fix(desktop): keep restored todo state current#4309
Closed
GTC2080 wants to merge 1 commit into
Closed
Conversation
This was referenced Jun 13, 2026
Collaborator
|
Thanks again for this contribution. I opened #4313 as an integration PR that includes this PR's restored desktop history replay, stable todo dismissal key, and restored-history regression coverage. #4313 also fixes the two remaining replay gaps from review: lowercase failed tool results like |
esengine
pushed a commit
that referenced
this pull request
Jun 14, 2026
…#4313) Seed the agent's canonical todo state from approved plans so later complete_step calls advance the visible panel, and rebuild restored desktop history by replaying todo_write/complete_step only on explicitly successful tool results (missing or errored results no longer count as completed). Hide the panel once all todos are done, keyed to stable content rather than array identity. Integrates #4159, #4230, #4271, and #4309. Closes #4259 Closes #4105 Closes #4170 Closes #4241 Co-authored-by: JesonChou <51042251+JesonChou@users.noreply.github.com> Co-authored-by: ashishexee <144021866+ashishexee@users.noreply.github.com> Co-authored-by: GTC2080 <140309575+GTC2080@users.noreply.github.com>
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.
Closes #4259.
Summary
complete_stepcalls into restored desktop history so the visibletodo_writestate matches the runtime host-advanced task list after session reloads or tab switches.Root cause
The live runtime advances canonical todos when
complete_stepsucceeds, but restored desktop history was rebuilt from the originaltodo_writearguments. After switching sessions or reloading, the frontend could therefore rediscover an older incomplete todo list, even though the task had already advanced or finished. The frontend also treated any non-empty successful todo list as visible, so a fully completed list stayed pinned.Verification
go test . -run 'TestHistoryMessages.*TodoWrite'indesktop/(failed before the fix)npm run test:todo-visibility(failed before the fix)npm run test:allindesktop/frontend/npm run buildindesktop/frontend/go test ./...at repo rootgo test ./...indesktop/gofmt -l .git diff --checkhttp://127.0.0.1:5174/, confirmed titleReasonix, root render, and zero console errorsRelated: #4241 describes the completed-list half of the same restored todo-state failure mode; #4259 covers the broader stale-progress case.