Skip to content

Agent chat: a composer that grows never moves the transcript - #23186

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
cmux/composer-grow-scroll
Oct 21, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
cmux/composer-grow-scroll

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Leo, 2026-10-20: typing a newline in the composer (Shift-Return, or a wrap) makes the transcript's scrollbar jump. Growing the composer must never move the transcript's scroll position, and a view following the latest row stays at the end.

  • agent-pane-scrollbar-full-height.test.ts, sampled after every painted frame while typing five lines with Shift-Return, deleting three, then clearing the draft:
    • "a composer that grows leaves a reader scrolled up where they were on every frame": a reader scrolled up is never moved (no frame's scrollTop differs by more than half a pixel).
    • "a composer that grows and shrinks keeps a followed view at its end on every frame": the latest row stays visible above the composer's card on every frame (no row under the card, never past the end), and it holds the same spot over the card throughout, so the view neither lags a frame nor overshoots.
    • The existing case "a composer that grows keeps the followed end above it on every frame".

Changelog

none

Testing

Command: cd webviews && CMUX_BROWSER_TESTS=1 bun test test/agent-pane-scrollbar-full-height.test.ts (real Chromium).

Observed / Not run

  • CI (Chromium) on 3604d2a and 030cac5: PASS test/agent-pane-scrollbar-full-height.test.ts. The guards pass on the current code, so the same-frame lockstep needs no fix for these cases. This PR adds guards only.
  • Other web / react-apps-check reds on this head are in files this PR does not touch: + is its glyph, named Add with no tooltip (also red on base run 39386215666) and timeouts in composer-location-strip, composer-draft-wrap and composer-type-scale.
  • Not run: WebKit (the test is Chromium-only), and a line made by wrapping instead of Shift-Return.

Agent session: cosmic-gray

🤖 Generated with Claude Code

…hey were

Leo 2026-10-20: a newline in the composer (Shift-Return, or a wrap) makes the transcript's
scrollbar jump. Read up the chat, five lines typed into the composer must not move the transcript's
offset on any painted frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc7-79b0-b869-8ac78b0edd90&host=cosmic-gray
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by composer-scroll on cosmic-gray · session

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 2e6856a: 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=pr23186 -f ref=cmux/composer-grow-scroll -f platform=macos -f backend_mode=local

Unclear: web / react-apps-check (4) failed: no known signature; failed step: Test webviews.

CI failed on 2e6856abd9 (run 39574025151 attempt 1): 2 code, 2 unknown.

Job Verdict Why
web / react-apps-check (1) code a Python test failed
web / react-apps-check (4) unknown no known signature; failed step: Test webviews
web / react-apps-check (2) code a web test failed
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Failures:

  • seen on other PRs gallery-coverage.test.ts gallery coverage > the entries are valid: failed (job)
  • seen on other PRs agent-pane-math.test.tsx each delimiter typesets once math appears: failed (job)
  • seen on other PRs composer-claude-split.test.ts chromium: + is its glyph, named Add with no tooltip: failed (job)
  • seen on other PRs composer-claude-split.test.ts webkit: + is its glyph, named Add with no tooltip: failed (job)
Matched log lines
web / react-apps-check (1): FAIL: test_coverage_base_gap_warns_on_a_pr_changing_the_gallery_format (__main__.ScopedChecksTests.test_coverage_base_gap_warns_on_a_pr_changing_the_gallery_format)
web / react-apps-check (2): (fail) chromium: + is its glyph, named Add with no tooltip [1934.07ms]

Not re-run automatically: web / react-apps-check (1), web / react-apps-check (4), web / react-apps-check (2), web / react-apps-check are not machine failures.

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: web / Web status; NEW: green on the base 0d59bfd; do not merge until green; see lane-rules
red: web / react-apps-check; no finished base run on 0d59bfd to compare; do not merge until green; see lane-rules
red: web / react-apps-check (1); no finished base run on 0d59bfd to compare; do not merge until green; see lane-rules
red: web / react-apps-check (2); no finished base run on 0d59bfd to compare; do not merge until green; see lane-rules
red: web / react-apps-check (4); no finished base run on 0d59bfd to compare; do not merge until green; see lane-rules

CI fast guards failed on 2e6856abd9 (https://github.com/manaflow-ai/cmux/actions/runs/39574025151). It does not block the merge; a red guard merged into main breaks it for every open PR.
The log named no failed step; see the run.

Agents: python3 scripts/ci/guard_attribution.py fix applies the mechanical fixes locally.

Tour of 2e6856abd9 (run): no media. The tour did not run: only webview code changed (1 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 to tour it on a Mac.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

@blacksmith-sh

blacksmith-sh Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Found 5 test failures on Blacksmith runners:

Failures

Test View Logs
test/agent-pane-math.test.tsx/agent-pane-math.test.tsx View Logs
test/agent-pane-math.test.tsx/agent-pane-math.test.tsx View Logs
test/composer-claude-split.test.ts/composer-claude-split.test View Logs
test/composer-claude-split.test.ts/composer-claude-split.test View Logs
test_coverage_base_gap_warns_on_a_pr_changing_the_gallery_format (main.ScopedChecks
Tests.test_coverage_base_gap_warns_on_a_pr_changing_the_gallery_format)/
test_coverage_base_gap_warns_on_a_pr_changing_the_gallery_format (main.ScopedChecks
Tests.test_coverage_base_gap_warns_on_a_pr_changing_the_gallery_format)
View Logs

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

teamleaderleo and others added 2 commits October 21, 2026 01:48
… row holds still

Review of #23186: both per-frame cases now check the card grew by the typed lines and shrank
back, so a missed keystroke cannot pass them flat. The reader case starts well up from the end and
also samples the top of the row in the middle of the view, not only the offset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc7-79b0-b869-8ac78b0edd90&host=cosmic-gray
…poser-grow-scroll

# Conflicts:
#	webviews/test/agent-pane-scrollbar-full-height.test.ts
@teamleaderleo
teamleaderleo merged commit 46694d4 into feat-cmux-next Oct 21, 2026
@teamleaderleo
teamleaderleo deleted the cmux/composer-grow-scroll branch October 21, 2026 09:26
teamleaderleo added a commit that referenced this pull request Oct 21, 2026
The reader guard from #23186 read its frames a fixed 300 ms after
clearing the draft; on a slow runner the last shrink painted later and
the card was still a line taller (CI on 5566a2a). Both grow-and-shrink
guards now wait for the card to reach its first frame's height.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc7-79b0-b869-8ac78b0edd90&host=cosmic-gray
@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

teamleaderleo added a commit that referenced this pull request Oct 21, 2026
…23257)

* test(next): back at the end after the composer grew, the last row is never under the card

Review of #23097: scrolled up, the room under the last row stays as it
was, so the scroller ends short of a composer that grew meanwhile.
Scrolling back to the end must never show the last row under the card,
and Jump to latest must glide there instead of snapping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc7-79b0-b869-8ac78b0edd90&host=cosmic-gray

* test(next): the composer guards sample until the card has shrunk back

The reader guard from #23186 read its frames a fixed 300 ms after
clearing the draft; on a slow runner the last shrink painted later and
the card was still a line taller (CI on 5566a2a). Both grow-and-shrink
guards now wait for the card to reach its first frame's height.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc7-79b0-b869-8ac78b0edd90&host=cosmic-gray

* fix(next): Jump to latest glides to the end after the composer grew

Scrolled up, the room under the last row stays as it was (#23097), so
the scroller ended short of a composer that grew meanwhile, and Jump to
latest snapped to the end: following again gave the room back, and a
followed view's room moves its offset at once. Jump to latest now takes
the room first, out of view, and glides to the end above the card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc7-79b0-b869-8ac78b0edd90&host=cosmic-gray

* fix(next): Jump to latest aims at the committed layout's end

Review of #23257: scrollHeight is 0 under jsdom, so the jump aimed at
the top in transcript-jump-latest.test.tsx. The layout the taken room
just committed gives the same end in the browser. The composer guards
wait for the card's height from before typing, not their first sample.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc7-79b0-b869-8ac78b0edd90&host=cosmic-gray

* test(next): the composer guards take their first frame before the first key

On a slow runner the sampler's first frame landed after the first
Shift-Return, so the card's first height was a line taller than at rest
(CI on 7f70721).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc7-79b0-b869-8ac78b0edd90&host=cosmic-gray

* fix(next): Jump to latest's glide is not snapped to the end on its way

The jump follows again at once, so its first small step read as layout
work and settled at the end, and a layout pass while following did the
same: the glide snapped (CI on 7f70721, one moving frame). While the
glide is in flight its steps are the view following, a layout pass aims
it at the new end, and the reader's input or the landing ends it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc7-79b0-b869-8ac78b0edd90&host=cosmic-gray

* fix(next): a Jump to latest glide reports the latest place and yields to Find

Review of #23257: the glide's steps returned before the kept place was
reported, so a chat reopened after Jump to latest opened where the
reader had been. Its steps now commit before paint and report the latest
place, a Find match or a row reveal ends the glide, and the keyboard
jump test wheels back up as a reader does before its second jump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc7-79b0-b869-8ac78b0edd90&host=cosmic-gray

* webviews: the Jump to latest tests wait for the view to come to rest, not a fixed time

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc7-79b0-b869-8ac78b0edd90&host=cosmic-gray

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant