Skip to content

Tastefully colorize kennel status output #511

@FidoCanCode

Description

@FidoCanCode

Problem

`kennel status` is a wall of plain text. On a glance it's hard to tell which repo is working vs. idle, where the issue number is, and whether something is stuck. A little ANSI color would make the output scannable at speed — especially when watched live (`watch -c kennel status`).

Design — tasteful, not garish

Use color to carry meaning, not decoration. One color per concept, consistent across runs:

Element Style
Repo running bold
Repo idle dim
`BUSY` / stuck red
Issue number (`#466`) cyan
PR number (`#498`) magenta (so issue vs PR read differently at a glance)
PR / issue URL dim cyan/magenta
Elapsed times (`elapsed 3m`, `running 54s`) dim gray
`session idle` dim
Active talker kind — `worker` green
Active talker kind — `webhook` yellow
Task counter currently-in-progress (`task 2/7`) bold
Headers (`kennel: UP`) bold
Error / crash lines red bold

No 256-color rainbows. No bold everywhere. When in doubt, dim rather than colorize.

Environment

  • Auto-detect TTY: colorize when `sys.stdout.isatty()` is true.
  • Respect `NO_COLOR` (https://no-color.org): disable color when set.
  • Respect `FORCE_COLOR=1`: enable color even when not a TTY. (Makes `watch -c kennel status` work without extra flags — the current renderer strips color because `watch` doesn't present a TTY.)
  • No external dependency — use a tiny ANSI helper (a `def color(style, text) -> str` with short constants) rather than pulling in `rich` / `colorama`. Kennel is a thin wrapper; a 20-line helper is enough.

Accessibility

Don't rely on color alone for `BUSY` or crash signals — the textual marker stays so color-blind users and log readers don't lose information. Color amplifies, doesn't replace.

Test plan

  • Snapshot tests should keep using plain text (force `NO_COLOR` in the test env so test output diffs stay stable).
  • A handful of tests pin the color helper's output for each semantic style.
  • Verify `kennel status` under `FORCE_COLOR=1` emits ANSI escapes; under `NO_COLOR=1` does not; under a plain pipe (no TTY, no env vars) does not.

Priority

v1, high. Improves day-to-day operator experience significantly for a small surface change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions