Skip to content

Agent chat: an opened tool run fades its top under the summary line while scrolled - #24263

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
tp/sticky-header-fade
Oct 23, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
tp/sticky-header-fade

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Leo: "in that top section fade would be good"

Leo-ask: ask-cbdc0a8879 (sticky header fade, via claude-sr2)

What changed

An opened run of tool calls ("Read files, ran commands ⌄") lists its calls in a box that scrolls once it passes nine rows (.cv-tool-run). The summary line stays put above that box while the calls scroll under it. Before this change, a row scrolled halfway out was cut flat against the summary line: its top half was clipped, right under the header text.

Now the box's top edge fades out while there are rows above it:

  • ToolRun.tsx attaches the existing useScrollEdges callback ref (summary/scrollEdges.ts) to the list. It sets data-fade-top only while the list is scrolled down from its start.
  • conversation.css .cv-tool-run[data-fade-top] uses the same technique as the transcript's own top edge (.acpmux-scroll[data-fade-top], also 18px): an alpha mask on the scroller, transparent at the top and solid 18px below. Since nothing is painted over the rows, the fade can't cover the summary line's text or chevron, and it can't catch clicks. Because it is a mask and not a gradient, it works the same in light, dark and glass/translucent themes. The scrollbar lane on the right stays fully drawn. With Reduce Transparency the edge stays plain, as the transcript's does.
  • No behaviour changes: same markup, same fold, same scrolling.

Builds on this lane's #24050 (useAnchoredCollapse). That PR changes how ToolRun opens and closes but not the list element, so the two merge cleanly in either order.

Before / after

Gallery state agent-pane.transcript / tool-run-scrolled-fade (synthetic fixtures): an 18-call run, opened and scrolled 3.5 rows so the fourth row sits half under the summary line.

Test

