--- kind: task slug: ai-workspace-tabs title: Build the AI Chat and Agents workspace shell plan_slug: workspace-communications epic_slug: agent-participation status: in_progress priority: P1 tenant_id: global owner: unassigned cursor_todo_id: null updated_at: "2026-10-22" --- # Task summary Evolve the existing AI rail destination into a unified workspace with Chat and Agents tabs while preserving one consistent composer shell. ## Description Keep `//ai` as the canonical AI destination and the existing Sparkles rail entry. Add URL-backed `Chat` and `Agents` tabs above the primary content/composer so browser navigation and deep links preserve mode. Extract the current full-page AI composer and frame into reusable components. Chat mode retains conversational behavior; Agents mode changes the prompt, suggestions, submit contract, and result panel for agent creation without making the input visually feel like a different product. ## Subtasks - [ ] Define canonical tab URLs and redirects, such as `/ai?tab=chat` and `/ai?tab=agents`, with Chat as the backward-compatible default. - [ ] Extract a shared AI workspace frame, tab switcher, transcript/result area, and composer shell from the current AI page. - [ ] Preserve existing chat streaming behavior under the Chat tab without coupling the Agents tab to `/api/chat`. - [ ] Add Agents empty/loading/error states and placeholders for library and builder content. - [ ] Cover keyboard tab behavior, focus preservation, responsive layout, and accessible mode announcements. ## Owner or assignee `unassigned` ## Status `in_progress` — 2026-10-22: independent implementer active under the user's kickoff approval. This planning session does not own its app code or claim completion. ## Estimation `M` ## Acceptance criteria - [ ] The existing AI rail item remains the only rail entry for this feature. - [ ] Chat and Agents modes are deep-linkable and survive refresh/back/forward navigation. - [ ] Both modes use the same composer dimensions, interaction affordances, and visual system while exposing mode-specific prompts and submit behavior. - [ ] Existing AI chat remains functional and workspace-scoped. - [ ] `pnpm lint && pnpm type-check && pnpm test` pass. ## Links to related Epic / Plan - Epic: `./Epic-agent-participation.md` - Plan: `../Plan-workspace-communications.md`