Skip to content

Agent pane: a queued agent's message draws as its received line - #23825

Merged
teamleaderleo merged 6 commits into
feat-cmux-nextfrom
queued-agent-from
Oct 22, 2026
Merged

teamleaderleo merged 6 commits into
feat-cmux-nextfrom
queued-agent-from

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

In progress: review, fleet compile and CI are running at the head.

Another agent's message waiting behind a running turn used to show in the composer queue as if the person had typed it. Now its row is the message's received line: IncomingMessageLine (conversation/IncomingMessageCard.tsx, from #23727), the same component the transcript draws it with once it runs. That gives the sender's harness mark or a small bot, the sender's name as a chip that opens their chat, a muted one-line preview, and the message as a glass Markdown card when opened. Edit, Remove and Send now sit in the line's actions slot at its end. The person's own queued prompts are unchanged.

  • direct.ts queuedMessage(msg) reads a queued record the way the received line reads the same prompt once it runs (incomingPrompt: agent_message, session_message/subsession_message, the [name] text from acpmux send in a shell). Failing that, it uses acpmux's fromAgent, dropping a leading [name] or From name: that only repeats the sender. The person's own prompt gets none.
  • The message is kept on the QueuedPrompt (message) through queue_order, delivery updates and mergeQueue, since acpmux's queue list doesn't name a sender. An edit (queue_updated) makes the prompt the person's, matching acpmux, which drops its provenance and fromAgent (hub/queue.rs).
  • The composer sits outside the transcript's SubsessionContext. App now hands the listed chats to the queue (Composer queueSubsessions), so the chip finds a shell sender's chat by name and opens it.
  • Opening or closing the message re-fits the queue's height (IncomingMessageLine onToggle), so the card shows whole.
  • Gallery: agent-pane.composer queued-from-agent (closed) and queued-from-agent-open (the card; its play waits for the whole card inside the list).

No capture: webview-only (the composer queue row in the agent pane web view). The gallery states agent-pane.composer queued-from-agent and queued-from-agent-open cover it, rendered by gallery health on Linux Chromium.

Tests (CI only; nothing is built or tested on Leo's Mac):

  • queuedMessage.test.ts: each provenance kind, the CLI [name] prefix, fromAgent with and without a repeated lead, none for the person's prompt, and mergeQueue keeping the message.
  • test/queue-agent-message.test.tsx (JSDOM): the agent row shows the chip, the preview and all three actions inside the line; the chip opens the sender's chat; the preview opens the card. The person's row is unchanged.

Overlap: #23753 (queued rows show Steer, a trash can and ⋯) changes the same row code. Whichever lands second rebases.

Agent session: cosmic-gray

🤖 Generated with Claude Code

…o Send now

A `queued` record of another agent's message (its `_meta.provenance`, a
`[name]` prefix from `acpmux send`, or `fromAgent`) now keeps its sender's
name on the queue entry (direct.ts `queuedFrom`), and acpmux's queue list
keeps it. Its row draws the name as a chip ahead of the text, as the
received line does once it runs, and drops Send now, the person's override
for their own prompt. An edit makes it the person's, as acpmux does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16028-eee2-75a1-b075-2e4023976100&host=cosmic-gray
@teamleaderleo teamleaderleo added the risk:low Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review e34ce27: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr23825 -f ref=queued-agent-from -f platform=macos -f backend_mode=local

Unclear: web / react-apps-check (4) failed: no known signature; failed step: Build the web bundles.

CI failed on e34ce27bdd (run 39701232996 attempt 1): 5 unknown.

Job Verdict Why
web / react-apps-check (4) unknown no known signature; failed step: Build the web bundles
web / react-apps-check (1) unknown no known signature; failed step: Build the web bundles
web / react-apps-check (3) unknown no known signature; failed step: Build the web bundles
web / react-apps-check (2) unknown no known signature; failed step: Build the web bundles
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Not re-run automatically: web / react-apps-check (4), web / react-apps-check (1), web / react-apps-check (3), web / react-apps-check (2), web / react-apps-check are not machine failures.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

red: web / Web status; base red: the same failure on the base fcacd19; does not block
red: web / react-apps-check; base red: the same failure on the base fcacd19; does not block
red: web / react-apps-check (1); base red: the same failure on the base fcacd19; does not block
red: web / react-apps-check (2); base red: the same failure on the base fcacd19; does not block
red: web / react-apps-check (3); base red: the same failure on the base fcacd19; does not block
red: web / react-apps-check (4); base red: the same failure on the base fcacd19; does not block

Gallery before/after for e34ce27: 16 states rendered, 4 images differ, 1508 more touched states not rendered. Images are in the run's artifact, not on this public PR.

gh run download 39701232825 -R manaflow-ai/cmux -n gallery-advisory-23825-e34ce27bdd6eef67382048180fdb21e57099c867 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.chat-width/standard Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/standard Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors unchanged 0% own App.tsx
agent-pane.composer/queued-from-agent Apple System Colors Light new 0% own Composer.tsx
agent-pane.composer/queued-from-agent Apple System Colors new 0% own Composer.tsx
agent-pane.composer/queued-from-agent-open Apple System Colors Light new 0% own Composer.tsx
agent-pane.composer/queued-from-agent-open Apple System Colors new 0% own Composer.tsx
agent-pane.composer/new-chat Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer/new-chat Apple System Colors unchanged 0% own Composer.tsx
agent-pane.composer/side-session Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer/side-session Apple System Colors unchanged 0% own Composer.tsx
agent-pane.composer/new-chat-suggest-open Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer/new-chat-suggest-open Apple System Colors unchanged 0% own Composer.tsx
agent-pane.composer/new-chat-suggest-failing Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer/new-chat-suggest-failing Apple System Colors unchanged 0% own Composer.tsx
agent-pane.composer/new-chat-suggest-draft Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer/new-chat-suggest-draft Apple System Colors unchanged 0% own Composer.tsx
agent-pane.composer/new-chat-reasoning Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer/new-chat-reasoning Apple System Colors unchanged 0% own Composer.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-row/claude-auto Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer-row/claude-auto Apple System Colors unchanged 0% own Composer.tsx
agent-pane.composer-row/long-model Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer-row/long-model Apple System Colors unchanged 0% own Composer.tsx
agent-pane.composer-row/leo-report Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer-row/leo-report Apple System Colors unchanged 0% own Composer.tsx

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

@github-actions github-actions Bot added risk:normal Risk tier (docs/ci/risk-tiers.md) and removed risk:low Risk tier (docs/ci/risk-tiers.md) labels Oct 21, 2026
@blacksmith-sh

blacksmith-sh Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Found 3 test failures on Blacksmith runners:

Failures

Test View Logs
nightly cmux-tui resolve/nightly cmux-tui resolve View Logs
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
View Logs
test_the_tree_classifies_every_macos_job (main.RoutingTableTests.test_the_tree_clas
sifies_every_macos_job)/
test_the_tree_classifies_every_macos_job (main.RoutingTableTests.test_the_tree_clas
sifies_every_macos_job)
View Logs

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / cmux-next localization debt ratchet is red on 16 of 16 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-pryzn created for this PR by the cmux coordinator.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / nightly-guards / workflow-guard-tests / release-notary is red on 12 of 15 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

Leo (via claude-sr2): a queued prompt that is another agent's message
must read as the agent row, not as the person's prompt. The queue entry
now keeps the whole message (direct.ts `queuedMessage`, as the transcript
reads it once it runs, else acpmux's `fromAgent` with a lead that only
repeats the sender dropped), and its row is IncomingMessageLine: the
sender's mark, its name as a chip that opens its chat (the listed chats
reach the queue from App), a one-line preview, and a glass Markdown
card when opened. Edit, Remove and Send now sit at the line's end.
Gallery cases for it closed and opened.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16028-eee2-75a1-b075-2e4023976100&host=cosmic-gray
@teamleaderleo teamleaderleo changed the title Agent pane: another agent's queued message names its sender and has no Send now Agent pane: a queued agent's message draws as its received line Oct 21, 2026
teamleaderleo and others added 3 commits October 21, 2026 17:04
Whether IncomingMessageLine is open is its own state, so opening a
queued agent's message never drew the queue again and the list kept its
one-line height, the card clipped to a sliver (review). The line now says
when it opens or closes (`onToggle`), and the queue draws again and fits.
The gallery's opened state waits for the whole card inside the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16028-eee2-75a1-b075-2e4023976100&host=cosmic-gray
Review: opening Details in a queued agent's message clipped it too, as
anything inside IncomingMessageLine changes its height without drawing
the queue again (images, late highlighting). The queue now watches its
rows' heights and fits again, instead of the line's onToggle (dropped).
mergeQueue keeps a queued message only while its text is the one acpmux
lists: an edit the pane missed makes it the person's, as acpmux does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16028-eee2-75a1-b075-2e4023976100&host=cosmic-gray
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent, correctness first): SHIP at e34ce27

