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

ui(channel): one date format, emphasize unauthorized state, tighten status spacing

Open codeaholicguy opened this issue 2 months ago • 0 comments

Current output

channel list:

Configured Channels:

  Name       Type      Status   Identity        Authorized  Bridge   Created
  ─────────────────────────────────────────────────────────────────────
  telegram   telegram  enabled  @aidevkit_bot   no          stopped  6/4/2026
  telegram1  telegram  enabled  @aidevkit1_bot  yes         stopped  6/4/2026

channel status:

telegram (telegram)
  Enabled: yes
  Identity: @aidevkit_bot
  Authorized: no
  Bridge: stopped
  Configured: 2026-06-04T19:18:06.962Z


telegram1 (telegram)
  ...

Problems

  1. Two different date formats inside one command family: list renders Created via toLocaleDateString() → 6/4/2026 (US-locale dependent: a European machine prints 4/6/2026 for the same date), while status prints the raw ISO string 2026-06-04T19:18:06.962Z. Neither matches capacity's humanized format.
  2. Security-relevant state not emphasized: Authorized: no renders plain/dim in both views — an unauthorized bot that will silently drop messages looks identical to a healthy one when scanning the table.
  3. Inconsistent yes/no styling: Enabled: yes is green and Enabled: no is red, but Authorized uses neither color in the detail view and plain text in the table.
  4. Excessive vertical spacing in channel status: double blank line after each entry (ui.breakline() per record plus the section spacing) — with several channels the list doubles in height for no information gain.
  5. Bridge column semantics: stopped is dim (good) but running is green in list while the detail view prints running (PID: 123, agent: foo) — the table gives no way to reach that detail (no hint to run channel status <name>).

Expectation

  • One date format from the shared time util: Created → Jun 4 (or Jun 4 · 19:18); Configured in status → same format. No toLocaleDateString, no raw ISO in human output (keep ISO in JSON).
  • Authorized: no → yellow/red emphasis in both views; yes → green; make the table cell the loudest cell in an unhealthy row (or add a status glyph column).
  • Single blank line between channel status entries.
  • In list, when a bridge is running, keep the green running cell; consider a dim footer hint like Run "ai-devkit channel status <name>" for bridge details.

Files: packages/cli/src/commands/channel.ts (list ~L201–245, status ~L390–403)

codeaholicguy avatar Sep 22 '26 14:09 codeaholicguy