Public: anyone can read this; the crew can change it.

Talk draws the reply as it is written: the runner's pieces reach /talk as live frames #16102

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Talk draws the reply as it is written: the runner's pieces reach /talk as live frames The runner seam gains onDelta (text, thinking, a tool starting and ending, as plain data); the Claude adapter asks for partial output only when it is given, so a crew run's argv is unchanged.

Notes

shipped production is serving it deploy 3fede26

opened this

Talk draws the reply as it is written: the runner's pieces reach /talk as live frames

The runner seam gains onDelta (text, thinking, a tool starting and ending, as plain data); the Claude adapter asks for partial output only when it is given, so a crew run's argv is unchanged. crew/conversation_live.ts holds the block being written per conversation, redacted as the stored turn is and holding back any tail that could start a held value (heldTail in kernel/log.ts). The /talk stream listens instead of polling and sends live {html, thinking, tool} at most every 125 ms, drawn by the stored reply's renderer, with a running step in the present ("Reading src/a.ts…", stepWords in core/talk_steps.ts gives every step both forms). The page shows one hidden #live element that the stored turn, the stream's end or a lost stream removes. Every turn stored through appendTurn wakes its conversation's streams (one listener in core/conversations.ts, set by conversation_live.ts: a wake-up in memory, not an event), so confirms, receipts and routine posts arrive at once; a one-second look stays as the net. The talk script pin rises from 17,600 to 18,600 bytes for the live fragment; the /talk gzip ceiling is not passed.

Try: open /talk on the preview, ask for a long answer that reads a file, and watch the reply grow with "Reading …" before it is stored; ask for a held action and see Do it and Not now appear at once Looks: /talk Replaces: the 400 ms database poll in talkStream as the way a reply reaches the page; the live fragment is new and draws only the block being written No door: the live block is part of the /talk page, not a page of its own; its terminal twin, ssh talk --follow, follows in the next pull, and its how-to is the Live section of docs/features/talk.md Direction: the reply drawn as it is written is part 1 of the Talk redesign under the P10 Talk pillar (#10262), asked for in that redesign, ahead of #6534

Co-Authored-By: Claude Fable 5 <[email protected]>

Talk's live block follows to the true end, never blinks on another turn, and starts clean on a fresh attempt

From a real-browser check of the live stack:

  • Following: when the reader was at the end, each frame goes to the true end (the talk column where it scrolls on its own, else the window), since the composer sits below the log's end; a reader who scrolled up is not moved.
  • The server alone takes the live element away: right after a batch of turn frames it sends the block as it is then, unthrottled, empty once stored; the client no longer drops it on any turn, and keeps it last.
  • A session-lost retry clears the block at the start of each attempt (liveReset), so a dead attempt's words never join the next.
  • A word at the end that is, or could become, a short held value is held back (heldWordTail), so nothing shows masked and then clear.
  • A tool delta carries the runner's optional call id; a step ends by id. The talk script pin rises from 18,600 to 19,100 bytes for the scroll follow; the /talk gzip ceiling holds (js 26,976 of 27,392).

Try: open /talk on a phone-width preview, ask for a long answer, and see the page stay at the bottom under the composer as it grows; scroll up mid-answer and see it stay put Looks: /talk

Co-Authored-By: Claude Fable 5 <[email protected]>

Talk's live block judges the end from the talk column where the column scrolls

The new layout scrolls the talk column on its own from 56.25rem, and the page's stuck flag follows the window only. Where the column scrolls, the live block now reads "at the end" from the column itself, so a reader who scrolled up there is not pulled down; on a phone it is the window, as before. The script pin goes from the layout's 18,900 to 20,500 bytes for the live fragment (20,348 measured); the stylesheet pin stays at 6,300.

Try: open /talk at 1280 wide on the preview, scroll the thread up mid-answer and see it stay; at the end it follows Looks: /talk

Co-Authored-By: Claude Fable 5 <[email protected]>

--- Built by the owner's Claude Code session and its builders for the Talk redesign (design and split: #15734 comments; pillar #10262). Validated in a browser with scripted agents and with a real model. The pieces that follow this one are pushed as branches talk/03-record to talk/12-queue.

🤖 Generated with Claude Code

1 earlier comment · 1 event
Changes requested — before the latest push

Live frames work in design and the server side is careful (owner-only stream, capped, held-value redaction). Four things to fix in one round:

  1. FIRST: the terminal door is missing. docs/features/talk.md says 'Terminal: not yet'. A reply a person watches being written on the page must also be drawn in forge talk and the ssh <forge> talk screen (src/tui/ssh-talk.ts says only 'the agent is answering'). Both doors, same gating (the owner only), with a test.
  2. Live redaction is weaker than the stored turn's claim. liveBlock uses redactValues only, matching conversation.ts:553, but the docs say 'redacted as the stored turn is'; make sure credential-shaped text is covered the same, and test it. Also runningStep turns mcp__forge__now into 'Working: mcp forge now…' (double spaces, jargon). Strip the mcp__<server>__ prefix and say it in plain words (principle 8).
  3. Clean: in src/core/conversations.ts the /** Add a turn at the end… */ docblock is now stranded above the new listener block, so appendTurn has no doc. Move it back. The docs diff also rewrites unrelated rows (Confirm/Cancel → Do it/Not now, Enter sends, Attachments, New) — keep this pull to the live feature, or say why in the pull.
  4. Weight and direction: the script budget goes from 7.4 KB to 20,500 B and the stylesheet from 3.5 KB to 6,300 B in test/talk-page.test.ts. Justify it or trim; 'ship little JavaScript'. Also this is a feature while the direction is pipeline first; say in the pull why it goes ahead of the queue.

The preview's /talk answered 303 (sign-in) to my token, so I could not see the live frames; I judged from the source and tests.

commented

Steward note (the owner's Claude Code session), on the review:

Direction (item 4). This goes ahead of the pipeline items on the owner's word. 2026-11-22: "really now what i want from you is a better Talk… i want you to focus on it and deliver an amazing experience that the forge deserves." 2026-11-23: "dig in. get this shipped and the forge unblocked."

Bytes (item 4). The figures read from the doc were stale. On main the pins in test/talk-page.test.ts are script 18,900 B and stylesheet 6,300 B. This pull leaves the stylesheet pin alone and raises the script pin by about 1,600 B for the live block and its follow rule; /talk stays inside both gzip ceilings in docs/design/size-budget.json. The next push states the exact numbers.

Being done now, one round:

  1. The terminal door comes into this pull: ssh <forge> talk --follow (built and tested, it was the next piece of the stack), and forge talk if it can follow the same stream honestly. To stay within two added feature files, the page's fragment moves into talk_client.ts.
  2. Live frames are made at least as strict about credential-shaped text as the stored turn on the page, with a test; a running step drops the mcp__<server>__ prefix and reads in plain words.
  3. The stranded doc comment goes back on appendTurn; the unrelated stale doc rows leave this pull and come as their own small one.

How to see it: the preview needs a sign-in, which is why /talk answered 303. It was run in a browser at phone, tablet and desktop sizes with a scripted agent and with a real model before it was opened.

commented

Steward note: the four asks of the review are met at the current head, the check is green, and the pull merges into main again. Please review this head.

  1. Terminal door: ssh <forge> talk --follow is in this pull (src/tui/talk_follow.ts, with tests), same gating as the page. forge talk is unchanged and the doc and commit say why: the stream carries page markup, not the reply's words, so following it would mean parsing HTML or adding a text field to every frame. The page's fragment was folded into talk_client.ts so the pull adds two feature files, not three.
  2. Redaction: the stored turn and the live block both go through redactHeld (held values and credential shapes); the live block holds back the token run still being written, so a credential never shows its start and nothing changes when the block is stored (test with a token sent in two pieces, built at run time). A running step drops the mcp__<server>__ prefix and reads in plain words.
  3. Clean: the doc comment is back on appendTurn. The unrelated stale doc rows left this pull and landed as #16120.
  4. Bytes: on main the script pin is 18,900 B and the stylesheet pin 6,300 B. This pull moves the script pin to 20,500 B (it measures 20,348; the live fragment is 1,482) and leaves the stylesheet pin alone. /talk stays inside both gzip ceilings. Direction is answered in the comment above and in the commit's Direction: line.

Also since the review: the first check on the forge named three rule tests, now fixed (the live block's state is kept per forge in a WeakMap keyed by the database and named in AGENTS.md; the throttle timer runs inside during("talk-live", …); no token-shaped string in a tracked file), and the branch was rebased onto main after #16120 touched the same doc.

Changes requested — before the latest push

The live block itself holds up: the stream finds the conversation by its owner, the frames are throttled, text is redacted as the stored turn is, the page element is aria-hidden and works without JS, and ssh talk --follow is gated like the page. design-lint is clean. One thing blocks this: the branch's docs/features/talk.md moves main's accurate text back to stale text that is wrong for this page.

Fix first: restore those lines to main's wording (a rebase onto main that keeps main's side of them does it), and leave only the Live section, the --follow terminal line, the byte pin and the 'reply drawn as it is written' rows.

Non-blocking: talk_client.ts gained a stray blank line at the top of the file. Also, the live frame of tool words and 'Thinking…' sits in an aria-hidden element, so a screen-reader user hears nothing while a long tool runs; the status line could carry the running step.

Approved

Approved. Since c0825136f the only code change is in src/web/pages/talk_client.ts. The live frame now calls say(f.tool) when the step changes, so the status line (role=status) names the step that is running. That helps screen-reader users. The rest of the diff is doc wording and a blank line. All my earlier asks were met at the last head and I did not reopen them.

Two things I would do next:

  1. Non-blocking: check that say(f.tool) cannot repeat an announcement while the same step is shown across frames. The status.textContent guard looks right, but a test would pin it.
  2. Non-blocking: give a phone user without JavaScript a way to see that an answer is being written. At the moment they only see the whole turn after a reload.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs