Skip to content

feat(ui): chat-bubble conversation view for session page#398

Merged
BYK merged 1 commit into
mainfrom
feat/chat-bubble-session-view
May 19, 2026
Merged

feat(ui): chat-bubble conversation view for session page#398
BYK merged 1 commit into
mainfrom
feat/chat-bubble-session-view

Conversation

@BYK
Copy link
Copy Markdown
Owner

@BYK BYK commented May 19, 2026

Summary

Replace the flat message list on the session detail page (/ui/sessions/:pid/:sid) with a chat-bubble conversation view, inspired by Spotlight's AI Transcription view.

Changes

All changes in packages/gateway/src/ui.ts:

New helper functions

  • safeParseJSON() — safe metadata parsing from temporal messages
  • parseMessageChunks() — splits message content on \n\x1f (CHUNK_TERMINATOR) into typed chunks: text, tool ([tool:name] output), reasoning ([reasoning] text)
  • renderChatBubble() — renders a single message as a chat bubble with parsed chunks and metadata

Chat bubble layout

  • User messages: right-aligned, blue background, white text
  • Assistant messages: left-aligned, subtle border, default text color
  • Tool calls: collapsible <details> blocks with tool name badges inside assistant bubbles (scrollable output, max-height 300px)
  • Reasoning blocks: collapsed by default with purple badges
  • Metadata line: agent name (user) / model ID + token estimate (assistant), timestamp

Search/filter

  • Client-side text filter with 150ms debounce
  • Non-matching messages hidden, matching messages highlighted with accent ring
  • Hit counter shows N/total messages

Dark mode

  • Full dark mode support with readable contrast overrides for user bubbles (code, links, blockquotes)

Verification

  • bun run typecheck — passes all 4 packages
  • bun test — all 1647 tests pass
  • Manual: navigate to /ui/sessions/<projectId>/<sessionId> to see the new view

@BYK BYK force-pushed the feat/chat-bubble-session-view branch from 3b1c4f7 to 29dcefa Compare May 19, 2026 21:17
Replace the flat message list on the session detail page with a
chat-bubble conversation view inspired by Spotlight's AI Transcription.

- User messages right-aligned in blue bubbles, assistant messages
  left-aligned with border
- Tool calls rendered as collapsible <details> blocks with tool name
  badges inside assistant bubbles
- Reasoning blocks collapsed by default with purple badges
- Metadata below each bubble: agent/model ID, timestamp, token estimate
- Client-side search/filter with debounced text matching, hit counter,
  and accent highlight ring on matches
- Dark mode support with readable contrast overrides for user bubbles
- Content truncation: 2000 chars for text, 1000 for tool/reasoning
  (collapsed), tool output scrollable at 300px max-height
@BYK BYK force-pushed the feat/chat-bubble-session-view branch from 29dcefa to 4eb655c Compare May 19, 2026 21:18
@BYK BYK merged commit 8f5d7e9 into main May 19, 2026
@BYK BYK deleted the feat/chat-bubble-session-view branch May 19, 2026 21:18
This was referenced May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant