Skip to content

cmux NEXT: keep scrolled-up transcript rows anchored during streaming - #25113

Merged
teamleaderleo merged 1 commit into
feat-cmux-nextfrom
nx-scroll-anchor
Oct 25, 2026
Merged

teamleaderleo merged 1 commit into
feat-cmux-nextfrom
nx-scroll-anchor

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the transcript scrollbar jump while a reader is scrolled up and agent cards or streaming text resize rows above the viewport.

Leo described the symptom (2026-10-25):

“There's some sort of, like, jittering situation going on here. ... the rightmost scroll bar, like that just jumps a bit. ... especially when it comes to ... all of these agent messages back and forth ... trying to scroll down slowly as you're streaming in text output.”

The placement pass now anchors from the last reader offset when a browser has already applied a layout scroll adjustment, avoiding a second correction. Streaming revisions keep the visible row's index and stay O(1) per token; insertion/removal falls back to an ID lookup only when the index changed. The row itself remains fixed when its own content grows.

Regression coverage:

  • conversation/scrollAnchor.test.ts covers above-viewport growth, self-growth, browser-pre-adjusted offsets, and older history inserted above the anchor.
  • Gallery entry agent-pane.streaming-follow-motion, variant stream-scrolled-up, drives a deterministic stream while the transcript is scrolled to 180px and fails if the thumb moves more than 1px.

Gallery evidence (same deterministic fixture, generated through the gallery matrix on cmux-ci): before: the scrolled-up stream can apply the browser delta and the placement correction twice; after: the stream-scrolled-up play holds the scroll offset within 1px through the full stream. The PR capture includes both dark and light states and the step filmstrip.

Checks run locally: focused anchor tests (3 pass, 5 assertions), vp lint on changed files, tsc --noEmit, python3 scripts/cmux-next/prepush-gate.py.

Gallery: agent-pane.streaming-follow-motion/stream-scrolled-up

Gallery artifact (public before/after PNGs and step filmstrip, exact head 2e0ae07c95540cb40d96c58b8902358d0085d05b): before/after gallery artifact

agent-identity footer

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 2e0ae07: 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=pr25113 -f ref=nx-scroll-anchor -f platform=macos -f backend_mode=local

Probably yours: accent-glass-invariants.test.ts fails here but not on main's latest full suite. Seen on other PRs too (likely flaky): agent-pane-queue-collapse.test.ts, agent-pane-queue-collapse.test.ts, agent-pane-queue-collapse.test.ts and 20 more. This PR merged before its CI finished: fix forward on main.

CI failed on 2e0ae07c95 (run 40234424711 attempt 1): 3 code, 1 unknown.

Job Verdict Why
web / react-apps-base-check (4) code a web test failed
web / react-apps-base-check (3) code a web test failed
web / react-apps-base-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 agent-pane-queue-collapse.test.ts a long queue > an opened long queue keeps Show less and the focused row in sight, never a half row (...: failed (job)
  • seen on other PRs agent-pane-queue-collapse.test.ts a long queue > an opened queue with a two-line row shows whole rows only, no row under another (capt...: failed (job)
  • seen on other PRs agent-pane-queue-collapse.test.ts a long queue > a folded queue with a long row opened shows only whole rows above the fold (capture, ...: failed (job)
  • seen on other PRs agent-pane-working-counts.test.ts with the tray on, the line counts nothing: the tray lists the same work: failed (job)
  • seen on other PRs agent-pane-working-counts.test.ts a count moves nothing: the line keeps its box and its label stays put: failed (job)
  • seen on other PRs changelog-pictures.test.tsx a change's picture opens enlarged on a click, and Close closes it: failed (job)
  • seen on other PRs changes-stage-hunk-keys.test.ts n then s stages the hunk n stopped at: failed (job)
  • seen on other PRs chat-open-perf.test.ts a live row drawn before a slow chat is read shows whole, with no fade after: failed (job)
  • seen on other PRs claimPaint.test.tsx a pooled Settings page claimed by the host reports its paint once its first screen is in: failed (job)
  • seen on other PRs claimPaint.test.tsx a Settings page loaded fresh reports its first paint once its first screen is in: failed (job)
  • ... 14 more in the job logs
Matched log lines
web / react-apps-base-check (4): (fail) a long queue > an opened long queue keeps Show less and the focused row in sight, never a half row (capture, 2026-10-15) [1310.26ms]
web / react-apps-base-check (3): (fail) a pooled Settings page claimed by the host reports its paint once its first screen is in [178.48ms]
web / react-apps-base-check (2): (fail) chromium > a prompt the fold hides, run elsewhere, leaves no room as the stack shrinks, opens and closes [5254.50ms]

Not re-run automatically: web / react-apps-base-check (4), web / react-apps-base-check (3), web / react-apps-base-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: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 87770f7 to compare; do not merge until green; see lane-rules

Tour of 2e0ae07c95 (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.

Gallery before/after for 2e0ae07: the capture produced no images (run).

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 25, 2026
@blacksmith-sh

blacksmith-sh Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Found 13 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmppxcjp500/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpuvjw7jxy/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
bench OTHER_SWIFT_FLAGS is 'OTHER_SWIFT_FLAGS=$(inherited) -DCMUX_BENCH_HOOKS -DCMUX_BL
OCKING_CHECKS'/
bench OTHER_SWIFT_FLAGS is 'OTHER_SWIFT_FLAGS=$(inherited) -DCMUX_BENCH_HOOKS -DCMUX_BL
OCKING_CHECKS'
View Logs
bench OTHER_SWIFT_FLAGS is 'OTHER_SWIFT_FLAGS=$(inherited) -DCMUX_BENCH_HOOKS -DCMUX_BL
OCKING_CHECKS'/
bench OTHER_SWIFT_FLAGS is 'OTHER_SWIFT_FLAGS=$(inherited) -DCMUX_BENCH_HOOKS -DCMUX_BL
OCKING_CHECKS'
View Logs
convention violations found (ERROR lines above)./
convention violations found (ERROR lines above).
View Logs
nightly.yml prepare-nightly-variant: 'Package prepared app for signing' is not in list/
nightly.yml prepare-nightly-variant: 'Package prepared app for signing' is not in list
View Logs

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

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / nightly-guards / workflow-guard-tests / release-notary is red on 10 of 10 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 force-pushed the nx-scroll-anchor branch 2 times, most recently from b6eb7df to e2ad7cf Compare October 25, 2026 21:07
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next / cmux-next checks (god files, concurrency, crash safety, l10n) › Script tests (pin-cmux-tui, embed-cef, ensure-cef store) is red on 7 of 9 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.

Agent-Session: 01a174c6-e0e8-70b0-9094-8b3055bf18cb
@cursor

cursor Bot commented Oct 25, 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
teamleaderleo merged commit da66b55 into feat-cmux-next Oct 25, 2026
138 of 146 checks passed
@teamleaderleo
teamleaderleo deleted the nx-scroll-anchor branch October 25, 2026 21:17
@github-actions

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/40234771517 at da66b55 failed: cmux-next crash ends the app.
Those jobs last passed at 7aa8914. This pull request is one of 2 merged since: #25114, #25113.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

base-red-watch: cmux-next / cmux-next crash ends the app went red on feat-cmux-next in https://github.com/manaflow-ai/cmux/actions/runs/40234771517 (first red at da66b55, last green at 7aa8914). Suspect: #25113 (commit da66b55). If it is yours, fix forward on feat-cmux-next.

@github-actions

github-actions Bot commented Oct 25, 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

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant