Web UI: load chat transcript off-DOM with loading skeleton (Phase 2)#284
Merged
Conversation
Opening a chat session revealed an empty transcript pane and then awaited the session.transcript round-trip, so the user saw a blank void (pronounced over the tunnel) before content popped in. loadTranscript now: - shows a delayed (~150ms) shimmer skeleton during the fetch instead of a blank pane (fast local loads skip it, so no flash); - builds the whole transcript off-DOM (renderEvent into a detached element) and swaps it in already scrolled to the bottom in one synchronous step — no blank fill, no top-anchored flash that jumps; - guards against a session switch during the await so a late response can't clobber the session now being viewed. Re-selecting an already-loaded session is still instant (cached). Chat-mode only; terminal pty_replay is unchanged. Tail-windowing / lazy-load-older-on-scroll is a deliberate follow-up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Phase 2 — fixes the blank-flash / jump when opening a chat session.
Problem
loadTranscriptrevealed an empty transcript pane, thenawaited thesession.transcriptround-trip. During that wait the user saw a blank void (pronounced over the cloudflared tunnel), then content popped in.Change
renderEventretargeted at the builder viaactiveTranscriptEl), then swapped into the pane and pinned to the bottom in one synchronous step — the user only ever sees the finished transcript already at the latest message; no blank fill, no top-anchored flash that then jumps.Scope / compatibility
Chat-mode only; the terminal
pty_replaypath is unchanged. No e2e test drivesloadTranscript(transcript tests callrenderEventdirectly, which is untouched), soweb_smokeis unaffected. Tail-windowing / lazy-load-older-on-scroll is a deliberate follow-up.🤖 Generated with Claude Code