Skip to content

[Gastown] Dashboard UI Overhaul — Town Home, Mayor Chat, Rig Workbench #346

@jrf0110

Description

@jrf0110

Parent: #204 | Priority: P1 — The product IS the UI

Context

The basic dashboard (#213, closed) established the page structure and component skeleton. This issue upgrades it to the full product vision: a split-pane town home with Mayor chat + live dashboard, a rig workbench with bead board and agent observation, and clickable detail panels for every object.

See the "Product Vision: The Browser-Based Gastown Experience" section in plans/gastown-cloud-proposal-d.md for the full design rationale.

Town Home (/gastown/[townId]) — Split-Pane Layout

Left Pane: Mayor Chat

  • Full conversational chat interface (reuse Cloud Agent chat architecture)
  • Jotai atom store for message state (CloudAgentProvider pattern)
  • WebSocket streaming via createWebSocketManager with ticket-based auth
  • MessageBubble components with markdown rendering
  • ToolExecutionCard for mayor tool calls (gt_sling, gt_list_rigs) — show what was delegated
  • Status indicator (idle/active/starting)

Right Pane: Town Dashboard

  • Rig cards: name, repo link, agent count, active bead count, refinery queue depth. Click → rig detail.
  • Active convoys: progress bars with closed/total counts. Click → convoy detail panel.
  • Activity feed: live event timeline (polling GET /api/towns/:townId/events). Each event clickable.
  • Escalation banner: unacknowledged escalations with severity badges.

Rig Detail (/gastown/[townId]/rigs/[rigId]) — Workbench

  • Bead board: Kanban columns (Open → In Progress → In Review → Closed). Cards show title, assignee, priority, time-in-status. Click → bead detail.
  • Agent roster: Horizontal cards. Name, role badge, status indicator (animated), current hook, "Watch" button.
  • Merge queue: Compact list of pending reviews.
  • Agent stream panel: Opens on "Watch" click. Read-only real-time conversation stream via SSE (depends on agent streaming endpoint issue).

Slide-Over Detail Panels

Click any object → sheet slides in:

  • Bead detail: badges, body (markdown), connections (agent, convoy, molecule), event timeline, raw JSON toggle
  • Agent detail: identity, state, conversation stream, work history (CV), mail, performance
  • Convoy detail: progress bar, tracked beads grouped by rig, timeline

Rig Creation via Integrations

  • "Create Rig" dialog shows searchable repo list from connected GitHub/GitLab integrations
  • Falls back to manual git URL if no integration connected
  • Auto-fills gitUrl and defaultBranch from selected repo

New tRPC Procedures

Procedure Type Purpose
getConvoys query List convoys for a town
getConvoy query Single convoy with tracked beads
getBeadEvents query Event timeline for a bead
getAgentHistory query Completed beads for an agent (CV)
getAgentMail query Recent mail for an agent
getTownEvents query (polling) Recent events across all rigs
acknowledgeEscalation mutation Mark escalation acknowledged

Dependencies

Acceptance Criteria

  • Split-pane town home with Mayor chat (left) and dashboard (right)
  • Mayor chat uses Cloud Agent chat architecture (Jotai, WebSocket, MessageBubble)
  • Rig cards, convoy progress, activity feed on town dashboard
  • Rig detail with bead board (kanban), agent roster, merge queue
  • Agent stream panel with live SSE when "Watch" is clicked
  • Slide-over detail panels for beads, agents, convoys
  • Rig creation via integrations repo picker
  • All new tRPC procedures implemented
  • Responsive layout

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions