Skip to content

feat(vscode): show todo progress in the session dock - #14813

Merged
marius-kilocode merged 8 commits into
mainfrom
feat/session-dock-todos
Oct 6, 2026
Merged

marius-kilocode merged 8 commits into
mainfrom
feat/session-dock-todos

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The to-do list showed as a bar under the session title, away from the prompt. Background agents and goals already moved to the session dock above the prompt, so the to-do progress was the only run status left at the top.

Why This Change Was Made

The dock now shows one row for the run: background agents on the left of the spinner ("who works") and progress on the right ("how far"), first the to-do chip and then the goal. The to-do bar under the title and its revert-to-checkpoint behavior are removed.

The chip shows a ring with one segment per item, the done count, and the current item. While a turn runs it trails the spinner. When the session is idle it sits next to the session actions, so an unfinished list stays visible. Click the chip to open the full list, which is read-only.

Behavior details:

  • Changes animate only while the user watches them. A finished item strikes through and the next one slides in, the count rolls, and the ring pulses. When the last item finishes, the ring turns into a check with a short burst, then settles to a muted check. A reload or a session switch never replays this.
  • The chip state comes from the session data, not from stored UI state. A finished list stays until a newer user message starts another run, so a reload gives the same result. Background result messages do not hide it.
  • Cancelled items do not count toward the total. Lists with more than 12 items use a continuous ring.
  • When the dock runs out of room, the trailing group collapses in a fixed order: the title truncates, the goal label hides, the title hides, then the count hides. The ring always shows. The plan uses natural widths, so a collapse cannot feed back into the next plan.
  • Animations stop with reduced motion.

The list is read-only. The old header list reverted to a checkpoint when a done item was clicked, but it matched items by position and reverted to the to-do write before the one that completed the item, so it often landed on the wrong item when an agent marked several items done at once. Checkpoints stay available in the transcript.

User Impact

To-do progress is next to the prompt, together with the spinner, background agents, and the goal. The session header is shorter.

Evidence

Real VS Code self-test with DeepSeek V4.1 Flash in Agent Manager, with a background subagent running and a 4-item list. While working, the chip trails the spinner and shows the current item:

Working: background agent, spinner, and to-do chip showing 0 of 4 with the current item

Mid-run progress:

Working: to-do chip showing 2 of 4 and the current item

The last item finishes, the chip shows the finished state:

All to-dos done: green check and All done label

Idle, next to the session actions:

Idle dock with the to-do chip next to the session actions

The full read-only list:

To-do list popover above the chip

Checks on the head commit: test, test-vscode, typecheck, docs-build, Check Links, Check Source Links, Check markdown table padding, Check forbidden strings, Check shared upstream annotations, CodeQL, and Visual Regression Tests all pass.

@kilo-code-bot

kilo-code-bot Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Incremental review of 351861352d..fb544455e3 (2 commits: 21ed2b9e61 "address todo chip review feedback and focus the dock story", plus the visual-regression baseline update). The changes extract the run-boundary logic shared by the agent stack and the todo chip into run-boundary.ts, coalesce dock-fit planning to one requestAnimationFrame per burst (reading layout before writing --session-trail, and canceling the pending frame on cleanup), reset the chip strike when it settles, drop the now-unused session/data-session from TodoChip, remove the keyed per-session remount, and render the dock directly in the visual-regression story at ≤420px widths.

Verified the previous inline findings against current HEAD: all five are already resolved in earlier commits (the todoFinished guard now keys on item content, TodoChip no longer reads props.item().id, and the story/dock widths fit the 420px harness). They remain outdated on GitHub (line: null), so none are carried forward.

No new correctness, security, performance, or resource-leak issues found. The requestAnimationFrame is canceled on cleanup and every observer is disconnected, so the reworked scheduling does not leak.

Files Reviewed (5 files)
  • packages/kilo-vscode/webview-ui/src/components/chat/AgentStack.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/SessionDock.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/run-boundary.ts
  • packages/kilo-vscode/webview-ui/src/components/chat/todo/TodoChip.tsx
  • packages/kilo-vscode/webview-ui/src/stories/chat.stories.tsx
Previous Review Summaries (6 snapshots, latest commit 3518613)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 3518613)

Status: No Issues Found | Recommendation: Merge

Incremental review of commit 351861352d ("drop the unused TodoItem id field"). The change removes the never-populated id?: string field from the webview TodoItem interface and drops the fabricated id from two test helpers, matching the real backend shape. Verified against packages/opencode/src/session/todo.ts (SessionTodo.Info carries only content/status/priority), so no runtime data is lost and no code still reads TodoItem.id — the only remaining .id references in the todo flow are on Message objects. The comment now correctly documents that items are identified by their text.

The prior inline findings are outdated at HEAD (fresh GitHub state shows line: null on all five; they were already resolved in earlier commits), so nothing is carried forward.

No new correctness, security, performance, or resource-leak issues found.

Files Reviewed (3 files)
  • packages/kilo-vscode/tests/unit/session-outcome.test.ts
  • packages/kilo-vscode/tests/unit/todo-revert.test.ts
  • packages/kilo-vscode/webview-ui/src/types/messages/questions.ts

Previous review (commit 710506a)

Status: No Issues Found | Recommendation: Merge

Incremental review of commit 710506a5 ("simplify the session dock todo chip"). The five findings from the prior review remain resolved at HEAD: todoFinished keys on item content and only matches previously-open items (todo-dock.ts:52), TodoChip no longer relies on the never-populated id field, SessionDock observes the .working-status label, the dock frames use 420/300px widths within the capture viewport, and the unit test uses the real { content, status } backend shape.

The refactor itself is clean:

  • The per-item ring segment pulse was removed in favor of the whole-ring scale animation, with the now-unused Segment component and Accessor/TodoItem imports deleted.
  • The two trail effects were merged into one; the --session-trail property is still set before layout reads and is torn down in onCleanup, and both ResizeObservers plus the MutationObserver are disconnected. Since the trail is width: max-content and out of flow, a ResizeObserver on it cannot feed back into the plan.
  • TODO_TITLE_MIN is no longer exported and has no remaining importers; the removed CSS (todo-row-in, todo-panel-progress, --todo-i) has no dangling references.

No new correctness, security, performance, or resource-leak issues found.

Files Reviewed (7 files)
  • packages/kilo-vscode/webview-ui/src/components/chat/SessionDock.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/todo/TodoChip.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/todo/todo-dock.ts
  • packages/kilo-vscode/webview-ui/src/stories/chat.stories.tsx
  • packages/kilo-vscode/webview-ui/src/styles/todo-dock.css
  • packages/kilo-vscode/tests/visual-regression.spec.ts
  • packages/kilo-vscode/docs/features/background-agent-visibility.md

Previous review (commit e99ecbc)

Status: No Issues Found | Recommendation: Merge

All five findings from the previous review are still resolved at HEAD (e99ecbc9). The incremental change since 11258907 updates only a visual-regression baseline PNG, so there is no new code to review.

Verification of the previously-flagged lines against current code:

  • todo-dock.ts todoFinished keys on item content and only matches previously-open items (todo-dock.ts:50).
  • TodoChip.tsx segment pulse compares content/status (TodoChip.tsx:167) and the chip direction effect uses content (TodoChip.tsx:315).
  • SessionDock.tsx fit effect observes the .working-status label with teardown (SessionDock.tsx:153).
  • chat.stories.tsx frames use 420/300px widths within the 420px capture viewport.
  • todo-dock.test.ts uses the real backend todo shape (no fabricated IDs), including the replaced-list cases.
Files Reviewed (6 files)
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/chat/chat-view-session-dock-todo-states-chromium-linux.png - incremental baseline update only
  • packages/kilo-vscode/webview-ui/src/components/chat/todo/todo-dock.ts - re-verified, fixed
  • packages/kilo-vscode/webview-ui/src/components/chat/todo/TodoChip.tsx - re-verified, fixed
  • packages/kilo-vscode/webview-ui/src/components/chat/SessionDock.tsx - re-verified, fixed
  • packages/kilo-vscode/webview-ui/src/stories/chat.stories.tsx - re-verified, fixed
  • packages/kilo-vscode/tests/unit/todo-dock.test.ts - re-verified, fixed

