Repository navigation
Agent chat: opening or closing Worked for or a subagent group slides the rows below and fades its steps - #24514
Conversation
…the rows below sliding and the steps fading Leo (2026-10-21): "these all need animations for expand and collpase!" Opening Worked for inserts whole virtual rows, so the in-row fold can't size it. turnFold.ts plays it instead: - rows below the clicked line slide from where they were drawn (a FLIP on translate); - the steps it reveals fade in; - on close, inert copies of the hidden steps fade out under the rows sliding up. Every row plays on one clock, so rows that mount or unmount mid-fold keep their motion. A second toggle settles the playing fold first and keeps the clicked line on its pixel. Nothing runs with animations off or under Reduce Motion. Reviewed in three Codex xhigh rounds while it was part of #24050. 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
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Gallery before/after for
States
Pick other states with a red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 444f819 to compare; do not merge until green; see lane-rules Tour of |
|
Owned by transcript-parity on cosmic-gray · session |
|
Found 8 test failures on Blacksmith runners: Failures
|
|
Bead |
|
|
…laying one When its timer ended a fold, the transcript still pointed at it, with the rows as placed at the toggle, the tracked row elements and animations, until the next render. Unmount now settles a playing fold too. 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
|
|
… streamed token A MutationObserver started at the toggle runs the pass when the thread's row elements mount or unmount or a row's placement (style, index) changes; a token streamed into a row changes neither. It disconnects when the fold ends (its timer, the next toggle, another chat, unmount). A render only checks in O(1) whether the fold is over. The turn-fold tests move into transcript-fold-anchor.test.tsx, which has the same transcript setup, and a new one counts passes while tokens stream. 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
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
|
|
|
Review (codex xhigh, correctness first): SHIP at dd2b666
|
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo-ask: ask-a5c1976d1c
Leo-ask: ask-d974edac49
Leo-ask: ask-c07aebfca2
Leo-ask: ask-0bfebc52fd
Leo: "and we shuold also have some animation for collapsing and expanding". Also: "these situations when collapsibles get expanded i said earlier last night lawrence was talking about how it shouldnt move your scroll or whatever just expand the area at the bottom and you're in the same place... also this current one seems to shift the expandable area away also these all need animations for expand and collpase!" And: "and thne there were a few animations that didnt quite work for collapsing and expanding wrt tool calls and stufff".
This is the second half of #24050, split out to stay under 800 lines. #24050 (merged) routed every in-row collapsible through
useAnchoredCollapse. Two toggles were left: "Worked for" and subagent groups. Those two add or remove whole virtual rows, so the in-row fold can't size them. On base they open and close in one frame, with only the chevron turning.Scope: motion only. This PR doesn't change what a "Worked for" fold holds (that's
turns.ts, #24300) and doesn't touch the one-row summary for runs of tool calls that another lane is building.What this PR does
conversation/turnFold.tsplays these two toggles on the shared fold token (--cv-fold-duration):translate, which never changes layout, so nothing the virtualizer measures moves), and the steps the fold reveals fade in.watchTurnFold, started at the toggle) watches the thread's row elements mounting or unmounting (childList, no subtree) and each mounted row'sstyleandaria-posinset. Rows are placed bytranslateYfrom their absolute layout top, so a token streamed into a row changes no row's placement and runs no pass. A render only checks, in O(1), whether the fold is over or another chat shows.FOLD_SETTLE_MS), on the next toggle, on another chat, when a pass finds the fold over, or when the transcript unmounts (endTurnFoldthroughfold.stop, from the timer orsettleTurnFold).setTimeout(the token plusFOLD_SETTLE_MS) ends it, and each ghost copy's drop timer is bounded by the same end.settleTurnFoldfinishes them on the next toggle, another chat or unmount.data-agent-motion="off"or a 0 ms token, or without Web Animations. In those cases the fold opens and closes at once.Changelog
Frame strips
These are gallery fixtures, captured with headless Playwright at 760x640 in the dark theme. The fold token is slowed tenfold to 1800 ms. Each frame label gives ms since the click, the clicked line's y offset (
dy) and the number of running animations;DUPwould mark an element running two at once.Worked for, base (rows snap):

Worked for, head (Chromium, then WebKit):


Subagent group, base:

Subagent group, head (Chromium, then WebKit):


Live side by side (tailnet): https://cmux-lawrences-mac-mini.tail137216.ts.net:18796/compare/tp-fold-turn-motion-c/
Observed / Not run
worked-for-openingandworked-for-closing, each held halfway through its fold.transcript-fold-anchor.test.tsx, which shares the jsdom transcript setup. They cover:transcript-fold-anchor-browser.test.tsadds a mid-transcript Worked for case: the line stays within 1 px on open and close, and no ghost is left behind.Agent session: cosmic-gray
🤖 Generated with Claude Code