Repository navigation
Agent chat: a turn that ended on work folds its interim text under Worked for (cx-iwqox) - #20582
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>
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. |
|
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 |
…m text (red) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
|
all web/size checks green |
…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>
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. |
|
|
|
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 |
Gallery212 states changed: agent-pane.transcript/long-code, agent-pane.artifact-panel/closed, agent-pane.artifact-panel/versions, pages.home-channels/channel, pages.settings/browser-group-8, ... · 4 new states · 47 broken states · 107 play checks failed Diff page and renders (the run's 206 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):
701 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/AttachmentViews.tsx - vp fmt webviews/src/pages/home-channels/Composer.tsx - vp fmt webviews/src/pages/home-channels/HomeChannelsPage.tsx - vp fmt webviews/src/pages/home-channels/attachmentService.ts - vp fmt webviews/src/pages/home-channels/icons.tsx Autofix-Run: https://github.com/manaflow-ai/cmux/actions/runs/38580078309
# Conflicts: # webviews/src/pages/home-channels/AttachmentViews.tsx # webviews/src/pages/home-channels/HomeChannelsPage.tsx






Summary
When a turn finishes, everything between the prompt and the final answer should fold into one "Worked for Xs" row, as in the Codex and Claude desktop apps. That broke whenever a turn ended on work instead of text. The answer was simply the turn's last text, so:
Now the answer is the last text only when no tool call follows it (decided per call, so a step that edited and then ran something counts as work) (
answerAtinconversation/turns.ts, used by bothshapeTurnandsettledWithoutSummary). Otherwise the whole body folds, and its label reads "Worked for" or "You stopped after", as before. Other rows after the answer keep the answer open, as today: edits still join the turn's edit card, and render cards, plans, subagent groups, background tasks, notices and thoughts after it don't count as work. Running turns are unchanged.Testing
webviews/test/transcript-worked-fold.test.ts(new) drivesturnView, the transcript's turn-shaping seam. Covered:turnView(thread-turn-keys, long-chat-updates, range-content, minimap-current, jump-latest, viewport-resize, hidden-follow, scroll-restore, turn-error-details), plus the layers, type-scale, status-glyphs, system-blue and text-focus ratchets.vp checkand the browser tests (agent-pane-turn-footer, chat-find). Big-red is under memory pressure; CI runs them on this PR.Changelog
Fixed: Agent chat folds a finished turn's work under "Worked for" even when the turn ended on a tool or was stopped mid-tool
Proof
Same fixture rendered on base and head through the transcript gallery (Chromium, page only).
Before, the interim text stands as the answer with a tool row open below it, and the stopped turn has no fold at all. After, only the fold row shows. Its time now spans the whole turn (36s against 24s, when the fold ended at the interim text). The footer drops Copy because the turn has no answer; before, Copy copied the interim text.
Bead: cx-iwqox
🤖 Generated with Claude Code