Previous review (commit 1125890)

Status: No Issues Found | Recommendation: Merge

All five findings from the previous review are resolved at HEAD (11258907):

  • todo-dock.ts todoFinished now keys on item content and only matches previously-open items.
  • TodoChip.tsx Segment pulse and chip direction effects now use content identity.
  • SessionDock.tsx fit effect now observes the .working-status label (with teardown via mutate.disconnect()).
  • chat.stories.tsx frames now use 420/300px widths within the 420px capture viewport.
  • todo-dock.test.ts uses the real backend todo shape (no fabricated IDs), and the redundant revert-target test was removed.

No new issues were found in the incremental changes.

Files Reviewed (10 files)
  • packages/kilo-docs/pages/code-with-ai/features/task-todo-list.md
  • packages/kilo-vscode/tests/unit/todo-dock.test.ts
  • packages/kilo-vscode/tests/unit/todo-revert.test.ts
  • packages/kilo-vscode/webview-ui/src/components/chat/SessionDock.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/todo/TodoChip.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/todo/todo-dock.ts
  • packages/kilo-vscode/webview-ui/src/context/todo-revert.ts
  • packages/kilo-vscode/webview-ui/src/stories/chat.stories.tsx
  • packages/kilo-vscode/webview-ui/src/styles/todo-dock.css
  • packages/kilo-vscode/webview-ui/src/types/messages/questions.ts

Previous review (commit c74c8e2)

Status: 5 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 3
SUGGESTION 2
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/webview-ui/src/components/chat/todo/todo-dock.ts 52 todoFinished identity guard is a no-op: TodoItem.id is never populated by the server (SessionTodo.Info has only content/status/priority), so a replaced already-done list still celebrates.
packages/kilo-vscode/webview-ui/src/components/chat/SessionDock.tsx 140 Fit effect never observes the working status text, so the core(lane())-based space goes stale when the status label changes.
packages/kilo-vscode/webview-ui/src/stories/chat.stories.tsx 375 720px frames are captured at the 420px default viewport; the generated docs screenshot is clipped horizontally.

SUGGESTION

File Line Issue
packages/kilo-vscode/webview-ui/src/components/chat/todo/TodoChip.tsx 173 Segment pulse guard compares ids that are always undefined, so it cannot detect a replaced list at the same index.
packages/kilo-vscode/tests/unit/todo-dock.test.ts 11 Test helper fabricates ids that cannot occur in production, so the replaced-list assertion does not protect real behavior.
Files Reviewed (7 files)
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/chat/chat-view-session-dock-todo-states-chromium-linux.png - new baseline (incremental)
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/chat/task-header-busy-chromium-linux.png - new baseline (incremental)
  • packages/kilo-vscode/webview-ui/src/components/chat/todo/todo-dock.ts - 1 warning (re-verified)
  • packages/kilo-vscode/webview-ui/src/components/chat/SessionDock.tsx - 1 warning (re-verified)
  • packages/kilo-vscode/webview-ui/src/stories/chat.stories.tsx - 1 warning (re-verified)
  • packages/kilo-vscode/webview-ui/src/components/chat/todo/TodoChip.tsx - 1 suggestion (re-verified)
  • packages/kilo-vscode/tests/unit/todo-dock.test.ts - 1 suggestion (re-verified)

Incremental diff since 8b144bbf91 touches only the two LFS baseline PNGs above; all prior findings remain present on unchanged lines at HEAD.

Fix these issues in Kilo Cloud

Previous review (commit 8b144bb)

Status: 5 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 3
SUGGESTION 2
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/webview-ui/src/components/chat/todo/todo-dock.ts 52 todoFinished id guard is a no-op because TodoItem.id is never populated by the server; a replaced already-done list still celebrates.
packages/kilo-vscode/webview-ui/src/components/chat/SessionDock.tsx 140 Fit effect never observes the working status text, so core(lane())-based space goes stale when the status label changes.
packages/kilo-vscode/webview-ui/src/stories/chat.stories.tsx 375 720px frames captured at a 420px viewport; the generated docs screenshot will be clipped horizontally.

