Skip to content

feat(panel): collapse/expand message bubbles in side panel#228

Merged
upsetbit merged 1 commit into
masterfrom
feat/222-message-collapse
Jun 7, 2026
Merged

feat(panel): collapse/expand message bubbles in side panel#228
upsetbit merged 1 commit into
masterfrom
feat/222-message-collapse

Conversation

@upsetbit

@upsetbit upsetbit commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds per-message collapse + a "Collapse all" / "Expand all" control in the side-panel header.

  • Each bubble-{user|assistant|tool} (the "single" group kind) gets a chevron in .bubble-meta. Clicking toggles the body locally via Alpine x-data.
  • The header button dispatches a messages-toggle-all window event; each bubble listens and updates its collapsed state.
  • Tool-call and thinking groups keep their independent state — NOT affected by either control.
  • Collapsed bubbles dim to 0.7 opacity (full on hover); meta header stays visible.

Closes #220 dependency: this lands first so #224's in-transcript search can auto-expand matched bubbles via the same collapsed flag.

Closes #222.

Test plan

  • just build && ./bin/prosa-panel with PROSA_PANEL_DEV_LOGIN=1.
  • Open any session — chevron present on each message bubble.
  • Click chevron → bubble body collapses, header stays.
  • Click "Collapse all" in side-panel header → all message bubbles collapse; button label becomes "Expand all".
  • Tool-group / thinking-group state is NOT affected by "Collapse all".
  • Toggling individual bubbles after "Collapse all" works independently.

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Adds a per-message chevron in the bubble header that toggles the bubble
body (and any user-extras) via Alpine local state. A "Collapse all" /
"Expand all" button in the side-panel header dispatches a window event
that every bubble listens for, flipping all messages in sync.

Tool-call and thinking groups keep their independent collapse state —
they are NOT affected by either control.

Collapsed bubbles dim to 0.7 opacity (full opacity on hover) so the
transcript reads as a skim-friendly outline while the meta header
(role, timestamp, chevron) stays visible.

Closes #222

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@upsetbit upsetbit merged commit 08029de into master Jun 7, 2026
5 checks passed
upsetbit added a commit that referenced this pull request Jun 7, 2026
Adds a search bar pinned above the transcript in the session side
panel. Implementation is client-side (no new RPC): all structured
turns already live in the DOM after the initial Sessions.Get, so a
simple debounced text walker over .bubble-body / .tool-entry-body /
.thinking-body produces the match set fast enough.

Search triggers expand on every collapsible group before scanning:
- bubbles listen for the existing messages-toggle-all event (PR #228)
- tool-group + thinking-group listen for a new transcript-expand-groups
  event
- native <details class="tool-entry"> are forced open via .open = true

Next / Prev cycle through matches; Enter advances, Shift+Enter goes
back, Esc clears. The active match scrolls into view and gets the
accent color; remaining matches use the warn color so the eye can
spot them.

Falls back to a "no matches" hint when the query has zero hits.

Closes #224

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@upsetbit upsetbit deleted the feat/222-message-collapse branch June 8, 2026 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant