Skip to content

fix(coding-agent): anchored todo HUD with borders and progress header#3215

Open
roboomp wants to merge 2 commits into
mainfrom
farm/66fc78d5/anchor-todo-list-above-input
Open

fix(coding-agent): anchored todo HUD with borders and progress header#3215
roboomp wants to merge 2 commits into
mainfrom
farm/66fc78d5/anchor-todo-list-above-input

Conversation

@roboomp

@roboomp roboomp commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Repro

Create a multi-phase todo list with the todo tool. Watch the bordered tool-result block scroll into history as the agent keeps working. The small sticky panel above the editor (#renderTodoList) renders as plain bold text — no border, no separator — and is easy to miss next to the editor and status line. Users perceive the bordered chat block as the only todo display and conclude the list "isn't anchored".

$ bun packages/coding-agent/test/smoke-todo.ts   # before fix

   Todos
   └ I. Foundation
   └ ☐ Wire dependency graph
     ☐ Add minimal docs

Cause

InteractiveMode.#renderTodoList (packages/coding-agent/src/modes/interactive-mode.ts:1628) emits a single Text node with only a leading blank line and a bold "Todos" header above the task tree. The container is in the right position (between statusContainer and the editor), but the rendering has no visual chrome that says "persistent HUD". In a busy transcript that small block blends into surrounding UI and gets visually lost, so users reach for the bordered tool-result block inside the chat (which scrolls into scrollback).

Fix

  • Bracket the panel with DynamicBorder lines (same theme.fg("dim", …) color the existing BtwPanel / OmfgPanel use). The HUD now reads as a real anchored panel rather than ambient status text.
  • Inline progress + active-phase pointer in the header: Todos · 2/7 done · I/III Foundation (collapsed multi-phase) or Todos · 0/2 done · Tasks (single phase) or Todos · 2/7 done (expanded). The header is self-describing so users no longer need to scroll back to the bordered tool-result block to check status.
  • Drop the leading blank-line spacer; the top border replaces it.
  • Hoist the active-phase / phase-count compute above the expanded/collapsed branch and flatten the suffix logic so each branch only handles task-row rendering.

After:

────────────────────────────────────────────────────────────────────────────────
   Todos · 1/6 done · I/III Foundation
   └ ☐ Wire dependency graph
     ☐ Add minimal docs
────────────────────────────────────────────────────────────────────────────────

Verification

Added three regression tests in packages/coding-agent/test/interactive-mode-todo-clear.test.ts that pin the new contract:

  • brackets the panel with horizontal rules and a progress header — asserts top/bottom rows are full-width rules and the header contains progress (1/4 done) and active-phase pointer (I/II Foundation).
  • renders nothing when there are no todos — asserts the container collapses to zero lines when there are no phases.
  • omits the phase pointer in the header for a single-phase list — asserts single-phase mode shows the phase name but no I/I pointer.

bun test test/tools/todo.test.ts test/interactive-mode-todo-clear.test.ts test/acp-builtins.test.ts test/modes/controllers/todo-command-controller.test.ts → 124 pass, 0 fail.
lsp diagnostics on the edited source + test file → clean.

Fixes #3213

roboomp added 2 commits June 21, 2026 22:38
The sticky panel above the editor rendered as ambient text:

  Todos

  └ I. Foundation

  └ ☐ ...

so users perceived the bordered tool-result block in chat as the

only todo display. Once that result scrolled into history they

concluded the list 'isn't anchored'.

Bracket the panel with dim horizontal rules (matching BtwPanel /

OmfgPanel) and inline progress + active-phase pointer in the header

(`Todos · 2/7 done · I/III Foundation`) so the persistent HUD reads

as a real panel and stays self-describing without scrolling back.

Fixes #3213
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouched Passed the vouch gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TODO list created does not anchor above user input area

1 participant