From f7e4ed9d7b3a189dd1bb433f0ce01ad326e88619 Mon Sep 17 00:00:00 2001 From: Nexus Dev Date: Wed, 1 Apr 2026 17:25:42 +0000 Subject: [PATCH] docs(22): UI design contract for agent-streaming phase Co-Authored-By: Claude Sonnet 4.6 --- .../phases/22-agent-streaming/22-UI-SPEC.md | 507 ++++++++++++++++++ 1 file changed, 507 insertions(+) create mode 100644 .planning/phases/22-agent-streaming/22-UI-SPEC.md diff --git a/.planning/phases/22-agent-streaming/22-UI-SPEC.md b/.planning/phases/22-agent-streaming/22-UI-SPEC.md new file mode 100644 index 00000000..061c8584 --- /dev/null +++ b/.planning/phases/22-agent-streaming/22-UI-SPEC.md @@ -0,0 +1,507 @@ +--- +phase: 22 +slug: agent-streaming +status: draft +shadcn_initialized: true +preset: new-york / neutral / css-variables +created: 2026-04-01 +--- + +# Phase 22 — UI Design Contract + +> Visual and interaction contract for Phase 22: Agent Streaming. +> Generated by gsd-ui-researcher. Verified by gsd-ui-checker. + +--- + +## Design System + +| Property | Value | Source | +|----------|-------|--------| +| Tool | shadcn/ui | `ui/components.json` — unchanged from Phase 21 | +| Style | new-york | `ui/components.json` | +| Base color | neutral | `ui/components.json` | +| CSS variables | true | `ui/components.json` | +| Component library | Radix UI (via shadcn new-york) | `ui/components.json` | +| Icon library | lucide-react ^0.574.0 | `ui/components.json` | +| Font | System UI (`font-sans`, inherited) | `ui/src/index.css` | + +**Existing shadcn components available (no install needed):** +`avatar`, `badge`, `button`, `card`, `checkbox`, `collapsible`, `command`, `dialog`, `dropdown-menu`, `input`, `label`, `popover`, `scroll-area`, `select`, `separator`, `sheet`, `skeleton`, `tabs`, `textarea`, `tooltip` + +**Existing custom components to reuse/extend:** +- `ChatPanel.tsx` — extend with agent selector header area and streaming state; do not restructure the two-column layout +- `ChatMessage.tsx` — extend props to accept `agentId`, `agentName`, `agentIcon` for identity rendering +- `ChatMessageList.tsx` — replace with virtualized list (`@tanstack/react-virtual`) for PERF-03 +- `ChatInput.tsx` — extend with slash command popover and @mention popover (reuse `MentionOption` pattern from `MarkdownEditor.tsx`) +- `AgentIcon` (from `AgentIconPicker.tsx`) — reuse directly for agent avatar rendering in messages +- `agentStatusDot` (from `status-colors.ts`) — reuse `running: "bg-cyan-400 animate-pulse"` for streaming indicator + +**New package required:** +- `@tanstack/react-virtual` — not currently installed; add to `ui/package.json` for PERF-03 (1,000+ message virtualization) + +--- + +## Layout Contract + +### Layout Unchanged + +The overall layout established in Phase 21 is unchanged: + +``` +[ CompanyRail ] [ Sidebar ] [
] [ ChatPanel ] [ PropertiesPanel ] +``` + +Phase 22 adds new UI surfaces **inside** `ChatPanel` only. No layout-level changes. + +### ChatPanel Header — Agent Selector + +The `ChatPanel` header row gains an agent selector to the left of the close button: + +``` +[ "Chat" label ] [ AgentSelector dropdown ] [ ─── spacer ─── ] [ X close ] +``` + +- The `AgentSelector` is a `