Skip to content

feat(cli): themed terminal output with shared UI primitives - #120

Merged
harlan-zw merged 3 commits into
mainfrom
perf/outdated-parallel-search
Aug 21, 2026
Merged

feat(cli): themed terminal output with shared UI primitives#120
harlan-zw merged 3 commits into
mainfrom
perf/outdated-parallel-search

Conversation

@harlan-zw

@harlan-zwharlan-zw commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

❓ Type of change

  • 🐞 Bug fix
  • ✨ New feature

📚 Description

Every command except search printed bare sentences while search carried its own hand-rolled ANSI helpers, and the update TUI re-implemented wrapping, truncation, and its own spinner. One skilld-ui crate now owns the theme roles, screen/line model, text measurement, spinner frames, and relative time, with zero new dependencies.

Plain and JSON output stay byte-identical, so agents and scripts see no change. Human terminals get consistent glyphs, aligned fields, and hyperlinks, the spinner waits 500 ms so fast operations never flash, and the TUI shares the same spinner and glyphs.

One real bug fell out of the sweep: skilld outdated --all streamed spinner lines into agent logs whenever the agent session held a terminal stderr. Progress now goes quiet for agents, matching the status line and output modes.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

Add the skilld-ui crate: theme roles, Screen and Line, text measurement,
braille spinner frames, and relative time. Port search rendering onto it
byte-identical, and route every command through semantic Lines. Plain and
JSON output stay exact machine records; Human output gains glyphs, aligned
fields, and hyperlinks. The status spinner starts after 500ms so fast
operations never flash. The update TUI shares the spinner and theme glyphs.
OutdatedProgressLine gated only on a terminal stderr, so an agent session
attached to a TTY streamed spinner lines into its logs. Gate it on agent
detection too, matching the status line and output modes.
@harlan-zwharlan-zw changed the title feat(cli): shared UI primitives with themed human outputfeat(cli): themed terminal output with shared UI primitivesAug 21, 2026
@harlan-zw

Copy link
Copy Markdown
CollaboratorAuthor

Checked by hand, since CI cannot cover it:

  • Forced a PTY with CLAUDECODE=1 set: install, list, view, outdated --all all emit exact plain strings, no ANSI, no spinner
  • Same commands without the agent variable render themed glyphs, aligned fields, and streaming outdated progress
  • --plain output is byte-identical to the pre-change CLI for every command I compared

@harlan-zw
harlan-zw merged commit 1302083 into mainAug 21, 2026
2 checks passed
Sign up for freeto 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

@harlan-zw