Background
Sparked by: https://x.com/steipete/status/2015246890325946647
Current State
The web UI chat interface is built with Lit Web Components (ui/src/ui/):
views/chat.ts - Main chat view (~380 lines)
chat/message-normalizer.ts - Message format normalization
chat/grouped-render.ts - Slack-style message grouping
chat/tool-cards.ts - Tool call card rendering
controllers/chat.ts - Gateway communication
Proposal
Migrate the chat interface to React + assistant-ui for:
- Better maintained component library
- Built-in streaming, markdown, code highlighting
- Composable primitives (shadcn/ui style)
- Active community and updates
Scope
- Only the chat interface - not the entire UI
- Use assistant-ui default styling
- Preserve existing features:
- Tool card sidebar (long output display)
- Message queue
- Thinking/reasoning display
- Streaming with abort
Technical Approach
- Use
ExternalStoreRuntime to integrate with existing GatewayBrowserClient
- Create message format adapter (
NormalizedMessage → assistant-ui format)
- Coexist with Lit app during migration (React mounts in chat tab only)
References
Background
Sparked by: https://x.com/steipete/status/2015246890325946647
Current State
The web UI chat interface is built with Lit Web Components (
ui/src/ui/):views/chat.ts- Main chat view (~380 lines)chat/message-normalizer.ts- Message format normalizationchat/grouped-render.ts- Slack-style message groupingchat/tool-cards.ts- Tool call card renderingcontrollers/chat.ts- Gateway communicationProposal
Migrate the chat interface to React + assistant-ui for:
Scope
Technical Approach
ExternalStoreRuntimeto integrate with existingGatewayBrowserClientNormalizedMessage→ assistant-ui format)References