Independent claude -p session, read-only, third pass. The first two passes (at 7d733e6 and b88d272) each found a blocker: opening the agent line, then its Details, never re-fit the queue's height. Both are fixed now: the queue watches each row's height with a ResizeObserver and fits again. The merge with #23753 (Steer, trash can, ⋯) is clean: every upstream behavior survives, and the agent line carries the same actions in its slot.

Non-blocking: rows are re-observed on every draw, which costs one cheap extra fitList per draw.

Fleet stand-in for the merge compile: cmux-ci compile-check --app --ref e34ce27bdd6eef67382048180fdb21e57099c867 passed (job e7932a246b290d073bdf8e04, 85 s).

Tests: these files run in no PR check here, because react-apps-check stops first at a base-red gate ("the agent pane imports inspector/ContextSection.css but build-agent-pane-web.sh does not add it", from #23789). So I ran them at this head on huge-blue: bun test on queuedMessage.test.ts, test/queue-agent-message.test.tsx, test/queue-row-actions.test.tsx, ComposerQueue.test.tsx, conversation/incomingMessage.test.ts and test/composer-queued-placeholder.test.tsx gave 51 pass, 0 fail.

Reds at this head, all from base and none in files this PR changes:

@teamleaderleo
teamleaderleo merged commit 4c656ea into feat-cmux-next Oct 22, 2026
@teamleaderleo
teamleaderleo deleted the queued-agent-from branch October 22, 2026 01:22
teamleaderleo added a commit that referenced this pull request Oct 22, 2026
Base gained #23825, whose queued agent message draws as its received
line and whose test read the line's one-line preview, which this branch
removes. The test now reads the card under the line (whole, not cut),
and the queue's comment and gallery note say the message is a card cut
to six lines. Review: a click on a cut card that plays a video or
presses another control (input, label, summary, role=button) no longer
opens it, and two comments that still spoke of the preview are updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16028-eee2-75a1-b075-2e4023976100&host=cosmic-gray
teamleaderleo added a commit that referenced this pull request Oct 22, 2026
…lines (#23932)

* Agent pane: another agent's message shows under its line, cut to six lines

The message is now drawn by default as the muted glass card under its line
(Markdown, PR and file links), instead of hiding behind a one-line preview.
A message longer than six lines is cut there with the last line fading out;
the line's chevron, or a click on the cut card, opens it whole, with Details
(the prompt as the agent got it) under it. The row estimate (model.ts)
counts the card's text up to the same six lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16028-eee2-75a1-b075-2e4023976100&host=cosmic-gray

* Agent pane: a queued agent message shows its card too

Base gained #23825, whose queued agent message draws as its received
line and whose test read the line's one-line preview, which this branch
removes. The test now reads the card under the line (whole, not cut),
and the queue's comment and gallery note say the message is a card cut
to six lines. Review: a click on a cut card that plays a video or
presses another control (input, label, summary, role=button) no longer
opens it, and two comments that still spoke of the preview are updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16028-eee2-75a1-b075-2e4023976100&host=cosmic-gray

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo added a commit that referenced this pull request Oct 22, 2026
…ok-queue-click

Conflicts with #23872 (a paused queue names its error) and #23825 (a
queued agent message draws as its received line): the paused note keeps
its ellipsis in the new two-column grid; the received line spans the row
with no mark column. The header's composer.queueHeld goes with the
header; queue-paused-why asserts the note leads the rows and no header
shows.

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
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant