feat(webui): browser preview as top-right terminal overlay + session-scoped, ephemeral thumbnails#162
Merged
Merged
Conversation
The web client rendered the browser thumbnail in a separate strip between the terminal and the input/keyboard. Move it to a top-right overlay over the terminal screen — mirroring the desktop TUI — with a caption, a close (×) button, and autohide. - `#browserPreview` now lives inside `#terminalWrap` (position:absolute, top-right, above the scroll buttons) instead of as a flex sibling below the terminal, so the terminal reclaims that vertical space and the preview floats over it. Caption shows the page title/url. - Autohide after ~7s (matches the TUI's BROWSER_PREVIEW_TTL); hovering the overlay pins it (clears the timer); the × dismisses it and drops the stored preview. Autohide/close remove the per-session entry, so it doesn't reappear on session switch — same lifecycle as the TUI. Like the TUI, the overlay is anchored to the terminal view, so it shows in terminal mode (where browser-driving agents run). Test: web_smoke now asserts the overlay is a child of #terminalWrap, position:absolute at top:8px, has the caption + close button, and that × hides it and forgets the stored entry. Verified visually (screenshot).
edwin-zvs
force-pushed
the
webui-preview-overlay
branch
from
May 23, 2026 05:31
4d29abf to
0cbdb6b
Compare
…ion, make ephemeral - In-session thumbnail overlay (TUI + webui) stays scoped to the displayed session; switching sessions hides it. - Matrix-rain wallpaper now tracks the latest browser preview from ANY session (the rain is a fleet visualization), not just the focused one. - Browser previews are ephemeral / live-only: never reconstructed from the transcript on the TUI (hydration + reconnect replay) or the webui (renderEvent / replayTranscriptToTerm). A restart or reconnect no longer resurrects a stale thumbnail; once closed, it's gone.
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.
Make the web UI's browser thumbnail render like the desktop TUI — a top-right overlay over the terminal screen with autohide + close — and then make thumbnails behave consistently across the TUI and webui: per-session overlay, cross-session matrix-rain wallpaper, and ephemeral (live-only) lifecycle.
Overlay (TUI parity)
#browserPreviewmoves inside#terminalWrapas aposition:absoluteoverlay anchored top-right (z-index above the scroll buttons), instead of a flex sibling below the terminal. The terminal reclaims that vertical space and the preview floats over it.BROWSER_PREVIEW_TTL); hovering pins it (clears the timer); × dismisses it.Scoping + lifecycle
selected_id; webui readscurrentId) — switching sessions hides it.browser_previewfrom hydration + reconnect replay (apply_transcript_to_local_stateno longer takes/returns it).renderEventandreplayTranscriptToTermno longer callsetBrowserPreviewduring transcript replay; the live WS path (handleNotification) is the sole setter.Verification
web_smoke(real headless Chrome): overlay is a child of#terminalWrap,position:absoluteattop:8px, renders the base64 image + caption, has a close button; × hides and forgets the stored entry; and replaying the event through the transcript path does NOT resurrect the thumbnail.matrix_rain_paints_browser_preview_wallpaperextended to assert a non-selected session's preview still paints the rain wallpaper (cross-session).cargo build --workspace --all-targets --locked+cargo test(cli + e2e) green locally.🤖 Generated with Claude Code