cli: terminal rendering foundations #312

closed cmc opened this on 2026-10-01 20:44 UTC · cli ux

Discussion

cmc 2026-10-01 20:44 UTC

Terminal rendering foundations in internal/control (term.go, table.go, view.go). Plain and --json output unchanged.

  • Colour roles (ok, done, bad, neutral, warn, ref) replacing stateColor's word list; private red, signature states, archived, primary, admin, scopes. Yellow only for what needs the viewer.
  • Ref cells painted.
  • relAge handles future timestamps ("in 5h"); web sessions list says "until just now" today. Timestamp cText cells become cAge (auth token list EXPIRES).
  • cSize and cDur cell kinds: humanized at a terminal, raw in plain (admin runners waits, repo tree, release show).
  • No unnamed trailing column, no trailing whitespace (repo list [archived], auth email list primary).
  • A mostly-blank flex column is capped (release list TITLE).
  • One section heading style; empty sections skipped everywhere.
  • error: prefix at a terminal, did-you-mean for unknown flags, long usage wrapped.
  • ParseTerm ignores unknown options, so later capability tokens do not turn output plain.

Spec: docs/specs/2026-10-01-cli-terminal-output-design.md

closed by cmc in commit 4837660d33: control: terminal rendering foundations

2026-10-01 20:59 UTC

referenced in commit 791af1d907 by cmc: docs: CLI terminal output spec

2026-10-01 20:59 UTC