Skip to content

Transcript: click anywhere on an edits card's header to expand or collapse it - #29699

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
fix/transcript-whole-header-toggles
Oct 31, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
fix/transcript-whole-header-toggles

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Leo, on the edits card in the transcript ("± Edited MEMORY.md +1 -0"): "this thing i can't click the whole thing to expand/collapse only on the middle strip it's weird and bad"

Takes back #26704: not a revert. Its data-interactive mark on the edits card's title moves to the whole header, which is now the control that owns the click.

What changed

  • Edits card header (EditedFilesCard.tsx): the whole header is now the toggle, edge to edge. That covers its padding, the ± icon, the title, the counts, the empty middle, and the right end past the chevron. A one-file card opens and closes its diff from it, and a folded card (show: collapsed) shows or hides its rows. Before this change only the title's strip and the chevron toggled. View changes and Undo still handle their own clicks. The chevron is still the keyboard and screen-reader control.
  • Hover: the highlight covers the header and nothing else. It goes away while the pointer is on one of the header's own buttons, since those light themselves, and the chevron no longer draws a second highlight inside it. The cursor stays the arrow (cursor: default), as clickable-cursor.test.ts requires; the pointing hand is banned in webviews.
  • The same shape in other rows: an agent message's line (AgentMessageRow.tsx) used to toggle only from its words and its toggle button. Its icon, the gaps and the meta now toggle too, and the old per-span handlers are gone. A disclosure row's line (DisclosureRow.tsx: received messages, agent cards, sub-session calls) now toggles from its leading padding, gaps and trailing space. The sender chip, the open-chat button, Reply and menus keep their own clicks. I checked tool rows, thoughts, Worked for, subagent groups and sent-message lines: each is already one full-width toggle, so they are unchanged.
  • One helper, conversation/headerToggle.ts, holds the rule. A click on the header toggles unless it lands on a control of the header's own (button, link, role=button, menu item, input), comes from a portal, or ends a text selection. Headers carry data-header-toggle, which foldAnchor.ts holds in place while the body folds, the same way it holds a toggle button.

Edits card design reference: design/ has no transcript or edits-card spec yet.

Tests

webviews/test/agent-pane-edited-head-toggle-browser.test.ts runs in real Chromium against the pane's dev entry with a stand-in daemon. For a one-file card it clicks the left padding, the icon, the counts, the empty middle, the right end past the chevron, the top inset, the bottom inset and the top-left corner. Each click must toggle aria-expanded. It then checks that View changes keeps its own click. A second case checks that the hover covers the header but not while View changes is under the pointer, and that the cursor is the arrow.

  • Base (EditedFilesCard.tsx and turnChanges.css at f66a92e, new test on top): fails. The first click ("the left padding") leaves expanded: "false", and the header's hover background stays rgba(0, 0, 0, 0).
  • Head: passes. The fleet ran bun test on headerToggle.test.ts, foldAnchor.test.ts, the new browser test, agent-pane-edited-calm, agent-pane-edited-card-expand, agent-pane-diff-find, transcript-gap-select-browser and clickable-cursor: 140 pass, 0 fail. vp fmt --check is clean at head, and the lint and type check found 0 errors.

Observed / Not run

  • Observed: the fleet cmux-ci test runs above, red at base and green at head.
  • Not run: a native capture. The change is webview-only, and Leo tries the build himself.

Changelog

Fixed: In the agent chat, clicking anywhere on an edits card's header (or a message or disclosure line) now expands or collapses it, not just the middle strip.

risk: normal (webview pointer handling in the transcript only).

Agent session: agent session

🤖 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

Fixes the transcript's edits card so the entire header expands or collapses on click, not just the middle strip; the same full-width toggle now applies to agent message and disclosure row lines.

  • A click toggles unless it lands on one of the header's own controls (View changes, Undo, a sender chip, Reply, a menu) or ends a text selection; a received message's sender keeps its own click to open that session.
  • The chevron stays the keyboard and screen-reader control and no longer draws a second highlight; headers keep data-interactive so gap selection still works and are held in place while their body folds.
  • Adds a unit test for the click rule and a Chromium browser test covering the header's edges and insets, plus a gallery audit entry.

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

View guided diff Turn on auto-fix

teamleaderleo and others added 3 commits October 31, 2026 13:38
The edits card header toggled only from its title strip; now its padding,
icon, counts and gaps toggle too, and the same holds for an agent message's
line and a disclosure row's line. Inner controls keep their own click.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-d750cf10922c785efa64
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-d750cf10922c785efa64
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 5674559: 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=pr29699 -f ref=fix/transcript-whole-header-toggles -f platform=macos -f backend_mode=local

Gallery before/after for 5674559: 16 states rendered, 9 images differ, 1312 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 41248801538 -R manaflow-ai/cmux -n gallery-advisory-29699-56745594d1b6ebf42fcd15f20351fd9adda3ab3d (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.addressed-message/relayed Apple System Colors Light unchanged 0% own IncomingMessageCard.tsx
agent-pane.addressed-message/relayed Apple System Colors unchanged 0% own IncomingMessageCard.tsx
agent-pane.agent-message-row/unicode-boundary Apple System Colors Light unchanged 0% own AgentMessageRow.tsx
agent-pane.agent-message-row/unicode-boundary Apple System Colors unchanged 0% own AgentMessageRow.tsx
agent-pane.agent-message-row/sent Apple System Colors Light changed 0.0232% own AgentMessageRow.tsx
agent-pane.agent-message-row/sent Apple System Colors changed 0.0225% own AgentMessageRow.tsx
agent-pane.agent-message-row/lanes Apple System Colors Light unchanged 0% own AgentMessageRow.tsx
agent-pane.agent-message-row/lanes Apple System Colors unchanged 0% own AgentMessageRow.tsx
agent-pane.agent-message-row/sent-subagents Apple System Colors Light unchanged 0% own AgentMessageRow.tsx
agent-pane.agent-message-row/sent-subagents Apple System Colors unchanged 0% own AgentMessageRow.tsx
agent-pane.agent-message-row/sent-hover Apple System Colors Light changed 0.0069% own AgentMessageRow.tsx
agent-pane.agent-message-row/sent-hover Apple System Colors unchanged 0% own AgentMessageRow.tsx
agent-pane.agent-message-row/sent-opened Apple System Colors Light changed 0.0081% own AgentMessageRow.tsx
agent-pane.agent-message-row/sent-opened Apple System Colors changed 0.0062% own AgentMessageRow.tsx
agent-pane.agent-message-row/sent-opened-long Apple System Colors Light unchanged 0% own AgentMessageRow.tsx
agent-pane.agent-message-row/sent-opened-long Apple System Colors unchanged 0% own AgentMessageRow.tsx
agent-pane.agent-message-row/outcomes Apple System Colors Light changed 0.0079% own AgentMessageRow.tsx
agent-pane.agent-message-row/outcomes Apple System Colors changed 0.0044% own AgentMessageRow.tsx
agent-pane.card-copy/prompt-rest Apple System Colors Light unchanged 0% own IncomingMessageCard.tsx
agent-pane.card-copy/prompt-rest Apple System Colors unchanged 0% own IncomingMessageCard.tsx
agent-pane.card-copy/prompt-hover Apple System Colors Light unchanged 0% own IncomingMessageCard.tsx
agent-pane.card-copy/prompt-hover Apple System Colors unchanged 0% own IncomingMessageCard.tsx
agent-pane.card-copy/prompt-copied Apple System Colors Light unchanged 0% own IncomingMessageCard.tsx
agent-pane.card-copy/prompt-copied Apple System Colors unchanged 0% own IncomingMessageCard.tsx
agent-pane.card-copy/message-rest Apple System Colors changed 0.0904% own IncomingMessageCard.tsx
agent-pane.card-copy/message-rest Apple System Colors Light unchanged 0% own IncomingMessageCard.tsx
agent-pane.card-copy/message-hover Apple System Colors changed 2.82% own IncomingMessageCard.tsx
agent-pane.card-copy/message-hover Apple System Colors Light unchanged 0% own IncomingMessageCard.tsx
agent-pane.card-copy/message-copied Apple System Colors Light unchanged 0% own IncomingMessageCard.tsx
agent-pane.card-copy/message-copied Apple System Colors unchanged 0% own IncomingMessageCard.tsx
agent-pane.card-copy/quiet-rest Apple System Colors Light unchanged 0% own IncomingMessageCard.tsx
agent-pane.card-copy/quiet-rest Apple System Colors unchanged 0% own IncomingMessageCard.tsx

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

Passes: CI passes on 56745594d1.

CI passes on 56745594d1 (run 41248801605 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

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@blacksmith-sh

blacksmith-sh Bot commented Oct 31, 2026

Copy link
Copy Markdown

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
test/pane-english.test.ts/pane-english.test View Logs
test/pane-english.test.ts/pane-english.test View Logs

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

…he edits header's chevron wash

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

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, next-review): SHIP at b5e8b79

SHIP at b5e8b79

Visual verdict: available gallery pairs show no regressions; edited-file states have no retained images, so Leo tries the build.

No findings.

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 b5e8b79: an independent review passed this exact head (next-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

@cursor

cursor Bot commented Oct 31, 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 (subagent, correctness first): SHIP at 5674559

Follow-ups (none blocking):

  • The header-toggle and fold-anchor nested-control lists differ (label, [contenteditable], [data-own-click]). Share one selector.
  • A click on a header's padding to dismiss an open header menu (a received line's ⋯) may also toggle the row. Check this manually.
  • The browser test's inside-header check should also assert that the hit element is not one of the header's own buttons.

@teamleaderleo
teamleaderleo merged commit ee2167f into feat-cmux-next Oct 31, 2026
190 of 195 checks passed
@teamleaderleo
teamleaderleo deleted the fix/transcript-whole-header-toggles branch October 31, 2026 23:03

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 56745594 Deployed Oct 31, 2026 by teamleaderleo via cmux-tui tree preflight #91841
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