Skip to content

Agent pane: prompt edit box, recap, error and repo recovery cards on the grid tokens; one media radius - #34378

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
lane/transcript-prompt-card-consistency
Nov 4, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
lane/transcript-prompt-card-consistency

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Leo's ask: "i think we ought to audit the whole tool call/notice/send and recieve message styling esp like see what we can iterate on in the gallery too"

This PR covers the person's prompt rows, the error/system cards and the attachments in the cmux NEXT agent chat transcript. Each fix below makes one of them match the bubble or card it should look like. Tool rows are handled by another PR.

Fixes

  1. Cloud repository recovery line (.cv-repo-recovery, from Cloud: add repository picker and recovery UI #30357). It read --agent-error and --agent-success, which no stylesheet defines, so its #d66 and #5aaf83 fallbacks always drew. It also mixed its own 72% and 55% text inks, used a 5px button radius and had a 2px 0 8px 28px outer margin, and 28 is not one of our columns. Now it uses --agent-status-failure and --agent-status-success, --cv-text-muted and --cv-text-dim, and --ds-radius-control. It sits on the tool text column (padding-inline-start: var(--cv-tool-text-inset)) with no outer margin.
  2. Editing a prompt in place (.cv-user__edit, from cx-ncc.60: edit and resend a past prompt (Claude parity) #19470). The editor had a 16 radius, 12 at the sides, a solid fill with a ring and a fixed min(100%, 560px) width. It now has the bubble's glass (ui-glass plus the bubble's glass variables), its 12 radius, its block padding, 16 at the sides and the bubble's widest width (70%), so opening the editor no longer changes the prompt's shape.
  3. Empty-footer hover buttons and .cv-iconbtn--compact (from Agent chat: even transcript spacing, meta rows that hug their message #22754). Their border-radius: 5px is now var(--ds-radius-control).
  4. Version arrows (‹ n/m ›) (from cx-ncc.61: ‹ n/m › arrows between an edited prompt's versions #19565). The arrows were 12 while every other glyph in that footer row is ROW_ICON (16), and .cv-user__versions added a 2px gap of its own. The arrows are now 16 and the local gap is gone.
  5. Recap card (.cv-recap, from Agent pane: the session recap row when you come back to a Claude chat after 5+ minutes away #33162). It had a 1px solid var(--agent-border) border, 8/8/8/12 padding and an outer margin-block: 4px. It now uses the cards' hairline --cv-card-ring, --grid-cards-padding and no outer margin. model.ts already estimates this row as 24 plus its lines, which now matches the drawn 12 + 12 exactly.
  6. Turn error card (from agent pane: a failed turn shows an error card with its cause and way out #24312). The card arm loses its margin-block: 2px 6px outer margin. In the rail arm, the actions were 21px in; they are now 14px + var(--grid-gap), under the cause's first word. model.ts never counted that margin in its estimate (a footer row is estimated as its button line), so no estimate changes.
  7. One media radius. Sent thumbnails used a literal 12px while reply images and videos used 8. The new --cv-media-radius token now sets the sent thumbnail, its placeholder and failed slot, .cv-img, and chips.css .cv-media. The new gallery entry agent-pane.media-radius puts three options side by side: all 12, all 8, and sent 12 / reply 8 as before. I shipped all 8. The reference (claude/live/composer-image-attachments-grid) shows Claude's thumbnails rounded at about 5% of the tile, and a reply's video already drew at 8. The sent thumbnail keeps its 45% outline (Leo, 2026-10-13/14 in Agent pane: keep a sent prompt's images; bigger, clearer composer thumbnails #20411: dark screenshots looked missing behind a hairline). The reply image's outer margin is unchanged.

Gallery

  • agent-pane.user-bubble#editing (new): plays Edit and shows the editor in place. The existing #running-edit-branches and #finished-original-branch show the arrows.
  • agent-pane.repo-recovery#outcomes (new): the waiting, attached and failed lines in their inks.
  • agent-pane.media-radius (new): compare, all-8, all-12, sent-12-reply-8.
  • Also touched: agent-pane.recap-note#card, agent-pane.turn-error-card, agent-pane.sent-images.

Tests

webviews/test/transcript-prompt-card-tokens.test.ts checks four things:

  • every var() that these card rules read is defined in some stylesheet (red on base: --agent-error, --agent-success);
  • their radii are never literals;
  • the cards add no outer margin;
  • sent thumbnails and reply images both use --cv-media-radius.

Spec sections followed

  • design/transcript-spacing.md "Prompt bubble" (12 radius, 16 at the sides, 70% max width)
  • design/grid.md: radii 4/6/8/12/16; rule 5, "a child never adds outer margin"; the cards' padding and radius
  • design/chat-transcript.md
  • design/foundations.md (status inks)

Reference ids: claude/live/composer-image-attachments-grid, cmux/live/transcript-image-attachment-card.

Follow-ups, left out on purpose: the Chief prompt clamp (Chief area), duration badges, attachment chip radii, ReplyActions dead code, and status text that was proportioned by hand.

Agent session: agent session

🤖 Generated with Claude Code


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


Summary by cubic

Audits the agent chat transcript's prompt edit box, recap and error cards, and Cloud repo recovery line so they draw from design system tokens instead of literals and undefined variables that always drew fallback colors.

Bug fixes

  • The repo recovery line read --agent-error and --agent-success, which no stylesheet defines, so its fallback colors always drew; it now uses the shared status inks and sits on the tool text column with no outer margin.
  • The prompt edit box now uses the bubble's glass via its own --glass-* rules, so the bubble's selectors and shape stay unchanged; it gets a 12px radius and 70% width, so opening it no longer changes the prompt's shape.
  • Sent thumbnails, reply images, and videos share one --cv-media-radius token, shipped at 8px.
  • Recap and turn error cards now use the cards' ring, padding, and radius with no outer margin; rail actions align under the cause's words.
  • Version arrows match the row's 16px glyph, and hover and compact icon buttons use the control radius.
  • Adds gallery arms for the edit box, repo recovery outcomes, and media radius, plus a test that these rules read defined tokens and never literal radii.

Written for commit 97db1c2. Summary will update on new commits.

View guided diff Turn on auto-fix

…the grid tokens; one media radius

- RepoRecoveryCard: shared status inks (the --agent-error/--agent-success it read were never
  defined), muted/dim text tokens, control radius, on the tool text column with no outer margin.
- Prompt edit box: the bubble's glass, 12 radius, block padding and 16 sides, at 70%.
- Version arrows at the row's 16 glyph, no local gap.
- Empty-footer and compact icon buttons at the control radius.
- Recap card: hairline card ring, cards padding, no outer margin.
- Turn error card: no outer margin; rail actions under the cause's words.
- --cv-media-radius (8) for sent thumbnails, reply images and videos; gallery
  agent-pane.media-radius compares 12, 8 and the old split.

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

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 97db1c2: 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=pr34378 -f ref=lane/transcript-prompt-card-consistency -f platform=macos -f backend_mode=local

Gallery before/after for 97db1c2: 16 states rendered, 16 images differ, 1849 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 41761685859 -R manaflow-ai/cmux -n gallery-advisory-34378-97db1c2b230cbe3cc1a42e866b6de2f3075eb6d6 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.access-offer/turn-no-credits Apple System Colors Light changed 5.86% own conversation.css
agent-pane.access-offer/turn-no-credits Apple System Colors changed 5.84% own conversation.css
agent-pane.access-offer/turn-low-credits Apple System Colors Light changed 5.86% own conversation.css
agent-pane.access-offer/turn-low-credits Apple System Colors changed 5.84% own conversation.css
agent-pane.access-offer/turn-no-offer Apple System Colors Light changed 4.96% own conversation.css
agent-pane.access-offer/turn-no-offer Apple System Colors changed 4.93% 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.0529% own conversation.css
agent-pane.activity-line-looks/spinner Apple System Colors changed 0.0489% own conversation.css
agent-pane.activity-line-looks/kind Apple System Colors Light changed 0.0258% own conversation.css
agent-pane.activity-line-looks/kind Apple System Colors changed 0.0231% 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 changed 0.128% own UserBubble.tsx
agent-pane.attachment-source/before Apple System Colors Light changed 0.106% own UserBubble.tsx
agent-pane.attachment-source/corner Apple System Colors changed 0.128% own UserBubble.tsx
agent-pane.attachment-source/corner Apple System Colors Light changed 0.106% own UserBubble.tsx
agent-pane.attachment-source/small Apple System Colors changed 0.128% own UserBubble.tsx
agent-pane.attachment-source/small Apple System Colors Light changed 0.106% own UserBubble.tsx

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

web and size checks: green

Shipped in:

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 4, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude-opus-5-5 medium): BLOCK at a8f411a

Visual verdict: no images attached; the code reads right for the edit box, recap, turn error, repo recovery and media radius changes.

Checked: every new token is defined (--agent-status-failure/-success, --cv-card-ring, --grid-cards-padding/-radius, --ds-radius-control, --cv-media-radius, --cv-text-muted/-dim); the :is(...) rewrites keep the bubble's specificity, so its glass is unchanged; .cv-message__reply > .cv-user__edit { width: 100% } (0,2,0) still beats the new width: 70%; the recap now draws 12 + 12, which is exactly model.ts's 24 + lines. The gallery code types check (componentEntry fields, PromptImage, ctx.hover/click/waitFor). I reproduced the new test's regexes against the head and base CSS. The test is red on base as intended, but two of its assertions also fail at this head:

  • [blocking] every custom property they read is defined: CARDS uses user__edit\b, and \b matches before -, so it also picks up .cv-user__edit-button--send. That rule reads var(--cmux-surface-solid, ...), and no stylesheet under webviews/src defines --cmux-surface-solid (the host or gallery theme sets it from TS). Result: missing = [".cv-user__edit-button--send: --cmux-surface-solid"]. Fix: end the alternation with (?![\w-]), or skip a var() that has a fallback.
  • [blocking] sent thumbnails and reply images share the media radius: rules() filters with pattern.test(match[1]) on the untrimmed selector, and the .cv-img capture is "\n\n\n\n.cv-img " (comments stripped). So /^\.cv-img$/ never matches, bodies is empty, and the assertion is false. Fix: test against match[1].trim().

Follow-ups:

  • [follow-up] The reply-context editor (IncomingMessageCard) now takes the bubble's glass in place of --cv-bubble plus a ring. That looks intended, but it has no gallery arm.

@blacksmith-sh

blacksmith-sh Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Found 5 test failures on Blacksmith runners:

Failures

Test View Logs
main.DeveloperIdAppTests.test_download_prints_the_active_profile_only/
test_download_prints_the_active_profile_only
View Logs
stubs: /System/Library/Frameworks/Security.framework/Versions/A/Security has no stub/
Security has no stub
View Logs
stubs: CoreFoundation.tbd: install-name /System/Library/Frameworks/
CoreFoundation.framework/Versions/A/CoreFoundation, missing 1: ['_CFRetain']/
CoreFoundation, missing 1: ['_CFRetain']
View Logs
stubs: CoreFoundation.tbd: install-name /System/Library/Frameworks/
CoreFoundation.framework/Versions/A/CoreFoundation, missing 1: ['_log2']/
CoreFoundation, missing 1: ['_log2']
View Logs
test_the_type_check_covers_every_webviews_test_file (main.WorkflowShape.test_the_ty
pe_check_covers_every_webviews_test_file)/
test_the_type_check_covers_every_webviews_test_file (main.WorkflowShape.test_the_ty
pe_check_covers_every_webviews_test_file)
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

Review (subagent claude-opus-5-5 medium): SHIP at b66ebd9
Visual verdict: not judged from images; code verdict only (the edit box takes the bubble's glass, 70% width and grid radius; recap, turn error card and repo recovery drop their outer margins; media radius 8 throughout).
Both earlier blockers are fixed. CARDS now ends in (?![\w-]), so .cv-user__edit-button--send and its TS-set --cmux-surface-solid no longer match. rules() now trims the selector before testing it, so /^\.cv-img$/ matches. I ran the test's regexes against the CSS at each revision: all four assertions pass at the head and all four fail on base 912f8ab. The fixed regexes would also have caught the old false positive, and the old rules() matched 0 rules for .cv-img. I skimmed the rest of the diff: ROW_ICON is imported, and --ds-radius-control, --agent-status-* and --cv-card-ring are defined. Nothing new found.
Follow-ups: [follow-up] the narrowed CARDS no longer covers .cv-user__edit-actions, -field or -button for the radius and token checks. Add them by name, with --cmux-surface-solid allowlisted, if that coverage is wanted.

…esign-token baseline

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

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude-opus-5-5 medium): SHIP at d1c61e9

Visual verdict: unchanged by this diff (gallery caption size moves from 12 to var(--text-caption); the rest is formatting).

Checked d1c61e9 against base 912f8ab: every baseline shrink matches a literal the PR removed from conversation.css (border-radius: 5px 3 to 0, gap: 2px 9 to 8, margin: 2px 0 8px 28px and margin-block: 2px 6px gone), and all 858 baseline lines parse and stay compact JSON.

Follow-ups: none.

… messageSurfaces.test.ts reads them

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

cursor Bot commented Nov 4, 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.

…ript-prompt-card-consistency

# Conflicts:
#	webviews/scripts/design-tokens-baseline.jsonl
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude-opus-5-5 medium): SHIP at 97db1c2

Visual verdict: unchanged from the d952d7b review; the base merge changes no rendered UI in this PR.

Checked the merge of feat-cmux-next (5aa0787): the hand-resolved token baseline rows match conversation.css at the head (6 gap: 2px, no border-radius: 5px, one min-height: 36px), and the webviews diff against base is byte-for-byte the PR's own diff from before the merge, so the auto-merged conversation.css and UserBubble.tsx kept the PR's changes and lost nothing from base.

Follow-ups:

  • [follow-up] the bordered message-surfaces gallery arm no longer restyles the prompt editor

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 97db1c2

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

SHIP at 97db1c2

Visual verdict: no introduced regression across all 16 before/after pairs, compared with Claude/ChatGPT transcript patterns.

No actionable correctness findings. Eight source-level checks passed via Node/Babel; Bun and browser tests were unavailable.

Follow-ups: none

@teamleaderleo
teamleaderleo merged commit 0cdb3ce into feat-cmux-next Nov 4, 2026
189 of 195 checks passed
@teamleaderleo
teamleaderleo deleted the lane/transcript-prompt-card-consistency branch November 4, 2026 03:53

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 97db1c2b Deployed Nov 4, 2026 by teamleaderleo via wait for same-key tree publisher #108863
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