feat(ui): chat-bubble conversation view for session page#398
Merged
Conversation
3b1c4f7 to
29dcefa
Compare
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
29dcefa to
4eb655c
Compare
This was referenced May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 messagesparseMessageChunks()— 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 metadataChat bubble layout
<details>blocks with tool name badges inside assistant bubbles (scrollable output, max-height 300px)Search/filter
N/total messagesDark mode
Verification
bun run typecheck— passes all 4 packagesbun test— all 1647 tests pass/ui/sessions/<projectId>/<sessionId>to see the new view