Agent pane: waiting messages and inbox notices are one flat run of sender lines
Leo, on a screenshot of the agent pane's waiting messages: "WTF IS THIS FUCKING RENDERING".
What was wrong
- The waiting group (
PendingMessagesCard, "7 messages from 2 sessions") held a second fold, "13 inbox threads" (LaneNoticeBatchfrombatchLaneNotices), which held oneinbox <names>row per delivery. - A queued inbox notice reached the pane as a plain message from sender
inbox(queuedMessagethrew away the parsedinbox_notice), so opening a row showed acpmux's text for the agent ("New messages from other agents in 1 thread. They need no turn of your own: read … inbox_read tool …"). - The group drew its rows under per-sender heads, so
origin-assistandinboxsections showed up again below the inner fold, outside it. The CSS also hid each line's own sender name under those heads.
What changed
-
queuedMessage(direct.ts) keeps a queued notice as an inbox notice. Its threads come from the provenance, or from the text for a listed entry (inboxNoticeFromText).queuedMessageRowsturns it into anincoming: { kind: "inbox" }row. A notice whose threads can't be read draws nothing, never its text. -
A waiting steer that is an inbox notice now joins the waiting group too (
isWaitingMessage). -
pendingDisplayRows(pendingMessages.ts) gives the group one flat run. Each message keeps its own line. All the waiting notices' threads join into one notice where the first notice was: a thread shows once, and a thread whose messages already wait as their own lines is not drawn again. The group's line counts what it draws (pendingCounts). -
PendingMessagesCardhas no sender heads, and the CSS that hid each line's sender is gone.LaneNoticeBatchno longer folds inbox notices, in the group or in a turn; lane reports still fold in a turn. -
An inbox notice of several threads now draws as flat lines by default (
inboxNoticeLooklines), not under a "N messages from M sessions" head. The head look stays as a gallery version (look-group-*). -
Review follow-ups, fixed here:
- acpmux lists its own notice with
fromAgent: null;mergeQueuekeeps it as the notice after a list refresh instead of handing it to the composer queue as the person's prompt. - The merged notice keeps the first notice's id, so Find's highlight lands on it, and gets a new version per build.
- A thread whose messages partly wait as their own lines keeps only the rest, so nothing is counted twice.
- A notice never takes the Stop-hold lead.
- The text parser handles paragraphs, spaced keys and quoted topic labels.
- acpmux lists its own notice with
-
The
agent-pane.lane-noticesgallery entry drops its inbox variants, which waited for the removed fold. Inbox notices have their own entry,agent-pane.inbox-notice.
Result: one waiting group, inside it one flat run of received lines, each showing the sender lane and that message's own first line. No wrapper text, no group inside a group, no repeats.
Builds on #28749 (lane report / inbox batches) and #28751 (inbox notice received lines). Design spec: none exists for the agent-pane transcript yet.
Test
webviews/test/inbox-flat-rows.test.tsx builds queued records the way acpmux sends them: origin-assist messages, notices with provenance, notices listed as text only, a thread's next message in a later notice, and a notice for a message that already waits as its own line. It opens the group and checks:
- exactly one
.cv-pending, with no.cv-lane-batchor sender head inside; - none of the harness text;
- the exact
[sender, first line]list; - the count line.
Red on the test commit, green on the fix (see below). Three more tests cover the follow-ups: 3 fail before those fixes, 5 of 5 pass after. The existing tests that encoded the fold (lane-notice-card, pendingMessages) are updated.
Observed / Not run
Observed (local bun 1.4.4 in the worktree):
bun test test/inbox-flat-rows.test.tsxat 8097d466f42 (test only): 2 fail (alaneNoticeBatchfold in the group; the unreadable notice draws 4 lines of harness text). At the head: 2 pass.- The related suites pass at the head:
inbox-flat-rows,lane-notice-card,lane-notice-batches,lane-report,pendingMessages,queuedMessages,inboxNotice,InboxNoticeCard,incomingMessage,agent-pane-pending-steer,agent-pane-queued-images,pending-speed(87 pass, 0 fail; 85 pass on base before the new tests). vp fmtandvp lint(type-aware) are clean on the changed files;prepush-gate.py: no new violations.
Not run: the full webview suite and browser lanes (CI runs them); no Mac capture (webview-only change; the gallery's agent-pane.inbox-notice entry shows the flat lines).
Changelog
- Fixed: Messages from other agents that wait for the agent show as one flat list of sender lines, without acpmux's notice text or nested groups.
Agent session: agent session
🤖 Generated with Claude Code