Skip to content

Transcript: a sent paste is one card of its first lines and its real size that opens in place - #36303

Merged
teamleaderleo merged 10 commits into
feat-cmux-nextfrom
lane/pasted-chip-sent
Nov 5, 2026
Merged

teamleaderleo merged 10 commits into
feat-cmux-nextfrom
lane/pasted-chip-sent

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Leo, 2026-11-05, on the paste chip in a sent prompt's bubble: "UI for, what is it, expanding and hiding the text? I feel like, I think this is almost kind of interesting, but it's, like, really awkward. So I think we maybe want to, like, slightly preserve this in, like, the preview of the prompt thing. Because I told you before, like, within the composer, it looked like ass. But, like, I'm just seeing it, like, the sent off prompt. This is actually kind of okay, but..."

Builds on #36276 (merged as 16afd28: the composer's paste card and its size label); the sent card uses the same label.

What was wrong

The sent bubble drew a paste as the composer's outlined attachment chip: the paste's first 40 characters ("Okay, but at the same t…") over "N lines". One long paragraph, as dictation gives it, said "1 line", and the chip showed five words. Opening it drew the whole text under that box, so the preview and the text both showed.

What changed

  • One card. A paste in a sent prompt is one quiet card with no outline, tinted from the bubble's ink. Closed, it shows the paste's own first three lines, wrapped in the prompt's font, with the last line fading out. Under them is the composer's label: "Pasted text · 2,300 lines · 76K characters", or only the characters for one paragraph (pastedSize, shared with the composer card).
  • Expands in place. The label, or a click on the lines, opens the same text in place to the whole paste, so the first lines don't move. The card slides to its new height on the fold's motion (playResize, which respects the animation settings), and the label under it, with its chevron turned, closes it again. Opening holds the card's top; closing holds the label where it was clicked.
  • A loop it fixes on the way: a prompt drawn whole was measured by a range over its text, which would count the lines a closed card's preview clips. The prompt then measured long, clamped, measured short and unclamped until React stopped it and the pane drew its error. A paste card now counts as its own box.
  • Unchanged: Find opens a closed card that holds the match and paints only the open text, never the preview or the label. Copy copies the prompt as sent. Each card's open state is kept by row. Closed, the card draws only the paste's head (pastePreview, 1,000 characters), so a huge paste lays out no more than a short one (Transcript: a sent prompt of megabytes never freezes the chat (literal, collapsed to its head) #29840). The row estimate follows the card's closed height (pasteChipHeight).

Captures

Gallery agent-pane.user-bubble (pasted-paragraph and pasted-paragraph-open are new; pasted-chip, pasted-chip-open) and agent-pane.composer text-pasted-paragraph. Before is feat-cmux-next at 02e1c0b, before #36276; after is this head.

State Before After
sent, one 1,100-word paragraph, closed, dark
sent, one 1,100-word paragraph, closed, light
sent, the paragraph opened, dark
sent, the paragraph opened, light
sent, a 2,300-line trace, closed, dark
sent, a 2,300-line trace, closed, light
sent, the trace opened, dark
sent, the trace opened, light
composer, the paragraph (from #36276), dark
composer, the paragraph (from #36276), light

Tests

Red/green: bun test test/user-prompt-collapse.test.tsx -t one-paragraph fails on the base (Expected: "Pasted text", Received: "word0 word1 word2 word3 word4 word5 wor…") and passes on the head. -t "clipped preview" fails on the parent of 962ad5e with "Maximum update depth exceeded" and passes on the head.

The collapse, row estimate, paste round-trip, composer paste and card suites pass on the head (139 tests): user-prompt-collapse, rowEstimates, paste-chip-round-trip, composer-paste-text, TextAttachmentCard.test, clip-whole-emoji, foldAnchor.

Observed / Not run

  • Observed: the tests above; vp lint and vp fmt on the changed files.
  • Not run: the full type check locally (it runs out of memory on this host); CI runs it.

Changelog

Changed: a long paste in a sent prompt is a card of its first lines and its real size that opens in place.

Agent session: agent session

🤖 Generated with Claude Code

teamleaderleo and others added 5 commits November 5, 2026 07:24
…ery line break counts (red)

Leo, 2026-11-05: "it says pasted text one line, but there's a lot more than this".

Red on base: a one-paragraph paste reads "Pasted text · 1 line" with a
five-word preview, and \r / U+2028 lines count as one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-1495d79516d0468d1734
Leo, 2026-11-05: "it says pasted text one line, but there's a lot more than
this ... you're previewing one, two, three, four, five words out of a
multi-hundred-word pasted text bit."

The chip counted only \n lines and drew each line unwrapped in monospace, so
one long paragraph (a dictated message) read "1 line" with its first five
words. Now a paste's card wraps its lines in the composer's font, wider
(256 px), and its label gives lines (when more than one) and characters:
"Pasted text · 42 lines · 1.8K characters". pasteLines and the card count
\r\n, \r, U+2028 and U+2029 breaks too. Click (back into the prompt to edit),
× and sending are unchanged. Text file cards keep their monospace lines.

bun test test/composer-paste-text.test.tsx
src/agent-session/acpmux/composer/TextAttachmentCard.test.ts: 3 fail on base,
pass here (64 pass across the paste suites).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-1495d79516d0468d1734
…its size and opens in place

Red on the base: the chip names the paste by its first 40 characters and says "1 line" for one
long paragraph.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-1495d79516d0468d1734
… place

The sent bubble drew a paste as the composer's outlined attachment chip, its first 40 characters
over "N lines", and opened it by drawing the whole text under that box. One long paragraph said
"1 line" and showed five words. Leo, 2026-11-05: "I think this is almost kind of interesting,
but it's, like, really awkward. So I think we maybe want to, like, slightly preserve this in,
like, the preview of the prompt thing."

Now the paste is one quiet card (no outline, a tint of the bubble's ink): its own first three
lines wrapped in the prompt's font, the last fading, over the composer's label ("Pasted text ·
2,300 lines · 76K characters", pastedSize). The label, or a click on the lines, opens the same
text in place to the whole paste and the card slides to its height (fold.ts playResize); the
label under it closes it. Closed, the card draws only the paste's head (pastePreview), outside
Find, so a huge paste lays out no more than a short one. The row estimate follows the card's
height (pasteChipHeight).

Red/green: bun test test/user-prompt-collapse.test.tsx -t one-paragraph fails on the base (the
name is the paste's first words) and passes here; the collapse, estimate, round-trip, paste and
card suites pass (138).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-1495d79516d0468d1734
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 1761b55: 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=pr36303 -f ref=lane/pasted-chip-sent -f platform=macos -f backend_mode=local

Gallery before/after for 1761b55: 16 states rendered, 4 images differ, 3722 more touched states not rendered. Images are in the run's artifact, not on this public PR; the independent review of this head reads them on its own, so the PR needs no hand-made screenshots of these states.

gh run download 42016025659 -R manaflow-ai/cmux -n gallery-advisory-36303-1761b554764dcb69b498d779badfe1abe434787b (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.access-offer/turn-no-credits Apple System Colors Light unchanged 0% own conversation.css
agent-pane.access-offer/turn-no-credits Apple System Colors unchanged 0% own conversation.css
agent-pane.access-offer/turn-low-credits Apple System Colors Light unchanged 0% own conversation.css
agent-pane.access-offer/turn-low-credits Apple System Colors unchanged 0% own conversation.css
agent-pane.access-offer/turn-no-offer Apple System Colors Light unchanged 0% own conversation.css
agent-pane.access-offer/turn-no-offer Apple System Colors unchanged 0% own conversation.css
agent-pane.activity-line-looks/none Apple System Colors Light unchanged 0% own conversation.css
agent-pane.activity-line-looks/none Apple System Colors unchanged 0% own conversation.css
agent-pane.activity-line-looks/spinner Apple System Colors Light changed 0.0522% own conversation.css
agent-pane.activity-line-looks/spinner Apple System Colors changed 0.0496% own conversation.css
agent-pane.activity-line-looks/kind Apple System Colors Light changed 0.0271% own conversation.css
agent-pane.activity-line-looks/kind Apple System Colors changed 0.0258% own conversation.css
agent-pane.activity-line-looks/aligned Apple System Colors Light unchanged 0% own conversation.css
agent-pane.activity-line-looks/aligned Apple System Colors unchanged 0% own conversation.css
agent-pane.approval-edits/single Apple System Colors Light unchanged 0% own conversation.css
agent-pane.approval-edits/single Apple System Colors unchanged 0% own conversation.css
agent-pane.approval-edits/grouped Apple System Colors Light unchanged 0% own conversation.css
agent-pane.approval-edits/grouped Apple System Colors unchanged 0% own conversation.css
agent-pane.approval-edits/single-multiedit Apple System Colors Light unchanged 0% own conversation.css
agent-pane.approval-edits/single-multiedit Apple System Colors unchanged 0% own conversation.css
agent-pane.approval-edits/grouped-multiedit Apple System Colors Light unchanged 0% own conversation.css
agent-pane.approval-edits/grouped-multiedit Apple System Colors unchanged 0% own conversation.css
agent-pane.approval-edits/single-long Apple System Colors Light unchanged 0% own conversation.css
agent-pane.approval-edits/single-long Apple System Colors unchanged 0% own conversation.css
agent-pane.approval-edits/grouped-long Apple System Colors Light unchanged 0% own conversation.css
agent-pane.approval-edits/grouped-long Apple System Colors unchanged 0% own conversation.css
agent-pane.attachment-source/before Apple System Colors Light unchanged 0% own conversation.css
agent-pane.attachment-source/before Apple System Colors unchanged 0% own conversation.css
agent-pane.attachment-source/corner Apple System Colors Light unchanged 0% own conversation.css
agent-pane.attachment-source/corner Apple System Colors unchanged 0% own conversation.css
agent-pane.attachment-source/small Apple System Colors Light unchanged 0% own conversation.css
agent-pane.attachment-source/small Apple System Colors unchanged 0% own conversation.css

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

Passes: CI passes on 1761b55476.

CI passes on 1761b55476 (run 42016025953 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.

web and size checks: green

Shipped in:

@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 5, 2026
@blacksmith-sh

blacksmith-sh Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Found 6 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmp8r4jm2e5/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpxbcl2fxc/summary-fail.json (live):/summary-fail.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

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

…mpt measure long

A range over a prompt drawn whole counted the lines a closed card's preview clips, so a prompt with
a paste measured long, clamped, measured short (its clamped box) and unclamped until React gave up
("Maximum update depth exceeded"), and the pane drew its error. A paste card now counts as its own
box; every other part is measured by its text as before.

Red/green: bun test test/user-prompt-collapse.test.tsx -t "clipped preview" fails with the loop
on the parent commit and passes here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-1495d79516d0468d1734
…-chip-sent

# Conflicts:
#	webviews/src/agent-session/acpmux/conversation/promptCollapse.ts
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, router-review): BLOCK at d4e67e7

BLOCK at d4e67e7

Visual verdict: reviewed all supplied after images against before; no visual blocker.

  1. [P1] [blocking] [category:tests] [finding:F1] [outcome:pending] New global Node lookup breaks existing tests — webviews/src/agent-session/acpmux/conversation/PromptText.tsx:232. Both user-message-actions.test.tsx and edit-resend.test.tsx mount ordinary prompts without installing global Node; the preload doesn’t install it either. Their initial layout effect now reaches Node.ELEMENT_NODE and throws a ReferenceError. CI runs each file separately, so another suite cannot supply the missing global. Use the node’s own constant or owner-window constructor, then run both suites independently. Identified through source inspection; Bun and dependencies are unavailable here.

…nting hand

Review (gpt-6-astra, BLOCK at d4e67e7): drawnBox read Node.ELEMENT_NODE, which a test DOM may
not install, so user-message-actions and edit-resend threw ReferenceError when run on their own.
It now compares nodeType with 1. The closed preview's cursor: pointer broke the agent pane's
no-pointing-hand rule (clickable-cursor); it keeps the arrow. The inline paste test now checks the
card's closed preview is outside Find and its open text is the paste.

Red/green: bun test test/user-message-actions.test.tsx and test/edit-resend.test.tsx each fail
with ReferenceError: Node is not defined at d4e67e7 and pass here; clickable-cursor and
user-bubble-inline-parts fail there and pass here. Every suite that mounts a sent prompt (90
files) was run on its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-1495d79516d0468d1734
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at a0b0733

Reviewer: codex gpt-6.1-sol xhigh, fast tier.

Follow-ups: 2. They land as checklist items in this PR's one follow-up tracking issue in this repo (Follow-ups: #N ..., label follow-up; add to an open one before filing, never one issue per finding), linking this receipt; the lane that opened the PR fixes them forward.

SHIP at a0b0733
Visual verdict: All ten before/after pairs reviewed against Claude’s paste-card pattern; no visual blocker. React suites could not run because Bun and dependencies are absent.

  1. [P2] [follow-up] [category:ux] [finding:F1] [outcome:pending] PromptText.tsx:397: Preserve the paste’s first words in the button’s accessible name. The preview is now aria-hidden, leaving only “Pasted text” and its size; different pastes with matching sizes become indistinguishable to screen-reader users. The composer already supplies a content-specific aria-label.

  2. [P2] [follow-up] [category:ux] [finding:F2] [outcome:pending] PromptText.tsx:369: Keep the text and label positioned through the closing animation. Closing immediately substitutes the truncated preview and applies its three-line clamp, while playResize animates only the outer card. The label jumps to the top portion immediately, leaving empty space to shrink below it instead of following the card’s bottom.

Follow-ups:

  • F1: Restore content-specific accessible names.
  • F2: Animate the closing content and label together.

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmux-bot approves a0b0733: an independent review passed this exact head (router-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

…'s edge shut

Review follow-ups at a0b0733 (gpt-6.1-sol, SHIP):
- F1: the label button's accessible name now starts with the paste's first words, as the composer
  card's does, since the preview is hidden from screen readers.
- F2: while the card slides shut, its preview fills the height the card has left, so the label
  rides the card's bottom edge up instead of jumping to its closed place over empty space.
The design-token baseline drops the old chip's padding-right: 10px (check:design-tokens).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-1495d79516d0468d1734
…-chip-sent

# Conflicts:
#	webviews/src/agent-session/acpmux/conversation/PromptText.tsx
@cursor

cursor Bot commented Nov 5, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot 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.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 1761b55

Reviewer: codex gpt-6-astra high, fast tier.

SHIP at 1761b55

Visual verdict: supplied before/after captures match the intended card, preview, sizing, and expansion behavior.

Follow-ups: none

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmux-bot approves 1761b55: an independent review passed this exact head (router-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

@teamleaderleo
teamleaderleo merged commit 3bc29da into feat-cmux-next Nov 5, 2026
197 checks passed
@teamleaderleo
teamleaderleo deleted the lane/pasted-chip-sent branch November 5, 2026 11:55

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 1761b554 Deployed Nov 5, 2026 by teamleaderleo via wait for same-key tree publisher #115786
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