Coding pane: tool rows land above the thought that started them, and follow-the-tail snaps around streaming code blocks #375
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Seen on run 172 (Scratch, vLLM + MTP, 2026-11-04) in the coding pane while
openspec.apply[all]streamed.What happens
cd .../runs/172/work && npx vitest run packages/server ...) sits above the Thought that decides to run it and above the text "Now let's run the server test suite to see where we stand:", which announced it. The reader sees the effect before the cause.Likely causes (from reading the code, not yet confirmed)
osf_event.seq(step_transcript,routes.py~L1329). A text or reasoning part is logged twice: empty at its start and whole at its end (store.tspartEnds), and while it streams it is drawn as a live piece placed after the step's last settled line (Transcript.tsx~L240-270,lastAt). A tool part settles in one event when the call starts. So a command that starts while a thought or sentence is still streaming gets a settled row at once, the still-live text is shown below it, and when that text ends its end event carries a later seq than the command's, so it settles below the command for good. Fix candidates: give a settled text/reasoning row the seq of its start event (or the part'sordinal/message time fromv2.py), or hold a tool row behind an unsettled earlier part of the same message.scrollTop = scrollHeighta frame after the tail changes (Transcript.tsx~L300-395,tailSize); virtua measures rows by ResizeObserver after that frame. A fenced code block inside a live text part re-renders as it grows and changes height after the follow has fired (the view is left short, so new lines appear below the fold), and when the live part settles it is replaced by a shorter settled row (a collapsed Thought, or a code block with a capped height), so the bottom moves up and the view snaps. #210 described the same replace-on-settle jump for reasoning; #80 is whyscrollToIndexwas dropped.Done when
ui/e2e/follow-the-tail.spec.tsgets a case with a streaming fenced code block and a tool call that starts mid-sentence.Related: #210, #80, #94.
Shipped in PR #390, production
ddd4b6b.The cause differs from this issue: opencode 2 logs a text or reasoning part once, when it ends. That came after the tool's first event on all 484 of apply's messages that had both. The adapter now settles open words when a tool starts.
Evidence:
tests/agent/test_opencode2_recordings.py(failed first), and a new journey inui/e2e/run.spec.tsthat fails on the old build. A keptapply-singlesim, read in a real browser, shows the rows in order. A finished step has no live stream, so following a growing row rests on that journey.