ai-devkit
ai-devkit copied to clipboard
ui(agent): replace emoji status cells, fix pluralization and mixed column semantics in list/detail
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
- Emoji + abbreviation status cells (
🟡 wait,⚪ idle): mixed vocabulary vsstatus(ready/fail) andcapacity(OK/LIMITED); emoji glyphs can also shift column alignment on terminals with non-single-width emoji rendering. - Mixed column semantics in one table: interactive rows put
agent.statusin Status and summary in Working On, while durable rows putagent.statein Status andlastResult.summary ?? sessionHealthin Working On — the same column means different things per row with no visual separation or legend. - Naive pluralization:
1 agent(s) waiting for input. - 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). formatRelativeTimeis untestable and unguarded: readsDate.now()directly (no injectable clock) and renders any future timestamp asjust now.- 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>). agent detailtime stamps use baretoLocaleTimeString()(machine-locale dependent, includes seconds) and a hardcoded 40-char─separator.
Expectation
- Replace emoji+abbrev with the shared status model labels/colors (e.g.
runninggreen,waitingyellow,idledim,unknowngray); 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 waitingvia the shared pluralization helper.- Color statuses by key lookup, not by substring-matching rendered text.
- Give
formatRelativeTimean injectablenowand a future branch (e.g.in 3m). - When "Working On" truncates, append a dim hint row or document
agent detailin the footer warning that already prints when agents are waiting. agent detailtimestamps: shared time util (15:37local 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)