Skip to content

feat(tui): compact todo panel above the prompt - #150

Merged
quickbeard merged 6 commits into
mainfrom
todo-panel
Aug 2, 2026
Merged

quickbeard merged 6 commits into
mainfrom
todo-panel

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

Summary

While the sidebar is hidden and the session has unfinished todos, a compact panel now renders directly above the prompt input:

  • Up to 4 todo items windowed around the active one (one completed item of context, the in_progress item, then what follows; falls back to the first pending, then the last item).
  • An adaptive summary line: 3 of 6 finished · ctrl+b to show full TODO once anything is completed, still 6 items in the TODO list · … before that. cancelled never counts as finished, so a visible panel can't claim everything is done.
  • Hidden whenever the sidebar is open (the full list lives there), the session is a subagent, a permission/question dialog is up, or every todo is completed.

Since the panel now covers todos, the fork's prompt-footer hint (3 todos · 5 files) drops its todo part and reports only modified files; sidebar-hint.ts is simplified to one argument accordingly.

New fork-only files: routes/session/todo-panel-model.ts (pure window/label helpers) and todo-panel.tsx (view reusing TodoItem). The DIVERGENCES.md row for routes/session/index.tsx is amended with merge guidance, and CHANGELOG has an Unreleased → TUI entry.

Test plan

  • bun typecheck (packages/tui)
  • New test/routes/todo-panel-model.test.ts: window clamping (active first/last, ≤4 items, pending fallback, all-cancelled fallback) and summary labels (singular, cancelled-not-finished)
  • New test/todo-panel.view.test.tsx: hydrated window, live window shift on todo.updated, panel disappears when all completed, singular remaining form
  • Updated sidebar-hint unit + view tests for the files-only hint
  • Full packages/tui suite: 259 pass / 1 skip / 0 fail
  • End-to-end in tmux (real agent turn via todowrite): panel windows tasks 3–6 of 6, ctrl+b swaps panel ↔ sidebar and back

🤖 Generated with Claude Code

quickbeard and others added 6 commits August 2, 2026 11:27
While the sidebar is hidden and the session has unfinished todos, render
up to 4 items windowed around the active one directly above the input,
with an adaptive summary line (`2 of 6 finished · ctrl+b to show full
TODO`, or `still N items in the TODO list · …` before anything is done).
The full list stays in the sidebar; the prompt-footer hint now reports
only modified files since the panel covers todos.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Split the summary helper so the view renders the progress text
(`3 of 12 finished`) in theme.success once anything is completed, while
the `· ctrl+b to show full TODO` suffix and the not-started form stay
muted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Prefix the summary line with cli-spinners "star", colored like the
progress text (success green once something is finished, muted before).
Follows the fork's spinner conventions: inlined frames with MIT
attribution, 120 ms interval (stock cli-spinners timing feels too
fast), and a static ⋯ fallback when animations are disabled.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The star spinner (and its static fallback) now uses theme.warning — the
same accent as the [•] in_progress item — instead of following the
summary text's green/muted color.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The star spinner now animates only while the session is busy (same
session_status source as the prompt footer); when idle or interrupted it
parks on a static sixteen-pointed star, which also replaces the old
animations-disabled fallback glyph.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@quickbeard
quickbeard merged commit 9d54329 into main Aug 2, 2026
2 of 5 checks passed
@quickbeard
quickbeard deleted the todo-panel branch August 2, 2026 08:19
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.

1 participant