--- 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 `