Skip to content

Session Info scoped to a subagent holds still while the reader scrolls - #31176

Merged
cmux-bot[bot] merged 1 commit into
feat-cmux-nextfrom
subagent-session-info-held-scroll
Nov 1, 2026
Merged

cmux-bot[bot] merged 1 commit into
feat-cmux-nextfrom
subagent-session-info-held-scroll

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #29639.

The right-hand session card reads the chat's rows through useHeldWhileScrolling (summary/heldWhileScrolling.ts, #29282), but Session Info scoped to a subagent read snapshot.subagentViews[shown] live, so it could change under the reader's own scroll as history paged in. Those rows now go through the same hold, keyed by chat and subagent: the rows from when the scroll began stay until it settles, then the paged-in rows land once. Another subagent or another chat takes its rows at once.

Only what Session Info lists is held; the header's Background tasks count stays live, as the chat's transcriptWork count already does.

Test: webviews/test/summary-held-while-scrolling.test.tsx adds a case for the subagent key (held mid-scroll, applied on settle, another subagent at once). Fast checks plus bun run check passed on cmux-ci: https://github.com/manaflow-ai/cmux/actions/runs/41332644983

Risk: small, one hook call in App.tsx feeding one prop.

Agent session: agent session

🤖 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

Fixes #29639. Subagent-scoped Session Info kept reading snapshot.subagentViews live, so history paging in under the reader's scroll changed its rows mid-gesture. It now uses the same held-while-scrolling mechanism as the chat's session card, keyed by chat and subagent: rows from when the scroll began stay until the scroll settles, then the paged-in rows land. Another subagent or chat takes its rows at once. Only the listed rows are held; the header's Background tasks count stays live.

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

View guided diff Turn on auto-fix

…olls

The session card already reads the chat's rows through
useHeldWhileScrolling; the subagent-scoped Session Info read
snapshot.subagentViews live, so history paging in under the reader's
scroll changed it mid-gesture. Hold those rows too, keyed by chat and
subagent. Fixes #29639.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-92fa78a91e29868c5eaa
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

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

Review e901865: 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=pr31176 -f ref=subagent-session-info-held-scroll -f platform=macos -f backend_mode=local

Gallery before/after for e901865: 16 states rendered, 0 images differ, 1210 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 41333256056 -R manaflow-ai/cmux -n gallery-advisory-31176-e9018653b884ba7f661a68de933429bf41d3270a (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.chat-width/standard Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/standard Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/short-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/short-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/wide-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/wide-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/no-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/no-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-40 Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-40 Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-56 Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-56 Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-72 Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-72 Apple System Colors unchanged 0% own App.tsx
agent-pane.continuation-spacing/shipped Apple System Colors Light unchanged 0% own App.tsx
agent-pane.continuation-spacing/shipped Apple System Colors unchanged 0% own App.tsx
agent-pane.continuation-spacing/two-thirds Apple System Colors Light unchanged 0% own App.tsx
agent-pane.continuation-spacing/two-thirds Apple System Colors unchanged 0% own App.tsx
agent-pane.continuation-spacing/half-tucked Apple System Colors Light unchanged 0% own App.tsx
agent-pane.continuation-spacing/half-tucked Apple System Colors unchanged 0% own App.tsx
agent-pane.continuation-spacing/before Apple System Colors Light unchanged 0% own App.tsx
agent-pane.continuation-spacing/before Apple System Colors unchanged 0% own App.tsx
agent-pane.copy-controls/output Apple System Colors Light unchanged 0% own App.tsx
agent-pane.copy-controls/output Apple System Colors unchanged 0% own App.tsx

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); base red: the same failure on the base 3545d99; does not block

Shipped in:

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent opus-5.5 medium): SHIP at e901865

Hooks order safe (flat block beside cardRows/cardEdit); key chat+subagent takes a new subagent or chat at once; Session Info's chat rows already come from the held cardSnapshot; memo deps correct.

Follow-ups:

  • [follow-up] An App-level check (or mock scene) that subagent-scoped Session Info reads the held rows; the new test drives the hook only.
  • [follow-up] The header Background tasks count stays live while the panel is held (same as the chat's transcriptWork); note it in heldWhileScrolling.ts if intended.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@blacksmith-sh

blacksmith-sh Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Found 8 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmp1wl7bf__/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmpideed3f9/summary-missing.json (live):/summary-missing.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_runtime_added_app_capabilities_are_runtime_only (main.StaticCapabilityRuntimeO
nlyTests.test_runtime_added_app_capabilities_are_runtime_only)/
test_runtime_added_app_capabilities_are_runtime_only (main.StaticCapabilityRuntimeO
nlyTests.test_runtime_added_app_capabilities_are_runtime_only)
View Logs
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
View Logs

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

@cmux-bot
cmux-bot Bot merged commit 5a9910f into feat-cmux-next Nov 1, 2026
173 of 186 checks passed
@cmux-bot
cmux-bot Bot deleted the subagent-session-info-held-scroll branch November 1, 2026 18:01

This branch was previously deployed

1 inactive deployment
ci-routing-agent — e9018653 Deployed Nov 1, 2026 by teamleaderleo via wait for same-key tree publisher #97032
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