Skip to content

Phases 4+5: Instance management UI + channel configuration#3

Open
amtocbot-droid wants to merge 1 commit intousers/krk/20260315_phase3_angularfrom
users/krk/20260315_phase4_instance_ui
Open

Phases 4+5: Instance management UI + channel configuration#3
amtocbot-droid wants to merge 1 commit intousers/krk/20260315_phase3_angularfrom
users/krk/20260315_phase4_instance_ui

Conversation

@amtocbot-droid
Copy link
Owner

Summary

  • InstanceStore: signal-based state with SignalR live CPU/mem stats, optimistic start/stop/restart/delete
  • Instance List: card grid, live metric progress bars (5s via SignalR), role-gated actions
  • Instance Detail: tabs (Config / Channels / Logs), live stats bar, computed signals from store
  • Instance Form: model selector (includes Ollama models), resource limits, one-time API token display
  • Monaco JSON5 editor: vs-dark theme, dirty state banner
  • Log viewer: 10s auto-refresh, tail selector, auto-scroll, effect() on isRunning signal
  • Channel tabs (Telegram/WhatsApp/Discord/Slack): per-channel forms with token masking, chip lists for allowlists, WhatsApp QR polling (3s, blob URL), all backed by ChannelBase directive

Test plan

  • Create instance → API token shown once
  • Start instance → container appears in docker ps, live stats appear in list
  • Stop instance → status badge updates immediately (optimistic)
  • Open instance detail → Channels tab → enter Telegram bot token → Save → container restarts
  • WhatsApp tab → Start QR → QR image appears and refreshes every 3s
  • Log viewer auto-refreshes while running, stops when instance is stopped

🤖 Generated with Claude Code

Phase 4 - Instance Management UI:
- InstanceStore: signal-based state, SignalR StatusUpdate wired to live
  CPU/mem stats, start/stop/restart/delete actions with optimistic updates
- InstanceListComponent: card grid with live metric bars (5s refresh via
  SignalR), start/stop/restart buttons, delete confirm dialog, role guards
- InstanceDetailComponent: tabs for Config/Channels/Logs, live stats bar,
  computed liveStatus/liveStats from store signal, input() id binding
- InstanceFormComponent: reactive form with model selector (loads from
  /api/models/available including Ollama), resource limits, one-time token
  display after creation
- InstanceConfigEditorComponent: Monaco editor (vs-dark, JSON5) with
  dirty-state banner, reload and save actions
- InstanceLogViewerComponent: 10s auto-refresh while running, tail selector
  (50/200/500), scroll-to-bottom, effect() on isRunning input signal

Phase 5 - Channel Configuration UI:
- ChannelBase directive: shared saveConfig(), parsedConfig(), saving signal
- ChannelConfigComponent: tab container, loads channel configs on init
- TelegramConfigComponent: bot token (masked) + allowFrom chip list
- DiscordConfigComponent: bot token, guild ID, allowed channel IDs chip list
- SlackConfigComponent: app token (xapp-) + bot token (xoxb-) + channel IDs
- WhatsappConfigComponent: QR polling loop (3s interval), blob URL display,
  allowFrom phone numbers, paired/error/idle state machine

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant