web-ui: surface mid-turn agent posts in the live dock and pre-refresh timeline - #874
Open
irisfeng wants to merge 1 commit into
Open
web-ui: surface mid-turn agent posts in the live dock and pre-refresh timeline#874irisfeng wants to merge 1 commit into
irisfeng wants to merge 1 commit into
Conversation
An agent message posted mid-turn through the surface tool (a tool_call with action:"post") was invisible while its turn streamed: run activity carries no text entries, the live dock had no surface-tool summary (generic "Working"), and after the turn ended the text stayed folded under the collapsed "N tool calls" summary until the settled transcript rebuild replaced it with a content bubble. If that rebuild failed or lagged, the posted text could only be found by expanding the fold. - timeline: postSpeechText(row, allowInFlight) — a post's text is speech once its result confirms delivery; live contexts may preview in-flight text; failed or unconfirmed posts stay tool rows - chat: the live dock previews an in-flight post (message icon, "Posting message", first line of the text); once the turn ends, confirmed posts render as work-said bubbles outside the folds, so the text is visible without waiting for the transcript rebuild; the in-flight preview is gated on live work status so it never leaks into settled folds - tests: postSpeechText unit tests plus source pins on both render sites and the dock branch (web-ui suite green)
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.
Problem
When the agent posts a message to the conversation mid-turn (the surface tool's
action: "post"), that text is effectively invisible in the web UI at the moment it is sent:N tool callsfold. Only the settled transcript rebuild (which lifts posts into assistant content bubbles) makes the text visible; until that rebuild lands, the only way to read it is to expand the fold. If the rebuild request fails (it is silently swallowed), the text stays buried.This hurts most for skills/agents that ask the user a question mid-flow and end the turn waiting for the answer: the person staring at the chat sees "Working…" then a collapsed fold, and never learns they were asked anything.
Fix
Treat a surface post as conversation speech as soon as the UI can responsibly show it:
postSpeechText(row, allowInFlight)(timeline): a post's text is speech once its result confirms delivery; live contexts may preview the in-flight text; failed or unconfirmed posts stay plain tool rows (consistent with the existing contract that an interrupted post must not claim it was delivered).work-saidbubbles, so the text is visible the moment the turn ends without waiting for the transcript rebuild. The in-flight preview is gated on live work status, so an unconfirmed post never renders as speech inside a settled fold.Posts also stop inflating the "N tool calls" fold count, which now reflects only actual tool work.
Testing
postSpeechText(delivered / in-flight / failed / non-post shapes).plugins/web-uisuite: 597/597 green; tsc + oxlint clean.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.