Repository navigation
Animate the Todo task in progress with a spinner #222
Copy link
Copy link
Closed
Description
Parent
Spec: ctui 0.5.0, sections "Spinner" (Implementation Decisions) and stories 21–22. Decided in the Todo spinner spike on 2026-10-09: prototype/todo-spinner (commit 6fa9e40).
What to build
In the Todo section, the task in progress shows an animated spinner in place of the fixed ◐, and waiting tasks show ⠶ in place of ○.
- In progress: frames
⠴ ⠦ ⠖ ⠲, one every 100 ms, inwarning; the text stays theactiveForminmain. - Waiting:
⠶infaint, text inmuted. Done rows are unchanged (✓, muted). - A new surface module
ctui/plugins/todo/spinner.tsx(props{ frames, ms, color }, frame index as local state, onesurface.everystarted whilestateis undefined) animates on the surface's own frame clock, so the Sidebar doesn't redraw. The Todo view draws it as aClientwithmodule="./spinner.tsx"(a literal) and keyspinner-<item.id ?? index>, in a 1-cell Box, followed by a Text with a space and the task text, inside one row Box. - Widen the Sidebar plugin's
uitype inctui/plugins/plugin.tsto the Sidebar's terminal/desktop table so the view getsClientwithout a cast. - The spinner isn't pressable, so it stays a
Clientwhile the Pane is focused. The folded summary stays text.
The spike's spinner.tsx is the starting point; its sample lists, the 40-row cap and the PROTOTYPE comments in todo/index.tsx don't ship.
Branch: bugfix/todo-spinner from release/0.5.0, with its pull request into release/0.5.0 once the release pull request into main is open (AGENTS.md, Branches).
Acceptance criteria
-
todo-sidebar.test.tsx: the task in progress draws through thespinner.tsxClient, first frame⠴inwarning, with itsactiveForminmain; waiting tasks draw⠶infaint; done rows unchanged.tests/clients.tsxgains aspinner.tsxstub. - A unit test for
spinner.tsx: eacheverytick steps to the next frame and wraps after⠲. - No
PROTOTYPEcomments or sample lists remain; Todo's cap is 8. - MEMORY.md, "The
todoSidebar plugin turns the task tools on by default": Guidance names the rows (✓muted, the⠴⠦⠖⠲spinner at 100 ms inwarningdrawn by thespinner.tsxClient on its own frame clock,⠶faint for waiting); Reason gains the spinner spike. -
docs/design/sidebar.htmldraws the in-progress row as⠴and waiting rows as⠶; the PNGs are re-exported. -
docs/testing/live-checks.md: the Todo row's glyphs read⠶insubtleand a spinner turning through⠴ ⠦ ⠖ ⠲inwarning; a new row: with the Pane focused (ctrl+x tab) the spinner keeps turning, and a/themeswitch recolors it within 0.5 s. Both run and passed on 2.1.292; the PR says so. -
node scripts/check.tsexits 0.
Blocked by
- None (can start once the
release/0.5.0pull request is open)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
a1exk-dev commentedon Oct 9, 2026
Fixed by #224 (#224), merged into
release/0.5.0; it ships with ctui 0.5.0 (#223).