docs: the review items of #859 that go on top

- 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>
This commit is contained in:
Codeman maintainer committed 2026-12-03 10:22:23 +01:00
1 parent 4be36b0404
commit c3eb9cad22
2 files changed
+11 -7

No files matched your search

+8 -5
View File
@@ -135,11 +135,14 @@ The chat view also listens for these events:
`transcript:complete` does not help here. It fires only for a `result` row, and an
interactive Claude transcript has none.
A Docker case whose hooks do reach the server gets no mid-turn updates. Its hook reports the
transcript's path inside the container, which the host cannot open. The watcher
keeps that path, so the full read starts no second one. Such a session refetches on
`session:working` and `session:idle` alone, and so updates only at the start and end
of each turn.
A Docker case reports the transcript's path inside the container
(`/home/agent/.claude/projects/...`), which does not exist on the host. The case mounts the
host's `~/.claude/projects` at that folder, so `hostTranscriptPath()`
(`claude-conversation-report.ts`) maps the reported path to the host's copy before the
watcher starts, and such a session gets the same mid-turn `transcript:update` events as a
local one. A reported path outside that folder, or one with a `..` segment, is kept as
reported. The host cannot open it, so that session refetches on `session:working` and
`session:idle` alone and updates only at the start and end of each turn.
## How the user sends a prompt
+3 -2
View File
@@ -1550,8 +1550,9 @@ export class WebServer extends EventEmitter {
/**
* Read My Mind intent capture: fold one transcript user prompt into the
* case's intent profile (docs/readmymind-plan.md). Opt-in via
* `readMyMindEnabled` (default OFF) and claude-only; the mode gate is
* belt-and-braces since only hook-fed sessions have a transcript watcher.
* `readMyMindEnabled` (default OFF) and claude-only. The mode gate is needed:
* a transcript watcher is started by hook reports, statusline reports and a
* full transcript read (the chat view), not only for hook-fed Claude sessions.
*/
private async captureIntentPrompt(sessionId: string, text: string): Promise<void> {
const session = this.sessions.get(sessionId);