Skip to content

Refactor web UI chat interface using assistant-ui #1858

@zerone0x

Description

@zerone0x

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

  1. Use ExternalStoreRuntime to integrate with existing GatewayBrowserClient
  2. Create message format adapter (NormalizedMessage → assistant-ui format)
  3. Coexist with Lit app during migration (React mounts in chat tab only)

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions