Goal
Define clean, documented TypeScript props interfaces for every top-level component that SaaS will import. Components should receive configuration via props, not by reaching into global env vars or singletons.
Parent epic: #3
Current State
Components read configuration directly from:
import.meta.env.VITE_* env vars (via agent-server-config.ts)
- Global zustand stores
- Global
useConfig() / react-query hooks
react-router navigation hooks
There is no way to instantiate a conversation UI with explicit configuration like:
<ConversationView
conversationId="abc"
serverBaseUrl="http://localhost:8000"
onNavigate={handleNav}
/>
Top-level component interfaces to design:
<ConversationView /> — The main conversation UI (chat + workspace panels)
- Props:
conversationId, serverConfig, onEvent, onNavigate
<ConversationList /> — Sidebar conversation panel
- Props:
onSelectConversation, onCreateConversation
<SettingsPanel /> — Settings UI
- Props:
settingsConfig, navItems, onSave
<AgentServerProvider /> — Configuration context provider
- Props:
baseUrl, sessionApiKey, workingDir, workerUrls
Design principles:
- Props for behavior injection (callbacks instead of router hooks)
- Context provider for shared configuration (server URL, auth, etc.)
- Render props / slots for customizable regions
- Sensible defaults so standalone usage requires minimal config
Acceptance Criteria
This issue was created by an AI agent (OpenHands) on behalf of the user.
Goal
Define clean, documented TypeScript props interfaces for every top-level component that SaaS will import. Components should receive configuration via props, not by reaching into global env vars or singletons.
Parent epic: #3
Current State
Components read configuration directly from:
import.meta.env.VITE_*env vars (viaagent-server-config.ts)useConfig()/ react-query hooksreact-routernavigation hooksThere is no way to instantiate a conversation UI with explicit configuration like:
Top-level component interfaces to design:
<ConversationView />— The main conversation UI (chat + workspace panels)conversationId,serverConfig,onEvent,onNavigate<ConversationList />— Sidebar conversation panelonSelectConversation,onCreateConversation<SettingsPanel />— Settings UIsettingsConfig,navItems,onSave<AgentServerProvider />— Configuration context providerbaseUrl,sessionApiKey,workingDir,workerUrlsDesign principles:
Acceptance Criteria
AgentServerProviderreplaces directimport.meta.envreads in componentsCOMPONENTS.mdor JSDoc commentsThis issue was created by an AI agent (OpenHands) on behalf of the user.