Skip to content

ui(status): unify status vocabulary, reconcile counts, and stop coloring by string-matching #235

Description

@codeaholicguy

Current output

AI DevKit Status:

  Scope       Status     Details
  ─────────────────────────────────────────────────────────────────────
  overall     fail       13 ready · 1 not ready · 1 fail
  ai-devkit   ready      0.62.2 (latest 0.62.2)
  project     not ready  /Users/.../packages/cli/.ai-devkit.json
  ...

Agents:

  Agent   Status
  ───────────────
  claude  fail
  ...

Checks:

  Check                              Status  Evidence
  ─────────────────────────────────────────────────
  claude: executable                 ready   /opt/homebrew/bin/claude
  ...

Problems

  1. Status vocabulary drifts from every other command: ready / not ready / fail / info here vs OK/LIMITED/EXHAUSTED in capacity and 🟢 run/🟡 wait in agent list. not ready vs fail severity (yellow vs red) is never explained.
  2. Unreconcilable counts: overall says 13 ready · 1 not ready · 1 fail but the Checks table contains info rows that are excluded, so a reader cannot verify the totals against the rows they can see.
  3. Long paths force the table to terminal width: the project row prints the absolute config path, so the Details column dominates column fitting and other cells get truncated with on narrow terminals. No ~-relative shortening.
  4. Empty Agents table edge: when no agents have an executable (agentEntries filters), the Agents: header, column headers, and rule render with zero rows — an empty table instead of an explanatory line.
  5. Fragile color coupling: statusStyle colors by string-matching the rendered text (if (text === "ready" ...)) — the same pattern removed from capacity in 3c65af7; adding a status requires editing two functions.
  6. JSON inconsistency: renderStatusReport uses raw console.log for --json while other commands use ui.text.

Expectation

  • Map statuses onto the shared status model (see cross-cutting issue) with fixed severities: pass → green, warn → yellow, fail → red, info → dim; keep domain labels but derive color from a key, not from the rendered string.
  • overall row counts every check including info (13 ready · 1 not ready · 1 fail · 6 info) so totals reconcile with the Checks table.
  • Shorten home-relative paths (~/.ai-devkit.json); keep the absolute path only in --json.
  • When there are no agent rows, print a dim explanatory line (e.g. No agents detected.) instead of an empty table.
  • Route --json through ui.text like the rest of the CLI.

Files: packages/cli/src/commands/status/render.ts

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions