Skip to content

fix(desktop): auto-collapse completed todo panel#4271

Closed
GTC2080 wants to merge 1 commit into
esengine:main-v2from
GTC2080:GTC/fix-completed-todo-panel-4241
Closed

fix(desktop): auto-collapse completed todo panel#4271
GTC2080 wants to merge 1 commit into
esengine:main-v2from
GTC2080:GTC/fix-completed-todo-panel-4241

Conversation

@GTC2080

@GTC2080 GTC2080 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Closes #4241.

Summary

  • Auto-collapse the desktop todo panel once every todo item is completed instead of keeping the final N/N list visible.
  • Derive the visible todo panel from the latest successful top-level todo_write and replay later complete_step entries, so restored session history after restart matches the runtime host-advanced state.
  • Add the todo visibility regression/perf check to the regular frontend test scripts.

Root cause

The frontend treated any successful todo_write with at least one item as a visible panel. The final host-advanced list still contains todo entries, and restored history can contain the original todo_write plus later complete_step calls, so a completed list could remain visible or reappear after restart.

Verification

  • npm run test:todo-visibility (failed before the fix with true !== false for the all-completed list)
  • npm run test:all
  • npm run build
  • git diff --check
  • go test ./...
  • go test ./... in desktop/
  • Browser smoke: opened http://127.0.0.1:5174/, confirmed title Reasonix, and checked for zero console errors

@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Thanks again for this contribution. I opened #4313 as an integration PR that includes this PR's completed-todo auto-collapse behavior and the direction of wiring todo visibility coverage into the regular frontend tests.

#4313 combines that contribution with the plan-seed and restored-history work from #4159, #4230, and #4309, plus the additional success/error replay guards found during review. To keep review focused, I’m closing this PR as superseded by #4313. You are credited in the integration commit and PR body.

@SivanCola SivanCola closed this Jun 13, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 待办列表全部完成后不自动收起,重启后仍显示 (v1.6.0 复现 #3807)

2 participants