Repository navigation
Transcript: a sent paste is one card of its first lines and its real size that opens in place - #36303
Conversation
…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
…e type check 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
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Gallery before/after for
States
Pick other states with a Passes: CI passes on CI passes on Written by web and size checks: green Shipped in:
|
|
Found 6 test failures on Blacksmith runners: Failures
|
…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
|
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.
|
…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
|
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 ( SHIP at a0b0733
Follow-ups:
|
…'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
Bugbot needs on-demand usage enabledBugbot 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. |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
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
pastedSize, shared with the composer card).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.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-paragraphandpasted-paragraph-openare new;pasted-chip,pasted-chip-open) andagent-pane.composertext-pasted-paragraph. Before is feat-cmux-next at 02e1c0b, before #36276; after is this head.Tests
Red/green:
bun test test/user-prompt-collapse.test.tsx -t one-paragraphfails 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
vp lintandvp fmton the changed files.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