Skip to content

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

Merged
teamleaderleo merged 3 commits into
feat-cmux-nextfrom
agent-message-clamp
Oct 22, 2026
Merged

teamleaderleo merged 3 commits into
feat-cmux-nextfrom
agent-message-clamp

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Another agent's message now shows its text under its line by default, as the muted glass card with Markdown, instead of hiding it behind a one-line preview. A message longer than about 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. Leo asked for this on nightly 331e2e9: agent messages left, styled, markdown rendered, collapsed past about 6 lines.

  • IncomingMessageCard.tsx: the card always draws. A layout effect with a ResizeObserver measures whether the text runs past RECEIVED_LINES (6) at its drawn width. A cut card opens on click, unless the click follows a link, presses a button or ends a selection. The chevron shows only when opening shows more (a cut message's rest, or Details). The reply editor and the Replied note no longer wait for the message to be opened. Find in Chat still opens a cut message that holds its match.
  • conversation.css: .cv-received__body[data-cut] > .cv-received__text caps the text at six lines, with a mask fade (glass shows through, no cover), the same way a long prompt is cut. The unused preview rule is removed.
  • model.ts: the row estimate counts the card (4 px above, 8 px padding on each side, 6 px below) plus the text's height up to RECEIVED_LINES lines, so a message mounting moves nothing.
  • Gallery agent-pane.incoming-message: new long variant (cut), and opened now opens a long message whole.

Changelog

Changed: another agent's message shows its text under its line, cut to six lines when longer.

Tests

  • rowEstimates.test.ts: a short message's estimate is its line plus a one-line card, and a 40-line message's estimate stops at six lines.
  • agent-pane-suggested-tasks.test.ts:
    • New: "a long message's card shows its first six lines; the chevron or a click opens it whole" (real Chromium layout).
    • The provenance test now reads the body directly instead of the preview.

Observed / Not run

  • Observed on huge-blue at this diff, on base 783c206:
    • bun test src/agent-session/acpmux/rowEstimates.test.ts src/agent-session/acpmux/conversation/: 145 pass.
    • CMUX_BROWSER_TESTS=1 bun test test/agent-pane-suggested-tasks.test.ts -t "messages from other agents": 14 pass, including the new one.
    • tsc --noEmit: clean.
    • oxlint on the changed files: 0 errors.
    • vp fmt.
    • scripts/cmux-next/prepush-gate.py: no new violations.
  • Not run: the full webview suite, which CI runs.

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

Another agent's message now always shows its text under its line as a muted glass card, instead of hiding behind a one-line preview. Messages longer than about six lines are clipped with the last line fading out; the line's chevron, or a click on the clipped card, opens the message whole, with Details (the prompt as the agent got it) underneath.

  • The row estimator accounts for the card and clips it to the same six lines, so mounting a message shifts nothing.
  • The reply editor and the "Replied" note no longer wait for the message to be opened.
  • A click on a clipped card opens it unless it follows a link, activates a control (button, input, label, role=button, video, audio), or ends a selection.
  • A queued agent message draws the card under its line too, whole when short.

Tests

  • A new browser test verifies the six-line clip, a card click opening it whole, and the chevron closing it again.
  • Row-estimate tests cover a short message (line plus card) and a 40-line message clipped at six lines.
  • The provenance test reads the message body directly instead of the preview, and the queue test reads the card instead of the preview.

Written for commit e6d9e9f. Summary will update on new commits.

View guided diff Turn on auto-fix

@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 22, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by agent-message-style on cosmic-gray · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by agent-message-style on cosmic-gray · session

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

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

Review e6d9e9f: 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=pr23932 -f ref=agent-message-clamp -f platform=macos -f backend_mode=local

Passes: CI passes on e6d9e9f578.

CI passes on e6d9e9f578 (run 39710969026 attempt 1).

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: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base 164b139; does not block

Tour of e6d9e9f578 (run): no media. The tour did not run: only webview code changed (10 path(s)), which the gallery advisory run checks in Linux Chromium on the pull request (its artifact holds any captures); add the media-tour-mac label, then re-add media-tour, to tour it on a Mac.

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

gh run download 39710968774 -R manaflow-ai/cmux -n gallery-advisory-23932-e6d9e9f57885799fa6e3781052207540128e8a43 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.chat-find-bar/empty Apple System Colors Light unchanged 0% own conversation.css
agent-pane.chat-find-bar/empty Apple System Colors unchanged 0% own conversation.css
agent-pane.chat-find-bar/matches Apple System Colors Light unchanged 0% own conversation.css
agent-pane.chat-find-bar/matches Apple System Colors unchanged 0% own conversation.css
agent-pane.chat-find-bar/next-match Apple System Colors Light unchanged 0% own conversation.css
agent-pane.chat-find-bar/next-match Apple System Colors unchanged 0% own conversation.css
agent-pane.chat-find-bar/no-results Apple System Colors Light unchanged 0% own conversation.css
agent-pane.chat-find-bar/no-results Apple System Colors unchanged 0% own conversation.css
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/new-chat Apple System Colors Light unchanged 0% own ComposerQueue.tsx
agent-pane.composer/new-chat Apple System Colors unchanged 0% own ComposerQueue.tsx
agent-pane.composer/side-session Apple System Colors Light unchanged 0% own ComposerQueue.tsx
agent-pane.composer/side-session Apple System Colors unchanged 0% own ComposerQueue.tsx
agent-pane.composer/new-chat-suggest-open Apple System Colors Light unchanged 0% own ComposerQueue.tsx
agent-pane.composer/new-chat-suggest-open Apple System Colors unchanged 0% own ComposerQueue.tsx
agent-pane.composer/new-chat-suggest-failing Apple System Colors Light unchanged 0% own ComposerQueue.tsx
agent-pane.composer/new-chat-suggest-failing Apple System Colors unchanged 0% own ComposerQueue.tsx
agent-pane.composer/new-chat-suggest-draft Apple System Colors Light unchanged 0% own ComposerQueue.tsx
agent-pane.composer/new-chat-suggest-draft Apple System Colors unchanged 0% own ComposerQueue.tsx
agent-pane.composer/new-chat-reasoning Apple System Colors Light unchanged 0% own ComposerQueue.tsx
agent-pane.composer/new-chat-reasoning Apple System Colors unchanged 0% own ComposerQueue.tsx
agent-pane.composer/agent-home Apple System Colors Light unchanged 0% own ComposerQueue.tsx
agent-pane.composer/agent-home Apple System Colors unchanged 0% own ComposerQueue.tsx
agent-pane.composer/agent-home-path Apple System Colors Light unchanged 0% own ComposerQueue.tsx
agent-pane.composer/agent-home-path Apple System Colors unchanged 0% own ComposerQueue.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

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

@blacksmith-sh

blacksmith-sh Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Found 16 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpfmtys4en/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmpkx6lyvg5/summary-missing.json (live):/summary-missing.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
cmux-next-ios-kit.yml runs macOS jobs on pull requests but a new push does not cancel t
he previous run; key the concurrency group on the pull request and set cancel-in-progre
ss for its pull request events/
cmux-next-ios-kit.yml runs macOS jobs on pull requests but a new push does not cancel t
he previous run; key the concurrency group on the pull request and set cancel-in-progre
ss for its pull request events
View Logs
convention violations found (ERROR lines above)./
convention violations found (ERROR lines above).
View Logs
nightly cmux-tui resolve/nightly cmux-tui resolve View Logs
test_every_submodule_free_checkout_on_an_owned_runner_resets_submodules (main.Reuse
dWorkspaceSubmodules.test_every_submodule_free_checkout_on_an_owned_runner_resets_submo
dules)/
test_every_submodule_free_checkout_on_an_owned_runner_resets_submodules (main.Reuse
dWorkspaceSubmodules.test_every_submodule_free_checkout_on_an_owned_runner_resets_submo
dules)
View Logs

...and 6 more test failures. View all on Blacksmith: run 39710968783, run 39710968928

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent, correctness first): SHIP at 31fcf86