webviews/test/tool-run-scroll-fade.test.tsx:

  • When a run is opened, its list has no data-fade-top at the start. Scrolled 3.5 rows it has the mark, and scrolled back to the top the mark is gone.
  • The fade rule is a mask (mask-image and -webkit-mask-image, transparent to #000 over 18px). It has no background and no pseudo-element over the rows, so it paints nothing and has nothing to catch the pointer. Reduce Transparency clears the mask.

Observed / Not run

  • Observed: the web lint and pre-push gates passed on push. The gallery compare is requested on the fleet gallery host.
  • Not run locally: bun test. cosmic-gray's hook refuses test runs, so the new test runs in CI (cmux-next-web).

No capture: webview-only change; the before/after is the Linux gallery above.

Changelog

  • Fixed: In agent chat, an opened tool run's list now fades out under its summary line while scrolled, instead of cutting a row in half against it.

Agent session: cosmic-gray

🤖 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

Fades the top of an opened tool run's call list while it's scrolled, so a row half scrolled away dissolves under the summary line instead of sitting cut against it.

  • The list marks its top edge via the existing useScrollEdges hook only while rows lie above it, and an 18px alpha mask (the transcript's own top-fade technique) fades that edge.
  • Nothing is painted, so the fade covers no text and catches no clicks; it works in light, dark, and glass themes, while Reduce Transparency keeps the edge plain.
  • A unit test covers the mark being set and cleared and the mask rule itself; a gallery fixture shows the run scrolled 3.5 rows.

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

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits October 21, 2026 23:53
… line while scrolled

Leo: "in that top section fade would be good". The run's call list scrolls past nine rows; a
row scrolled half away sat cut in half against the summary line. The list now marks its top
edge (useScrollEdges) while rows lie above it and fades it with an 18px alpha mask, the
transcript's own top fade, so nothing is painted over the rows.

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
@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 cdd36e5: 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=pr24263 -f ref=tp/sticky-header-fade -f platform=macos -f backend_mode=local

Gallery before/after for cdd36e5: 16 states rendered, 0 images differ, 661 more touched states not rendered. Images are in the run's artifact, not on this public PR.

gh run download 39875439925 -R manaflow-ai/cmux -n gallery-advisory-24263-cdd36e57e216c76a5ef1b4cd6198d9ab716fde95 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.chat-find-bar/empty Apple System Colors Light unchanged 0% own conversation.css
agent-pane.chat-find-bar/empty Apple System Colors unchanged 0% own conversation.css
agent-pane.chat-find-bar/matches Apple System Colors Light unchanged 0% own conversation.css
agent-pane.chat-find-bar/matches Apple System Colors unchanged 0% own conversation.css
agent-pane.chat-find-bar/next-match Apple System Colors Light unchanged 0% own conversation.css
agent-pane.chat-find-bar/next-match Apple System Colors unchanged 0% own conversation.css
agent-pane.chat-find-bar/no-results Apple System Colors Light unchanged 0% own conversation.css
agent-pane.chat-find-bar/no-results Apple System Colors unchanged 0% own conversation.css
agent-pane.diff-panel/last-turn Apple System Colors Light unchanged 0% own conversation.css
agent-pane.diff-panel/last-turn Apple System Colors unchanged 0% own conversation.css
agent-pane.diff-panel/toolbar Apple System Colors Light unchanged 0% own conversation.css
agent-pane.diff-panel/toolbar Apple System Colors unchanged 0% own conversation.css
agent-pane.diff-panel/tree-selection Apple System Colors Light unchanged 0% own conversation.css
agent-pane.diff-panel/tree-selection Apple System Colors unchanged 0% own conversation.css
agent-pane.diff-panel/open-file-error Apple System Colors Light unchanged 0% own conversation.css
agent-pane.diff-panel/open-file-error Apple System Colors unchanged 0% own conversation.css
agent-pane.diff-panel/escape Apple System Colors Light unchanged 0% own conversation.css
agent-pane.diff-panel/escape Apple System Colors unchanged 0% own conversation.css
agent-pane.diff-panel/review-file Apple System Colors Light unchanged 0% own conversation.css
agent-pane.diff-panel/review-file Apple System Colors unchanged 0% own conversation.css
agent-pane.diff-panel/stage-hunk Apple System Colors Light unchanged 0% own conversation.css
agent-pane.diff-panel/stage-hunk Apple System Colors unchanged 0% own conversation.css
agent-pane.diff-panel/more-lines Apple System Colors Light unchanged 0% own conversation.css
agent-pane.diff-panel/more-lines Apple System Colors unchanged 0% own conversation.css
agent-pane.path-chip/file Apple System Colors Light unchanged 0% own conversation.css
agent-pane.path-chip/file Apple System Colors unchanged 0% own conversation.css
agent-pane.path-chip/folder Apple System Colors Light unchanged 0% own conversation.css
agent-pane.path-chip/folder Apple System Colors unchanged 0% own conversation.css
agent-pane.path-chip/outside-lock Apple System Colors Light unchanged 0% own conversation.css
agent-pane.path-chip/outside-lock Apple System Colors unchanged 0% own conversation.css
agent-pane.path-chip/outside-text Apple System Colors Light unchanged 0% own conversation.css
agent-pane.path-chip/outside-text Apple System Colors unchanged 0% own conversation.css

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

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

Tour of cdd36e57e2 (run): no media. The tour did not run: only webview code changed (4 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.

@github-actions github-actions Bot 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 10 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpauhet2vo/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpo8st9790/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
test_base_passes (main.NoticesPairTests.test_base_passes)/
test_base_passes (main.NoticesPairTests.test_base_passes)
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
test_targets_outside_the_app_go_to_the_mac_canary (main.SwiftCanaryFleetCoverage.te
st_targets_outside_the_app_go_to_the_mac_canary)/
test_targets_outside_the_app_go_to_the_mac_canary (main.SwiftCanaryFleetCoverage.te
st_targets_outside_the_app_go_to_the_mac_canary)
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

cmux-next guards / nightly-guards / workflow-guard-tests / release-notary is red on 15 of 15 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

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

teamleaderleo added a commit that referenced this pull request Oct 22, 2026
Picks up #24263's fix (a3feffa) so the CmuxNext tests compile again; at
694c2a2 base's own fast tier and generated-files jobs could not build.
The generated exports keep this branch's side; the PR autofix
regenerates them next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d2d-6918-7232-817c-889154528e09&host=cosmic-gray
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex xhigh, correctness first): SHIP at 4fb0d31

  • No correctness defects found. The stable callback ref attaches useScrollEdges to the actual list and disconnects its ResizeObserver, MutationObserver, and scroll listener when the ref is cleared; the fold animation keeps its separate parent ref.
  • The alpha mask is limited to .cv-tool-run[data-fade-top], preserves the declared right-side scrollbar lane, paints no overlay, and is disabled for both Reduce Transparency paths. It does not cover the summary line or add a click target, and it is theme-independent.
  • The gallery state and jsdom test cover opening, scrolling into the list, and returning to the top, plus the mask and transparency CSS claims. No chat-find or fold interaction defect is evident from this wiring.

@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

Orphaned: no activity for 13 h, and no lane holds a lease on it. The orphan sweep could not merge feat-cmux-next in: conflicts in webviews/src/agent-session/acpmux/conversation/ToolRun.tsx. Listed for a lane to resolve.

…eader-fade

# Conflicts:
#	webviews/src/agent-session/acpmux/conversation/ToolRun.tsx
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex xhigh, correctness first): SHIP at cdd36e5

  • No correctness defects found: the existing useScrollEdges callback ref is attached to the actual scroll container, and its lifecycle follows the fold mount/unmount path.
  • The two mask layers keep the scrollbar lane opaque; the fade is alpha-only, has no overlay or pseudo-element, and is disabled by both Reduce Transparency paths.
  • Fold animation, chat-find opening, light/dark/glass behavior, and the merged failure count remain intact.
  • The jsdom test covers ref-driven edge toggling and the CSS contract; it cannot prove browser pixel rendering or observer teardown, but those are delegated to the existing hook and no defect is exposed by this diff.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next / cmux-next checks (god files, concurrency, crash safety, l10n) › Checks job structure is red on 9 of 14 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
teamleaderleo merged commit 1e33de4 into feat-cmux-next Oct 23, 2026
135 of 140 checks passed
@teamleaderleo
teamleaderleo deleted the tp/sticky-header-fade branch October 23, 2026 03:30
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

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