Repository navigation
Agent chat: closing the queue at the latest row keeps the last row on the composer - #24182
Conversation
… glides away A browser test of the transcript end under the queue and the composer (Leo 2026-10-21: "It doesn't scroll to the very bottom ... it cuts off at the bottom"): the queue opened and scrolled to its end, the queue closed at the latest row, a new line in the composer, and the wheel beside the composer. Red on base: closing the fold holds the last row a fold row above the stack for a second, then drops it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16027-99fc-73f0-9482-5a4babfe1b0a&host=cosmic-gray
… the composer Closing "Show less" on a long queue hides its rows past the fold, and the transcript took each hidden row for a queued card that left the stack (a prompt on its way to the transcript). It kept the room for it under the last row (VirtualTranscript floor) for FLOOR_HOLD_MS: the last row hung a fold row above the stack for a second, then the rows dropped to the composer (Leo 2026-10-21: "it's almost like it's allowed to, but then it just shoots back up ... it cuts off at the bottom"). The queue names the prompts its fold hides (data-folded-ids) and noteQueue counts them as still queued, so closing the fold shrinks the room in the same frame, as opening grows it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16027-99fc-73f0-9482-5a4babfe1b0a&host=cosmic-gray
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Gallery before/after for
States
Pick other states with a Passes: CI passes on CI passes on Written by red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: Tour of |
|
Owned by cx3-s5-adopt on air-blue |
|
Found 13 test failures on Blacksmith runners: Failures
...and 3 more test failures. View all on Blacksmith: run 40033928036, run 40033928201
|
|
Bead |
|
Review (codex gpt-6.1-sol): BLOCK at b6af5cf Blocking finding: Non-blocking findings: none. Checked the exact two-commit diff against merge-base |
1 similar comment
|
Review (codex gpt-6.1-sol): BLOCK at b6af5cf Blocking finding: Non-blocking findings: none. Checked the exact two-commit diff against merge-base |
…s no room above the stack Codex review of #24182: a prompt the fold hides (or past an opened list's cap), run by another client, changes no size, so neither size observer noted it. The next resize that shrank the stack took it for a card that left and kept FLOOR_HOLD_MS of room above the stack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16027-99fc-73f0-9482-5a4babfe1b0a&host=cosmic-gray
…n a resize VirtualTranscript noted the queued prompts only from its two ResizeObservers. A queued prompt run by another client while its card is out of sight (folded, or past the opened list's cap) changes no size, so its id stayed in queuedIds; the next Show more/Show less or composer resize counted it as a card that left and held a phantom gap above the composer for FLOOR_HOLD_MS. The snapshot's queue now reaches VirtualTranscript, and a layout effect keyed on it calls noteQueue in the commit that draws the change. No new observer or timer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16027-99fc-73f0-9482-5a4babfe1b0a&host=cosmic-gray
|
Review (codex gpt-6.1-sol): BLOCK at 71d0781 Blocking finding — Non-blocking findings: none. Checked the merge-base diff, full changed files, queue fold and queue-change paths, prompt withdrawal/send handling, call sites, and the exact head; the prior folded-prompt gap is covered by |
…m for the last chat's queue Codex review of #24182 at 71d0781: switched to a chat with its own queue, the last chat's queued prompts read as cards that left and stayed in heldFor, so a prompt withdrawn later held room above the stack for FLOOR_HOLD_MS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16027-99fc-73f0-9482-5a4babfe1b0a&host=cosmic-gray
noteQueue keeps the chat and the stack it noted queuedIds in. In another chat or stack it starts over: queuedIds from what is drawn, heldFor cleared, queueLeft false, and no prompt counts as having left. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16027-99fc-73f0-9482-5a4babfe1b0a&host=cosmic-gray
|
|
|
Review (codex gpt-6.1-sol): SHIP at c8d5ea5 No blocking findings. |
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Orphaned: no activity for 14 h, and no lane holds a lease on it. Adopted by the orphan sweep: merged |
|
|
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo, 2026-10-21: "there's something just a bit awkward about the UI of this queuing and steering and expanding and, like, scrolling. It doesn't scroll to the very bottom. I mean, it's almost like it's allowed to, but then it just shoots back up ... it cuts off at the bottom."
Leo-ask: ask-a3f974b779
Leo-ask: ask-5ea5632ee9 (the new lines in the composer make the scrollbar jump)
Leo-ask: ask-a532e95ee7 (the wheel beside the composer should just scroll)
What was wrong
When you clicked Show less on a long queue at the latest message, the last row stayed a fold row (about 22 px) above the composer for a second. Then the rows dropped down onto it. Scrolling down in that second did nothing, because the view was already at its end.
Root cause:
VirtualTranscript.noteQueue(webviews/src/agent-session/acpmux/App.tsx:1824on feat-cmux-next 1f4437e) collects the prompt ids of the.acpmux-queuedcards in the bottom stack. Any id that disappears is treated as a sent prompt on its way into the transcript (heldFor/queueLeft), and the room under the last row is kept for it (floor,FLOOR_HOLD_MS= 1 s). Closing the fold unmounts rows 3 to N (ComposerQueue.tsx,visible = shown.slice(0, steering + FOLD_SHOWS)), so every hidden row looked like a card that had left. The view held a stack's worth of room that no prompt would ever fill, then glided down when the hold ran out.Fix
ComposerQueueputs the ids its fold hides on the list asdata-folded-ids.noteQueuecounts those prompts as still queued.Closing the fold now shrinks the room in the same frame, just as opening it grows the room. A card that really leaves (Steer, a sent prompt) still keeps its room as before.
What I checked and left alone
scrollTopand the distance from the end unchanged in every painted frame. The new test pins this in place.pointer-events: noneon the floating stack, andwheelPassThrough.ts). The wheel left and right of the queue, its fold bar and the card scrolls the transcript. The new test pins this for all three bands.VirtualTranscript, but notnoteQueueor the queue. The two changes don't overlap.Changelog
Test
New
webviews/test/agent-pane-queue-scroll-bottom.test.ts, run in Chromium and WebKit. It has its own stand-in acpmux, one chat of 40 turns plus a running one, and six queued prompts. Every read is of a painted frame (support/paintedFrames.ts).gap46.25 px against its rest of 24.25 px (45.25 against 23.25 in WebKit).The four cases:
fromEndandscrollTopstay the same, both at the latest row and scrolled up.Observed / Not run
Observed on huge-blue, with the head over feat-cmux-next 87bf8e9:
bun run checkpasses. One base file,test/subagent-stopped-after-cancel.test.ts, has a formatting issue on base, and I masked it for the run.CMUX_BROWSER_TESTS=1, these pass on the head:agent-pane-queue-collapse13/13,agent-pane-queue-steer7/7,agent-pane-queue6/6,agent-pane-bottom-stack2/2,agent-pane-scrollbar-full-height10/10,agent-pane-permission-queue2/2 and the new file 8/8.agent-pane-dock-guttersandagent-pane-wheel-pass-throughtime out inbeforeAllon huge-blue. Their sharedpapercutPanewaits for every finite animation to end, and the running turn's line never settles there. This happens on base too, before any change. The new test gets its gutter coverage through its own fixture.Not run: the app itself (no tagged build) and an independent review.
No capture: webview-only change. The before and after frames (300 ms after Show less) are kept privately by the lane.
Agent session: cosmic-gray
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes the agent chat transcript holding phantom gaps after closing "Show less" on a long queue, and when a queued prompt runs on another client while its card is out of sight.
ComposerQueuereports the prompts its fold hides as still queued (data-folded-ids), so closing the fold shrinks the room under the last row in the same frame instead of holding it for about a second.VirtualTranscriptre-notes the queued prompts on each queue change, not only on resize, so a prompt run elsewhere while folded or past the list's cap leaves no phantom room when the stack shrinks later.noteQueuenow tracks the chat and stack it noted, so switching to a chat with its own queue no longer holds room for the previous chat's prompts.VirtualTranscriptthrough a memoized snapshot (queueIds), so the notes re-run only when the queue changes.Tests
New browser test covers closing the queue at the latest row, opening and scrolling, prompts run elsewhere, switching chats, newlines in the composer, and the wheel beside the composer; it passes in Chromium and WebKit, with the queue-close case failing on base.
Written for commit a8ade6a. Summary will update on new commits.