An independent claude -p session reviewed the diff against base 783c206 and found no defects. It checked:

  • Hook order, and that the layout effect cannot cause a render loop.
  • Overflow measurement, both when the card is cut and when it is open.
  • Click-to-open: links and buttons are skipped, and so is a click that ends a selection.
  • The reply editor and the Replied note, and Find in Chat revealing a match in a cut card.
  • The row estimate against the CSS: 26 + 4 + (4 + 16 + text + 6) + 8, with a 46 px inset.
  • The bounded prepared-text map.
  • That the test and gallery waits will hold.

Two non-blocking notes, left for a follow-up:

  • A short message with no envelope still has a focusable toggle that reveals nothing.
  • In a cut card, a double-click to select a word opens the card on the first click.

Verification:

  • Tests on huge-blue at this diff:
    • Unit tests (rowEstimates and conversation/): 145 pass.
    • Browser tests ("messages from other agents"): 14 pass.
    • tsc and oxlint: clean.
  • Fleet cmux-ci compile-check --app (job 4641932b9d7b847135df892a) fails in 5 s with product 'CmuxSentryReporting' required by package 'cmuxnext' target 'CmuxNextCrashReporting' not found in package 'CmuxSentryTelemetry'. That is the same base red on feat-cmux-next 25daac5. This PR touches no Swift.

…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
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

Copy link
Copy Markdown
Collaborator Author

Review (subagent, correctness first): SHIP at e6d9e9f

A fresh general-purpose subagent reviewed the full diff against feat-cmux-next at this head and found no defects. This head adds two commits to the one reviewed earlier (f450363, also SHIP):

  • A merge of the base. The base gained Agent pane: a queued agent's message draws as its received line #23825, which draws a queued agent message with IncomingMessageLine, and its test read the one-line preview this PR removes; at f450363 the merged result failed test/queue-agent-message.test.tsx.
  • A fix commit:
    • The queue test now reads the card under the line.
    • The queue's comment and gallery note are updated.
    • A click on a cut card no longer opens it when it lands on a video, audio, input, label, summary or [role=button].
    • Two stale "preview" comments are updated.

The reviewer checked:

  • No caller or test still uses .cv-received__preview.
  • Both IncomingMessageLine callers (App.tsx and ComposerQueue.tsx) still pass the props it takes.
  • The queue's row ResizeObserver refits when the card is cut or opened.
  • --cv-line-height is defined on :root, so the six-line cut works in the composer queue too.
  • git merge-tree against the current base is clean.

Nits left for later:

  • The queued-from-agent-open gallery case uses a short message, so opening it shows nothing new.
  • A short message's line is still a toggle with no visible effect.
  • messagePreview in incomingMessage.ts is now only used by its own test.

Run on huge-blue at this head:

  • bun test test/queue-agent-message.test.tsx src/agent-session/acpmux/rowEstimates.test.ts src/agent-session/acpmux/conversation/ src/agent-session/acpmux/queuedMessage.test.ts: 155 pass.
  • CMUX_BROWSER_TESTS=1 bun test test/agent-pane-suggested-tasks.test.ts -t "messages from other agents": 14 pass.
  • tsc --noEmit: clean.
  • oxlint: 0 errors.
  • prepush-gate.py: no new violations.

test/lit-glyph-css.test.ts fails, and fails the same way on base: it flags composerLocation.css, which this PR does not touch.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

teamleaderleo added a commit that referenced this pull request Oct 23, 2026
- IncomingMessageCard measured its text with the global getComputedStyle
  (#23932), which a jsdom test does not install; any transcript with
  another agent's message threw. It now reads the box's own window, as
  PromptText does. (regression; fixes transcript-copy's sent-prompt test)
- transcript-range-content's button variant clicked the prompt's floating
  Copy, which #24267 removed on purpose. It now selects a range that starts
  at another agent's message (a line that keeps its floating Copy) and
  clicks that. (stale test)
- agent-pane-older-rows-fade read a row's turn from its textContent, and
  #23769's message age ("3 weeks ago") runs straight on from "Question 130",
  so opened rows read as turns 1113..1303. The recorder now drops <time>.
  (stale test)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo added a commit that referenced this pull request Oct 23, 2026
- IncomingMessageCard measured its text with the global getComputedStyle
  (#23932), which a jsdom test does not install; any transcript with
  another agent's message threw. It now reads the box's own window, as
  PromptText does. (regression; fixes transcript-copy's sent-prompt test)
- transcript-range-content's button variant clicked the prompt's floating
  Copy, which #24267 removed on purpose. It now selects a range that starts
  at another agent's message (a line that keeps its floating Copy) and
  clicks that. (stale test)
- agent-pane-older-rows-fade read a row's turn from its textContent, and
  #23769's message age ("3 weeks ago") runs straight on from "Question 130",
  so opened rows read as turns 1113..1303. The recorder now drops <time>.
  (stale test)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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