Skip to content

Agent chat: a failed tool call says failed in red; the hover check and time fade like the message row - #24049

Merged
teamleaderleo merged 7 commits into
feat-cmux-nextfrom
tp/tool-status-on-hover
Oct 22, 2026
Merged

teamleaderleo merged 7 commits into
feat-cmux-nextfrom
tp/tool-status-on-hover

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Leo (2026-10-21): "let's make sure all this is working like latter stuff with the good thinking and collapsible tool calls let's only show the green/red checkmark + time on hover for ours".

Leo-ask: ask-3930f0862d (this lane's part: tool-call status on hover; the glimmer and live line belong to the activity-indicators lane).

#23081 already hides a finished tool call's green check and run time until the row is hovered or focused (opacity, so nothing moves). That change is on feat-cmux-next but not in Leo's nightly (03960f5), so his app still shows them at rest. Two gaps remained, which this fixes:

Running rows are unchanged: they keep their spinner, and a running call has no time to hide.

Testing

webviews/test/transcript-codex-turn.test.tsx, two new tests:

  • a failed non-shell ToolRow renders cv-tool__failed and no check; a running CommandRow renders the spinner and no check or time;
  • the stylesheet fades the check and time with the message hover row's variables.

The existing test there already pins the hover-only rule (opacity: 0 at rest, 1 on hover or focus) and now also checks that the red failure mark is never hidden.

Gallery: agent-pane.transcript states tool-hover-meta-lone (at rest) and tool-hover-meta-lone-hovered. Their plays check that a finished call's check and time are hidden at rest, that the failure word is red and shown, and that hovering brings in the check and time.

Observed / Not run

  • The first commit holds the new tests and the fix comes after it. The gallery plays passed on the gallery host's Chromium for both states, light and dark. I did not run bun test locally: cosmic-gray's hook blocks test runs on Leo's Mac (load 245). CI's web tests run them on the head.

Changelog

Changed: In the agent chat, a failed tool call says "failed" in red, and a finished call's check and time fade in on hover.

Proof

Synthetic gallery fixtures (agent-pane.transcript states tool-hover-meta-lone and tool-hover-meta-lone-hovered), rendered by the gallery's own plays in headless Chromium. Before = the same fixtures on base code.

Before After
At rest, dark before rest dark after rest dark
Hovered, dark before hover dark after hover dark
At rest, light before rest light after rest light
Hovered, light before hover light after hover light

At rest the finished fetch shows no check or time in both. The failed fetch's "failed" was grey before and is red after. On hover, the check and "1.2s" fade in; the failure is unchanged.

No capture: webview-only change (agent chat CSS and TSX), shown in the Linux gallery above.

Checklist

  • Behavior changes have added or updated tests
  • Localization: no new strings (reuses tools.failed)

Agent session: cosmic-gray

🤖 Generated with Claude Code

teamleaderleo and others added 2 commits October 21, 2026 18:36
…e's spinner, the hover fade

Leo (2026-10-21): "let's only show the green/red checkmark + time on hover for ours".
Red before the fix: a failed call that is not a shell says "failed" in the dim
detail color, and the hover check and time snap in with no fade. Gallery states
tool-hover-meta-lone(-hovered) show a finished, a failed and a running call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16030-bf28-7072-b1f6-b83bbd0beacc&host=cosmic-gray
…check and time fade like the message row

Leo (2026-10-21): "let's only show the green/red checkmark + time on hover for ours".
#23081 already hides a finished call's check and time until hover or focus. Two
gaps remained: a failed call that is not a shell (a fetch, a read, an MCP call)
said "failed" in the dim detail color, so its failure blended in at rest; it now
uses the red failure color, as a command's "exit 1" and a group's "1 failed" do.
And the check and time snapped in; they now fade as a message's hover row does
(#23769): in after 100ms over 120ms, at once from the keyboard, out in 80ms,
none under Reduce Motion. Running rows keep their spinner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16030-bf28-7072-b1f6-b83bbd0beacc&host=cosmic-gray
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 22, 2026
@blacksmith-sh

blacksmith-sh Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Found 11 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmp7cq1o6i7/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpr8shm38j/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
convention violations found (ERROR lines above)./
convention violations found (ERROR lines above).
View Logs
nightly cmux-tui resolve/nightly cmux-tui resolve View Logs
test_every_submodule_free_checkout_on_an_owned_runner_resets_submodules (main.Reuse
dWorkspaceSubmodules.test_every_submodule_free_checkout_on_an_owned_runner_resets_submo
dules)/
test_every_submodule_free_checkout_on_an_owned_runner_resets_submodules (main.Reuse
dWorkspaceSubmodules.test_every_submodule_free_checkout_on_an_owned_runner_resets_submo
dules)
View Logs
test_every_submodule_free_checkout_on_an_owned_runner_resets_submodules (main.Reuse
dWorkspaceSubmodules.test_every_submodule_free_checkout_on_an_owned_runner_resets_submo
dules) (job='web-bundles')/
test_every_submodule_free_checkout_on_an_owned_runner_resets_submodules (main.Reuse
dWorkspaceSubmodules.test_every_submodule_free_checkout_on_an_owned_runner_resets_submo
dules) (job='web-bundles')
View Logs

...and 1 more test failures. View all on Blacksmith

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

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 3d2fcb2: 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=pr24049 -f ref=tp/tool-status-on-hover -f platform=macos -f backend_mode=local

Gallery before/after for 3d2fcb2: 16 states rendered, 8 images differ, 80 more touched states not rendered (picked by the Gallery: line in the PR body). Images are in the run's artifact, not on this public PR.

gh run download 39740151091 -R manaflow-ai/cmux -n gallery-advisory-24049-3d2fcb28ffe9bdf08c7f2698e36bf466da44c23a (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.transcript/tool-hover-meta-lone Apple System Colors Light new 0% pr-body
agent-pane.transcript/tool-hover-meta-lone Apple System Colors new 0% pr-body
agent-pane.transcript/tool-hover-meta-lone-hovered Apple System Colors Light new 0% pr-body
agent-pane.transcript/tool-hover-meta-lone-hovered Apple System Colors new 0% pr-body
agent-pane.transcript/conversation Apple System Colors Light unchanged 0% pr-body
agent-pane.transcript/conversation Apple System Colors unchanged 0% pr-body
agent-pane.transcript/footer-actions-left Apple System Colors Light unchanged 0% pr-body
agent-pane.transcript/footer-actions-left Apple System Colors unchanged 0% pr-body
agent-pane.transcript/footer-actions-right Apple System Colors Light unchanged 0% pr-body
agent-pane.transcript/footer-actions-right Apple System Colors unchanged 0% pr-body
agent-pane.transcript/github-references Apple System Colors Light unchanged 0% pr-body
agent-pane.transcript/github-references Apple System Colors unchanged 0% pr-body
agent-pane.transcript/tasks Apple System Colors Light unchanged 0% pr-body
agent-pane.transcript/tasks Apple System Colors unchanged 0% pr-body
agent-pane.transcript/thinking Apple System Colors Light changed 0.0416% pr-body
agent-pane.transcript/thinking Apple System Colors changed 0.0135% pr-body
agent-pane.transcript/streaming Apple System Colors Light unchanged 0% pr-body
agent-pane.transcript/streaming Apple System Colors unchanged 0% pr-body
agent-pane.transcript/copy-last-code-block Apple System Colors Light unchanged 0% pr-body
agent-pane.transcript/copy-last-code-block Apple System Colors unchanged 0% pr-body
agent-pane.transcript/archive-chat-key Apple System Colors changed 0.0632% pr-body
agent-pane.transcript/archive-chat-key Apple System Colors Light unchanged 0% pr-body
agent-pane.transcript/fork-any-turn Apple System Colors Light unchanged 0% pr-body
agent-pane.transcript/fork-any-turn Apple System Colors unchanged 0% pr-body
agent-pane.transcript/fork-any-turn-codex Apple System Colors Light unchanged 0% pr-body
agent-pane.transcript/fork-any-turn-codex Apple System Colors unchanged 0% pr-body
agent-pane.transcript/fork-latest-turn-only Apple System Colors Light unchanged 0% pr-body
agent-pane.transcript/fork-latest-turn-only Apple System Colors unchanged 0% pr-body
agent-pane.transcript/mark-unread-menu Apple System Colors Light changed 0% pr-body
agent-pane.transcript/mark-unread-menu Apple System Colors unchanged 0% pr-body
agent-pane.transcript/harness-health-acpmux Apple System Colors Light unchanged 0% pr-body
agent-pane.transcript/harness-health-acpmux Apple System Colors unchanged 0% pr-body

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

Passes: CI passes on 3d2fcb28ff.

CI passes on 3d2fcb28ff (run 39748119318 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.

red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: red check: Checks job structure (+1 more) is not red on the base ae480d7; do not merge until green; see lane-rules

Tour of 3d2fcb28ff (run): no media. The tour did not run: only webview code changed (5 path(s)), which the gallery advisory run checks in Linux Chromium on the pull request (its artifact holds any captures); add the media-tour-mac label, then re-add media-tour, to tour it on a Mac.

…first

The running turn's finished calls sat folded, so the plays never found a check
(gallery health: waitFor did not hold). The fixture is now an ended turn, as
tool-hover-meta's is; the running spinner stays covered by the unit test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16030-bf28-7072-b1f6-b83bbd0beacc&host=cosmic-gray
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-mz0sq created for this PR by the cmux coordinator.

@cursor

cursor Bot commented Oct 22, 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 8c2d78c

I read the code only. I did not run tests or the gallery on this host. I reviewed the full diff against feat-cmux-next. The only change since 6b0829d is the gallery fix.

Blocking: none at this head. At 6b0829d the lone-call plays would have failed. Both fetch activities sit around a short interim note, so mergeShortNotes joins them into one run, and codexRuns plus shouldFoldToolRun fold that run under a "Searched the web" line (groups = item, note, item; 2 tools). That left .cv-command__ok inside a closed fold, and the waitFor timed out. 8c2d78c opens that run with openGroupedRun, which fixes it.

Checked and fine:

  • --cv-actions-* are declared on :root in conversation.css itself (conversation.css:61-64). Every host that loads the .cv-tool rules gets them too, and nothing else overrides them.
  • Transitions (conversation.css:1886-1896): the base rule (0,2,0) gives an 80ms fade-out. :hover (0,3,0) fades in with a 100ms delay. :focus-visible (0,3,0) comes later, so focus wins over hover and fades in at once. Opacity is not affected, and no other rule sets a transition on .cv-command__ok or .cv-command__time.
  • .cv-tool__failed already exists for group failure counts (ToolGroupRow.tsx:95, McpCallRows.tsx:51). Its only other rule is the shimmer keep-color rule (conversation.css:1611), which applies only to running rows and keeps the red. Nothing in tests, gallery or other code expects cv-tool__detail on a failed call row. The remaining cv-tool__detail uses are in SubsessionCallCard.
  • Plays: a lone fetch is an item group, so it renders as ToolRow → div.cv-tool with .cv-command__ok and .cv-command__time. A failed fetch gets .cv-tool__failed and no check. Newly mounted nodes compute to opacity 0 with nothing to transition from. The trusted click leaves the pointer on the run's summary button, which contains no meta. --agent-danger has a fallback (shared/styles.css:29), so the color comparison holds. In the hover play, waitFor re-checks every frame and has a 5s cap, far more than the 220ms needed.
  • Tests: the old opacity: 0 and opacity: 1 regexes still match the first block. The new transition regexes match the CSS text exactly. The new negative cv-tool__failed regex stops at the first {, so it passes against both existing rules. The failed-ToolRow test would fail on base (it was cv-tool__detail there).

Non-blocking notes:

  • A failed lone shell (ToolRow with a command) now also says "failed" in red. That fits the brief but is broader than "non-shell".
  • The CSS test doesn't assert the :focus-visible rule or the prefers-reduced-motion wrapper.
  • transcript.gallery.ts (hover play) calls the global getComputedStyle while the rest-state play uses ctx.document.defaultView. Both work because playRunner runs in the frame, but one style would be cleaner.
  • As with the existing tool-hover-meta play, the hovered state only shows in the matrix runner (trusted input). The shell's synthetic hover doesn't trigger :hover.

…tus-on-hover

# Conflicts:
#	webviews/src/agent-session/acpmux/conversation/ToolRow.tsx
#	webviews/src/agent-session/acpmux/conversation/transcript.gallery.ts
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / nightly-guards / workflow-guard-tests / release-notary is red on 16 of 20 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6.1-sol, xhigh): SHIP at 2ed85d0

  • No blocking correctness findings. The fade variables resolve from :root; focus-visible overrides the hover delay; reduced motion skips the transitions. The selectors leave failure markers and existing spinners visible, retain metadata space, and preserve background/group/message behavior. The WriteLabel integration is intact.
  • Non-blocking coverage note — webviews/src/agent-session/acpmux/conversation/transcript.gallery.ts:1550: the hover assertion checks only metadata nodes that exist. Removing the elapsed-time span would still pass. Assert that both the check and time are present before checking their opacity.
  • Validation: static review of the supplied merge-base diff, whole requested head files, related rendering/disclosure helpers, and REVIEW.md. No builds, test suites, or gallery plays were run, as requested.

@teamleaderleo teamleaderleo added the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Oct 22, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6.1-sol, xhigh): SHIP at 3d2fcb2

  • No blocking correctness findings. ToolRow.tsx:107 and McpCallRows.tsx:107 keep failures red at rest; conversation.css:1931-1952 hides only checks/times, preserves layout, and gives keyboard focus precedence over the hover delay. Spinners and failure markers remain visible.
  • Merge recheck: all five PR-changed files are byte-identical to reviewed head 2ed85d0e3c8979519f8307f75f737144d7ecb56e, including the retained WriteLabel. The base-merge delta adds no conflicting status-class uses or transitions; command, background, group, and message-row behavior remains compatible.
  • transcript.gallery.ts:565 and :1547: the short note merges both fetches into one run; the plays reveal actual call rows before checking rest/hover opacity. The unit tests and gallery assertions have no identified failure or vacuous pass for these fixtures.
  • Read-only static review, including REVIEW.md. Builds, test suites, and gallery plays were not run, as requested.

(Posted by the PR's lane on the reviewer's behalf: the Codex session on cmux16 hit GitHub's rate limit when posting.)

@teamleaderleo teamleaderleo added ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds and removed ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds labels Oct 22, 2026
@teamleaderleo
teamleaderleo merged commit 7b17e7d into feat-cmux-next Oct 22, 2026
@teamleaderleo
teamleaderleo deleted the tp/tool-status-on-hover branch October 22, 2026 10:58
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant