Repository navigation
a chat view shows a Claude session's conversation, rendered and live (chat view 1/5) - #859
Conversation
|
Thank you for this, @irisitymichaelgrundberg. This PR adds a read-only Chat view for local and Docker Claude sessions: the conversation renders through the Response Viewer's pipeline over the still-attached terminal, refreshes live through a new One thing needs to change before merge: 1. The live refresh re-parses the whole transcript on the server's main thread ( Smaller points, fine in the same push:
Once the re-read no longer scales with the file, this is ready to merge from my side. |
…d and live A local or Docker Claude session can show its conversation as rendered text, the way the Response Viewer draws it, in place of the terminal. The terminal stays attached and sized underneath, so switching views never resizes the pane, and the user still types in the terminal. Discussion Ark0N#858 has the background. - A Chat / Terminal switch and Alt+Shift+C change the view, and each session remembers its choice on this device until the session is gone. Two per-device settings pick the default view and hide the switch. Phones, remote and adopted sessions keep the terminal. - The server broadcasts `transcript:update`, at most one per 750 ms per session, and the view re-reads the conversation on it, so an answer fills in mid-turn. - The server keeps each transcript's parse and the byte offset it reached, so a read parses only the bytes appended since the last one, in chunks with an await between them. Overlapping reads of one file share one pass. The Response Viewer and the Discord bridge read through it too. - A full conversation read starts a transcript watcher for a session that has none, such as one picked up after a server restart. - A Docker session's hook reports the container's transcript path, and the server watches the host's copy of that file. - After `/clear`, Claude Code runs the statusline command with the new conversation's id and transcript path. The statusline exporter posts them, and the server follows the new conversation the way it follows a hook's report. - Keep-warm turns are hidden, long prompts fold, a "Working" line shows the turn's running time, and a pending dialog shows a notice that opens the terminal. The design note, docs/chat-view-plan.md, covers this and the four steps that follow it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
919ac9a to
c6fff5e
Compare
|
Thanks for the review and for measuring it. I've pushed the fix you preferred, in the same The transcript is no longer parsed whole on every read. The server keeps each transcript's
I measured it on a 48 MB transcript of my own:
The smaller points are in the same push:
I've rebased the four follow-up branches on this commit. The |
|
Thank you, @irisitymichaelgrundberg. This PR is the first slice of the chat view. Local and Docker Claude sessions get an opt-in, per-device Chat / Terminal switch, and Chat draws the conversation from the transcript through the Response Viewer's pipeline. A throttled All four points from the earlier review are fixed. I checked the reader against real transcripts on this machine. On a 219 MB transcript the first read takes 1.3 s in total, the longest event-loop stall is 11 ms, and a second read takes 0.6 ms. I appended a 61 MB transcript in random-sized pieces (cut mid-line and mid-character) and read it 64 times along the way, and every read matched a whole-file parse. The old and new parsers give identical output on 327 transcripts. The Docker path mapping, the view-choice pruning and the single Four small things remain:
None of this needs another round trip. I'll resolve the conflict and apply these on top when I merge. Thanks for splitting the work into slices and for the tests. |
- docs/chat-view-plan.md still said a Docker case with working hooks updates only at the start and end of a turn; since hostTranscriptPath() maps the container path to the host's copy, it gets mid-turn updates. - The captureIntentPrompt comment said only hook-fed sessions have a transcript watcher; statusline reports and full reads start one too. The third item (the SSE header count) needs no change on the merged tree: master already had 164 constants under a header that said 163, and with transcript:update the header's 165 is right. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- README.ja.md: the link under the Mac download badge pointed at the English anchor; it now uses the translated heading's. - Eleven bold and italic markers GitHub printed as literal characters (CommonMark: '_' inside a word never opens emphasis, and '**' between punctuation and a letter cannot open or close bold): '*' inside words, <strong> where the punctuation rule bites. - The Japanese for the rate-limit sentence the English README gained after the branch was cut (a request with no credentials is never counted). - The chat view's Alt/Option+Shift+C row (#859, this release) in the Japanese and Chinese shortcut tables. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the four PR changesets (claude-starts-under-root, installer-headless-sudo, trusted-proxy-sign-in, upload-html-documents) and names #850, #859, #860 and #866, which brought none. Patch: #854's changeset asked for minor, which is the owner's call at COM. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged, and shipped in Codeman 1.52.1, as the first part of the chat view. What went on top at merge time:
One decision changed the default: the Chat / Terminal switch is now off by default ( Thank you for splitting the feature into slices, and for the reader rework with its measurements. The next slice is welcome whenever it is ready. |
The first of five PRs for the chat view from #858. This one is read-only: the conversation shows
as rendered text, and the user still types in the terminal. The message box, the
/menu, thestatus line and the statusline follow in four more PRs, each opened once the one before it
merges.
docs/chat-view-plan.mddescribes the whole feature.What it does
Alt+Shift+Cdoes the same. Each session remembers its choice on this device."Show the Chat / Terminal switch" is on by default. Phones, remote SSH sessions and adopted
sessions keep the terminal, and so do the tile grid and the second pane of a split.
last-response?context=full, drawn by its markdown pipeline. An answer fills in while its turnis still running.
pane.
run. While Claude waits on a permission prompt or a question, a notice offers a button that
opens the terminal.
What it adds to the server
Existing callers get what they got before.
transcript:update, fires when new lines reach a session's transcript, at mostonce per 750 ms per session. The chat view re-reads the conversation on it.
picked up after a server restart.
/clear, the server follows the new conversation from thesession_idandtranscript_paththat the statusline exporter already posts. The hook route's code for thismoved into
src/web/claude-conversation-report.ts, so both reports take the same path. No hookis added.
How I tested it
npm run typecheck,lint,format:check,check:frontend-syntaxandcheck:frontend-deadpass, and so do the chat view's test files.Codex pass, and the findings that held up are fixed.
🤖 Generated with Claude Code