ai-devkit
ai-devkit copied to clipboard
ui(channel): one date format, emphasize unauthorized state, tighten status spacing
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
- Two different date formats inside one command family:
listrendersCreatedviatoLocaleDateString()→6/4/2026(US-locale dependent: a European machine prints4/6/2026for the same date), whilestatusprints the raw ISO string2026-06-04T19:18:06.962Z. Neither matchescapacity's humanized format. - Security-relevant state not emphasized:
Authorized: norenders plain/dim in both views — an unauthorized bot that will silently drop messages looks identical to a healthy one when scanning the table. - Inconsistent yes/no styling:
Enabled: yesis green andEnabled: nois red, butAuthorizeduses neither color in the detail view and plain text in the table. - 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. Bridgecolumn semantics:stoppedis dim (good) butrunningis green inlistwhile the detail view printsrunning (PID: 123, agent: foo)— the table gives no way to reach that detail (no hint to runchannel status <name>).
Expectation
- One date format from the shared time util:
Created→Jun 4(orJun 4 · 19:18);Configuredin status → same format. NotoLocaleDateString, 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 statusentries. - In
list, when a bridge is running, keep the greenrunningcell; consider a dim footer hint likeRun "ai-devkit channel status <name>" for bridge details.
Files: packages/cli/src/commands/channel.ts (list ~L201–245, status ~L390–403)