Skip to content

Agent chat: tool rows share one column; a hook's block reads "blocked by hook" - #29638

Merged
teamleaderleo merged 4 commits into
feat-cmux-nextfrom
fix/tool-row-hook-block-align
Oct 31, 2026
Merged

teamleaderleo merged 4 commits into
feat-cmux-nextfrom
fix/tool-row-hook-block-align

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Leo, 2026-10-31, on transcript tool rows for Claude Code calls: "WTH IS THIS STUFF" / "WHY IS THERE PRETOOLUSE" / "WHY IS IT ALGINED SO [...] STUFF" / "WHY IS IT RENDERED SO STUFF", and then "WHY THE [...] ARE THESE INDENTED FOR NO [...] REASON".

Design spec: leo-workspace design/chat-transcript.md ("Tool rows: verb column" and "Grouped steps"). This PR replaces two of its settled designs, and the spec update goes with it.

What changes

  1. Hook blocks read like Claude Code desktop. Before, a call that a hook refused (PreToolUse:Bash hook error: Blocked: …) put a raw mono PreToolUse label plus the hook's sentence on a second line under the collapsed row, at its own inset. Now:

    • The row says blocked by hook in the row's error tone, and nothing is drawn under it.
    • When the call is opened, the hook's words show as its output, without the PreToolUse:… hook error: envelope. This covers a Shell block and a non-shell result alike.
    • Find in Chat counts that same text (toolFailure.ts callOutput).
    • Root cause: Agent chat: a failed tool call says what happened in a word and why in one line #24339 added HookName, which printed the hook event before the cause in every arm of tool-error-look.
  2. No fixed-width verb column. The transcript no longer wraps a turn's rows in ToolVerbColumn. That wrapper made every verb as wide as the widest one in the turn ("Ran", "Sent to", "Searched"), which pushed the command far to the right. Each row now reads glyph, verb, then the subject one space after it, as Claude Code does ("Ran sed -n …").

    • ToolVerbColumn stays for the ToolRowColumn gallery entry only.
  3. An opened group's steps are normal tool rows in the transcript's one column. Before, the steps drew inside a bordered card inset by 12px with no glyphs, so step text, background-command rows ("After quota reset, merge … pinned") and failure causes each started at a different x from the group header. Now each step has:

    • its glyph in the header's glyph column
    • its words at the header's text start
    • its mark at the right edge
    • no ring, inset or hairlines around it

    A line under a step or a row (a failure's cause, a thought's text) starts at the row's text column. A new token, --cv-tool-text-inset, replaces six hand-written 22.5px insets.

    • The Claude-desktop card, tree and zebra looks stay as gallery arms behind data-tool-steps-look. Nothing is removed.

Tests

  • New browser test, webviews/test/tool-row-column-browser.test.ts. It runs in dark and light, at 760px and 420px. Its fixture is a commands group holding a blocked call, a failed call and a background command, beside a lone read, a lone failed command and a lone blocked command. It asserts:
    • every row's glyph x and first-text x are equal (within 0.5px; measured 0 / 22.5 on every row)
    • a line under a row starts at the text x
    • the gap after "Ran" is one space (4.5px)
    • every row's right edge is the column's, and no status word is clipped
    • with every row collapsed, no "PreToolUse" text and no hook sentence appear; blocked by hook shows twice
    • when opened, the hook's words show and the envelope does not
  • Updated tool-failure.test.tsx and ToolVerb.test.tsx. The transcript has no verb column now; the column's own tests render it explicitly.
  • cmux-ci test (Linux, Playwright): 92 tests across 11 files, 0 failures, at 8b89bb7. The follow-up commit is in the second run.
  • The design-token baseline shrinks by the three 22.5px paddings this PR removes.

Takes back

Takes back #27896: by default, an opened group's steps no longer sit in a bordered card with no glyphs. They are tool rows in the transcript's one column (Leo, 2026-10-31: "why are these indented for no reason"). The card look is kept as the gallery's card arm.
Takes back #27386: the transcript no longer wraps a turn's rows in the fixed-width verb column, so the words after "Ran" come one space after it (same quote). ToolVerbColumn is kept for the gallery.
Takes back #24339: a hook's block no longer prints the PreToolUse hook name, and its cause no longer appears under the collapsed row (Leo: "WHY IS THERE PRETOOLUSE").
Takes back #28465: the step-card thought styles are now scoped to the card look.
Takes back #28128: its inset is now the shared --cv-tool-text-inset token, with the same value.
Takes back #26696: only for a hook's block, the opened result shows the hook's words without the harness envelope.

Risk

Low: this is CSS and the presentation of the transcript's tool rows. The grouped steps lose the card ring by default. The ring is still in the gallery as card.

Follow-ups (not in this PR):

  • An MCP call blocked by a hook says blocked by hook, but when opened, McpCallDetails still shows the raw response.
  • tools.blocked has no callers now and can be removed with the next catalog sweep.

Agent session: agent session

🤖 Generated with Claude Code

teamleaderleo and others added 2 commits October 31, 2026 13:16
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@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 ca157df: 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=pr29638 -f ref=fix/tool-row-hook-block-align -f platform=macos -f backend_mode=local

Gallery before/after for ca157df: 16 states rendered, 0 images differ, 2704 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 41239652671 -R manaflow-ai/cmux -n gallery-advisory-29638-ca157df63fd553ec2c8f32f13a13981ca78a9fb3 (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 TurnRows.tsx
agent-pane.access-offer/turn-no-credits Apple System Colors unchanged 0% own TurnRows.tsx
agent-pane.access-offer/turn-low-credits Apple System Colors Light unchanged 0% own TurnRows.tsx
agent-pane.access-offer/turn-low-credits Apple System Colors unchanged 0% own TurnRows.tsx
agent-pane.access-offer/turn-no-offer Apple System Colors Light unchanged 0% own TurnRows.tsx
agent-pane.access-offer/turn-no-offer Apple System Colors unchanged 0% own TurnRows.tsx
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.background-activity/duration-columns Apple System Colors Light unchanged 0% own conversation.css
agent-pane.background-activity/duration-columns Apple System Colors unchanged 0% own conversation.css
agent-pane.background-activity/pinned-live-tail-light Apple System Colors Light unchanged 0% own conversation.css
agent-pane.background-activity/pinned-live-tail-light Apple System Colors unchanged 0% own conversation.css
agent-pane.background-activity/pinned-live-tail-dark Apple System Colors Light unchanged 0% own conversation.css
agent-pane.background-activity/pinned-live-tail-dark Apple System Colors unchanged 0% own conversation.css
agent-pane.background-activity/after-latest-message-light Apple System Colors Light unchanged 0% own conversation.css
agent-pane.background-activity/after-latest-message-light Apple System Colors unchanged 0% own conversation.css
agent-pane.background-activity/after-latest-message-dark Apple System Colors Light unchanged 0% own conversation.css
agent-pane.background-activity/after-latest-message-dark Apple System Colors unchanged 0% own conversation.css
agent-pane.background-activity/compact-pill-light Apple System Colors Light unchanged 0% own conversation.css
agent-pane.background-activity/compact-pill-light Apple System Colors unchanged 0% own conversation.css
agent-pane.background-activity/compact-pill-dark Apple System Colors Light unchanged 0% own conversation.css
agent-pane.background-activity/compact-pill-dark Apple System Colors unchanged 0% own conversation.css

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

Shipped in:

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
teamleaderleo and others added 2 commits October 31, 2026 13:27
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-d750cf10922c785efa64
@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 ca157df

An independent Opus subagent reviewed 8b89bb7 and found no blocking issues. Since that commit, the delta is:

  • callOutput: Find counts a hook's words exactly as the row draws them. It is read only for a failed call that never ran, which was the reviewer's follow-up 1.
  • The design-token baseline shrinks.
  • The open thought's caret no longer gets the -4px margin, which was follow-up 4.
  • Formatting.

cmux-ci test (Linux, Playwright) passed 103 of 103 tests across 14 files, plus check:pieces, on this tree (ddf442c). No Swift changed.

Follow-ups:

  • An MCP call blocked by a hook still shows the raw envelope when opened (McpCallDetails).
  • tools.blocked is no longer used anywhere and should be removed from the catalog.

This branch was previously deployed

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