fix(acpmux): the queue card keeps its scroll and clicks land on cut rows

Merged
TE
16d ago
+171-49

Stacked on #22805 (queued-row actions); this diff includes its commits until it lands.

Leo, 2026-10-20: the queued-messages card "scrolls to the bottom then shoots back up", the last row is cut off, and Edit and Remove on queued items must work every time.

What was wrong

  • Scroll pulled back and cut the last row: an opened long queue snapped each row's top to the list's top (scroll-snap-type: y proximity, scroll-snap-align: start). The end of the list is not the top of any row, so a scroll to the end snapped back up and left the last row cut at the bottom edge.
  • Clicks on a cut row missed: pressing on a row the list's edge cut gave the row focus, and the list's focus handler scrolled the row into full view before the release. The click then landed on another row or on nothing.

Fix

  • Removed the row snap. A scroll stops where you leave it, including at the end.
  • A press no longer scrolls the list. A row focused from the keyboard (โ†‘/โ†“, a move, โ†‘ from the prompt) still scrolls into full view.

Tests

WebKit browser lane, webviews/test/agent-pane-queue-collapse.test.ts:

  • an opened queue scrolled to its end stays there, its last row whole
  • Remove and Edit on a row the list's edge cuts do what they say

The red commit (f422a9c) adds only the tests. Results: pending CI.

Changelog

  • Fixed: The queued-messages list stays where you scroll it, its last row shows whole, and Edit and Remove work on a row that is partly scrolled out of view.

Observed / Not run

  • Ran on cosmic-gray: vp lint --type-aware and tsc on the changed files (clean); bun test ComposerQueue.test.tsx (4 pass).
  • Not run locally: the WebKit browser tests (they start vite, which is not allowed on this machine). CI's browser lane runs them.

Agent session: cosmic-gray

๐Ÿค– Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the queued-messages card so the list keeps its scroll position, its last row shows whole, and clicks land on rows cut by the list's edge. Send now on a queued message no longer stops the running turn: it stops only the agent's active step so the steered message is read right away (or runs next for agents that can't steer), and the turn continues. Stopping the turn itself is the new interrupt queue op.

Bug Fixes

  • The row scroll-snap pulled the list back from its end and cut the last row; rows no longer snap.
  • Presses never scroll the list, even when the press ends outside the page or the window loses focus; keyboard focus still scrolls the row into view.
  • โŒ˜โ†ฉ on a row no longer sends it (held or not); Send now is a click or menu item only.

New Features

  • queue_edit send_now steers into the running turn and stops the agent's step for Claude (_acpmux/step_now), answering sent: now|steer|next; interrupt puts the prompt next and cancels the turn.
  • Every queued row shows Edit, Remove, and Send now in both hover-actions arms; previously only Send now showed on hover.