SUGGESTION

File Line Issue
packages/kilo-vscode/webview-ui/src/components/chat/todo/TodoChip.tsx 173 Segment pulse guard compares ids that are always undefined, so it cannot detect a replaced list.
packages/kilo-vscode/tests/unit/todo-dock.test.ts 11 Test helper fabricates ids that cannot occur in production, so the replaced-list assertion does not protect real behavior.
Files Reviewed (38 files)
  • .changeset/session-dock-todos.md - changeset looks good
  • packages/kilo-docs/pages/code-with-ai/features/task-todo-list.md - Markdoc {% image %} tag (not raw HTML), path matches the story mapping
  • packages/kilo-docs/public/img/screenshot-tests/.../task-header-with-todos*.png - removed baselines
  • packages/kilo-vscode/tests/unit/session-dock.test.ts - expectations match the new wiring
  • packages/kilo-vscode/tests/unit/todo-dock.test.ts - 1 suggestion
  • packages/kilo-vscode/tests/visual-regression.spec.ts - story ids / SKIP / DOCS mapping verified
  • packages/kilo-vscode/webview-ui/src/components/chat/ChatView.tsx - no issues
  • packages/kilo-vscode/webview-ui/src/components/chat/SessionDock.tsx - 1 warning
  • packages/kilo-vscode/webview-ui/src/components/chat/TaskHeader.tsx - no issues
  • packages/kilo-vscode/webview-ui/src/components/chat/goal/useGoalDock.tsx - no issues
  • packages/kilo-vscode/webview-ui/src/components/chat/todo/TodoChip.tsx - 1 suggestion
  • packages/kilo-vscode/webview-ui/src/components/chat/todo/todo-dock.ts - 1 warning
  • packages/kilo-vscode/webview-ui/src/i18n/*.ts (21 files) - both new keys present in every language
  • packages/kilo-vscode/webview-ui/src/stories/chat.stories.tsx - 1 warning
  • packages/kilo-vscode/webview-ui/src/styles/chat.css - no issues
  • packages/kilo-vscode/webview-ui/src/styles/task-header.css - no issues
  • packages/kilo-vscode/webview-ui/src/styles/todo-dock.css - no issues

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 79.8K · Output: 21.4K · Cached: 715.6K

Review guidance: REVIEW.md from base branch main

@WebReflection

WebReflection commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

@marius-kilocode what is this file about? packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/chat/chat-view-session-dock-todo-states-chromium-linux.png

not listed in the summary but is that Review & Support overlapping with details meant to be like that?

@WebReflection
WebReflection disabled auto-merge October 6, 2026 09:40

@WebReflection WebReflection left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the feature but I've disabled auto-merge since this file in particular doesn't look right to me https://github.com/Kilo-Org/kilocode/pull/14813/changes#diff-0cb3d75767d60566de4125ea477da9f10acce020d47085824da73767c2a52c1e ... is that's meant to be like that though, not blocking, feel free to merge

@marius-kilocode

Copy link
Copy Markdown
Collaborator Author

@WebReflection this is primarily due to the environment of the screenshot tests. Primarily I look in those for the todo ui being correctly rendered, but your right it could be less noisy.

marius-kilocode and others added 2 commits October 6, 2026 12:48
- The finished label no longer carries a strike when the chip settles.
- Remove the unused session prop and data-session attribute.
- Share one run-boundary helper between the agent stack and the todo chip.
- Plan the dock fit once per frame, reading before writing layout.
- The todo-states story renders only the session dock, so the docs
  screenshot drops the welcome chrome and the busy header skeletons.
@marius-kilocode
marius-kilocode merged commit 9e2483d into main Oct 6, 2026
29 checks passed
@marius-kilocode
marius-kilocode deleted the feat/session-dock-todos branch October 6, 2026 11:07
@marius-kilocode

Copy link
Copy Markdown
Collaborator Author

@WebReflection I simplified the test to only render todo related ui

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.

2 participants