Repository navigation
Agent chat: Worked for folds and unfolds with motion (cx-o90g7) - #20610
teamleaderleo wants to merge 16 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rked for A finished turn's answer was simply its last text, so a turn that went on to a tool after that text (or was stopped mid-tool) kept the interim text open as if it were the answer, with the later tool rows drawn unfolded below it, and a cancelled turn showed no fold at all. The answer is now the last text only when no tool call follows it; otherwise the whole body folds, as the Codex and Claude desktop apps fold it. Edits after the answer still join the turn's card, and render cards, plans, subagent groups and notices after it leave it open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…m text (red) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t text Calls after one text segment share an activity row, so the edit exemption on the whole row kept the interim text as the answer whenever a step edited and then ran something (the usual Claude Code ending). Work is now decided per call: any call that is neither an edit nor a render call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cx-o90g7: when a turn ends and its steps fold under "Worked for", and when the reader opens or closes the fold, the rows that stay slide from where they were drawn (translate, --agent-motion-move), the steps that open fade in after the rows below move out of their way, and the ones that close fade out where they were. The header the reader toggled keeps its place: the transcript neither glides nor follows meanwhile. Reduce Motion keeps a short fade only; animation speed off, none. "Working for" sweeps while its clock runs. #foldMotion=fade|none picks the other variants for comparison captures (scripts/agent-pane/fold-motion-tour.mjs records them). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
all web/size checks green |
|
Passes: CI passes on CI passes on Written by |
|
|
|
cmux-next tour of The tour job failed before the tour ran (build or setup); the run log has the output. The tour produced no media. Tours are data in |
…pt/fold-motion # Conflicts: # webviews/src/agent-session/acpmux/App.tsx # webviews/src/agent-session/acpmux/conversation/WorkingFor.tsx
Gallery168 states changed: agent-pane.transcript/long-code, agent-pane.transcript/fork-any-turn, agent-pane.transcript/fork-any-turn-codex, agent-pane.transcript/fork-latest-turn-only, agent-pane.transcript/long-chat, ... · 1 play check failed Diff page and renders (the run's 162 more on the diff page. Live preview (follows this branch; start it with
Play checks failed (0 px anchor movement, 0 layout shift, no frame over 33 ms unless the entry gives a reason):
44 nondeterministic states differed from a second render of the same head (a clock or fixture leak) and are not counted as changes. |
- vp fmt webviews/src/pages/home-channels/cloudHome.ts Autofix-Run: https://github.com/manaflow-ai/cmux/actions/runs/38648870770
…each fold motion moves its rows (red) Leo on #20610 (2026-10-14): - The composer covered the last message's time and Copy/Fork row. The guard reads, with the view where the page leaves it (or scrolled to its end after a fold toggle), how far the last turn's action row (or, while a reply streams, its last line) clears the composer: at least 16px, after the turn ends, after the fold opens and closes, with a six-line draft and while the next reply streams. - The fade option showed nothing. When the reader opens or closes a Worked for fold, every row that changes place must slide there (slide) or fade in there over 120-180 ms (fade, no slide); none animates nothing. red: bun test test/agent-pane-chat-column.test.ts -t 'never under the composer|each fold motion' (builder) -> action row clears by 8px after the turn, -8px after the fold opens/closes; fade leaves assistant-5 and summary-29 jumping with no animation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… option fades Leo on #20610 (2026-10-14): - The transcript's rows are placed under the thread's 16px top padding, but its height (the spacer, and the end the view follows to) left the padding out: the last row ended 16px under the view, and with its own 8px padding the action row's time, Copy and Fork sat 8px under the composer. The height now counts the padding and 12px of room, so the action row clears the composer by 20px. - The fade option only faded the step rows that appeared; the rows the fold moved jumped, and the steps that left faded out under them, so nothing visibly moved. Every row that changes place now fades in at its new place over 120-180 ms (Reduce Motion keeps its 100 ms cap), and the leaving copies are dropped in that mode. - With the true end, a streaming reply's estimate overshoot (fixed the same way in #20697) moved the followed text back each chunk; a row keeps its last drawn height until its new version is drawn. green: bun test test/agent-pane-chat-column.test.ts -t 'never under the composer|each fold motion' -> 2 pass agent-pane-*, transcript-*, chat-find*, queue-* browser tests: 127 pass; the 3 locale first-paint fails need a built Resources/agent-pane bundle (absent on the builder) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nscript/fold-motion
Bugbot needs on-demand usage enabledBugbot 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. |
|
Visual preview of 7d1c6d2: in the maintainers' private review feed. |
…led header keeps its place in every mode (red) From the real-app captures on #20610: the fade option showed one frame of a nearly empty transcript, and with no motion the toggled Worked for header scrolled away. The fold-motion test now ends its chat with a short turn followed at the end, its header in view, and clicks it as the reader does (a DOM click, no scroll into view). It asserts that fade animates no row the fold did not move, and that the toggled header stays where it was in slide, fade and none. The composer guard now reads once its measurement holds for 10 painted frames (the composer grows with a draft and the view follows a frame or more later). red: bun test test/agent-pane-chat-column.test.ts -t 'each fold motion' (builder) -> with no motion the header moves -36px on open, +36px on close Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eader holds with no motion
- fade decided what moved by screen position, so rows the scroll (or a
first placement by estimate) moved faded too, and the transcript read
as empty for a frame. It now compares each row's place in the
transcript (RowFrame's translateY): rows the fold moved fade, others
keep full ink.
- With no motion, arm() returned before recording the toggled header,
so the transcript kept following and the header scrolled away. The
header is now armed in every mode; with no motion the change only
keeps it in place and ends at commit, animating nothing.
green: bun test test/agent-pane-chat-column.test.ts -t 'never under the composer|each fold motion'
-> 15 of 15 under three parallel runs; whole file 10/10 x2; transcript-*, bottom-stack,
follow-live, chat-find: 57 pass; bun run check clean
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pt/fold-motion # Conflicts: # webviews/test/agent-pane-chat-column.test.ts
The #20610 real-app clip of the fade option showed one near-empty frame on opening a fold: the answer the fold moves faded in from nothing with the new steps. A moved row's fade must start above zero opacity. red: bun test test/agent-pane-chat-column.test.ts -t 'each fold motion' (builder) -> assistant-36 and summary-37 fade from 0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opening a fold under the fade option faded the moved answer in from nothing with the new steps, so the view read as near empty for a frame (#20610 real-app clip). A moved row now fades from 0.4 to full; the steps that appear still fade in from nothing. green: bun test test/agent-pane-chat-column.test.ts (builder) -> 10/10 in 6 of 6 runs, two in parallel; bun run check clean Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he same transcript height) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Dead: a SHOW LEO PR from 10-14 with no follow-up, and it conflicts. #20582, which it was stacked on, merged by itself. Reopen and rebase if the Worked for fold motion is still wanted. Closing. |






cx-o90g7. Stacked on #20582 (its commits show here until it lands). SHOW LEO: hold for Leo before merge.
What
The "Worked for" fold moves instead of jumping:
--agent-motion-move, 190 ms ease-out), then the opened steps fade in under it.--agent-motion-out, 80 ms) while the answer slides up into place.Rows are placed absolutely, so nothing animates a height. Each row's
translateruns from where it was drawn to its new place (a FLIP, the way the New Tab list moves). The bottom-pin glide is off while this runs, so the whole pane never slides. A toggled fold keeps its header still and stops following when it opens past the end.Reduce Motion keeps only a short fade (≤100 ms) and no movement. With animation speed off, there is no motion at all.
Variants
For comparison,
#foldMotion=picks the variant:slide: proposed, and the default.fade: rows jump, steps fade.none: no motion.scripts/agent-pane/fold-motion-tour.mjsrecords all three against the mock agent.Captures
Side by side: before (this branch's base, #20582), slide, and fade only. Real speed, then 4× slower. Recorded headless in Chromium against the mock agent on the private builder. I watched them frame by frame.
Full quality: worked-for-motion.mp4
Full quality: worked-for-motion-4x-slower.mp4
Real app (cmux NEXT DEV)
Fleet DEV builds on a capture mini: after = this head (
4152f790a721), before = its base on feat-cmux-next (2a68993bc732). The chat is the app's showcase mock agent (9 steps × 350 ms per turn), at the default animation speed (fast). Each app's agent-pane bundle was checked before shooting:foldMotionis in the head'spane.jsand absent from the base's. Stills are the main window, cropped to the sidebar and chat; the mini's machine name in the composer is blanked.Composer overlap
The end of a long chat (five turns). In the before shots the last turn's time, Copy and Fork row is clipped by the composer's top edge, the multi-line draft included; in the after shots it sits clear of the composer.
Fold states
A still catches the sweep at one point of its pass; in the after clips the highlight moves across "Working for" while the turn runs (the base's label stays flat gray). In the opened shots the fold runs past the end, so the view stops following and shows the jump-to-latest button.
Clips: turn ends and folds, then the fold opens and closes
The slide, fade and none clips are from a DEV build of
284dd5005850, which fixed the fade and none issues the first recording showed; the stills and the base clip are unchanged (the opened still matched on284dd5005850). Each is 8 s: send at 0.3 s, the turn ends and folds at about 3.5 s, open at about 4.7 s, close at about 6.5 s. The mode was set through the agent pane'sregistry.jscustomization (it puts#foldMotion=<mode>on the page and reloads it); no app code changed for the captures.7d1c6d2f2fd9)Watched frame by frame at 60 fps (
284dd5005850):7d1c6d2f2fd9): no near-empty frame on open or close. Rows the fold moves fade from about 0.4 opacity and new steps from 0, settling over about 3 to 5 frames.Verification
bun run checkpasses on the builder.transcript-worked-fold,jump-latest,long-chat-updates.followruns in the browser lane.Changelog
Changed: the agent chat's "Worked for" fold slides open and closed, and a finished turn folds its steps with a short crossfade.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
The agent chat's "Worked for" fold now moves instead of jumping: finished turns fold their steps with a crossfade, and opening or closing a fold slides the rows that stay into place while the toggled header keeps its place on screen. The last turn's time, Copy and Fork rows always clear the composer, even with a long draft or while the next reply streams;
slideis the default, withfade(moved rows fade from 0.4, steps from 0) andnonevariants selectable via#foldMotion=.Also fixes turns that end on a tool call: the interim text now folds with the rest instead of remaining open as the answer, including when an edit runs a tool in the same step.
translate(a FLIP); steps fade in or out where they are, so no height animates and no frame goes empty.agent.message.releasewithdrawal, the background-process registry, and daemon/Chief handoffs.Written for commit 7d1c6d2. Summary will update on new commits.