ai-devkit icon indicating copy to clipboard operation
ai-devkit copied to clipboard

ui(agent): replace emoji status cells, fix pluralization and mixed column semantics in list/detail

Open codeaholicguy opened this issue 2 months ago • 0 comments

Current output

Agents:

  Agent            Project    Type  Mode         Status   Working On                                   Active
  ──────────────────────────────────────────────────────────────────────────────────────────────────────────
  ai-devkit-23328  ai-devkit  Pi    interactive  🟡 wait  it is a great UI audit, now please to audit …  just now

⚠ 1 agent(s) waiting for input.

agent detail conversation view:

────────────────────────────────────────
[3:37:12 PM] user:
  ...

Problems

  1. Emoji + abbreviation status cells (🟡 wait, ⚪ idle): mixed vocabulary vs status (ready/fail) and capacity (OK/LIMITED); emoji glyphs can also shift column alignment on terminals with non-single-width emoji rendering.
  2. Mixed column semantics in one table: interactive rows put agent.status in Status and summary in Working On, while durable rows put agent.state in Status and lastResult.summary ?? sessionHealth in Working On — the same column means different things per row with no visual separation or legend.
  3. Naive pluralization: 1 agent(s) waiting for input.
  4. Fragile status coloring: the Status column style colors by text.includes(STATUS_DISPLAY[...].label) — substring-matching the rendered cell (e.g. the label "run" would match inside other text if labels ever grow).
  5. formatRelativeTime is untestable and unguarded: reads Date.now() directly (no injectable clock) and renders any future timestamp as just now.
  6. Truncated "Working On" with no recovery path: long summaries end in … with no hint how to see the full text (e.g. agent detail <name>).
  7. agent detail time stamps use bare toLocaleTimeString() (machine-locale dependent, includes seconds) and a hardcoded 40-char ─ separator.

Expectation

  • Replace emoji+abbrev with the shared status model labels/colors (e.g. running green, waiting yellow, idle dim, unknown gray); if emoji are kept, they must come from the shared status definition, not a local table.
  • Separate interactive and durable sections (two tables or a Mode-grouped layout with a clear header) so columns keep one meaning.
  • 1 agent waiting / 2 agents waiting via the shared pluralization helper.
  • Color statuses by key lookup, not by substring-matching rendered text.
  • Give formatRelativeTime an injectable now and a future branch (e.g. in 3m).
  • When "Working On" truncates, append a dim hint row or document agent detail in the footer warning that already prints when agents are waiting.
  • agent detail timestamps: shared time util (15:37 local clock), separator width derived from terminal width constant.

Files: packages/cli/src/commands/agent.ts (list render ~L419–468, STATUS_DISPLAY L74, formatRelativeTime L96, conversation view ~L160–178)

codeaholicguy avatar Sep 22 '26 14:09 codeaholicguy