Skip to content

cmux NEXT: a finished steered turn folds each part's work below its steer - #23771

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
chat/steer-folds
Oct 21, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
chat/steer-folds

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Leo, on nightly 3a63d6d: "HOW DID YOUR THINKING LITERALLY GET REMOVED, THOSE TOOL CALLS?" When a steered turn ended, every tool call and thought seemed to vanish, and under his latest message only the reply showed.

Nothing was deleted; it was moved. Since #22691, shapeTurn put all of a finished turn's work into one "Worked for" fold under the turn's first prompt, above every steer. So the calls that ran after a steer jumped up above it when the turn ended. Leo's Claude turns are mostly steers (his live session: 24 prompts, 19 of them steers), so his latest bubble was left with only the answer under it. Codex turns without steers were not affected.

  • shapeTurn: splits a finished turn into parts: the prompt's, then one per steer. Each part folds its own work under its own Worked for Xs › (worked-<prompt id>, worked-<steer id>), timed from that prompt or steer to where the part ended (its reply, or the next steer). The steer bubble stays where it was. A reply a steer followed stays visible, as before. Only the last part carries the turn's status, so a Stop reads "You stopped after" on the part it stopped.
  • turnFoldFor (Find, a shell row's reveal, message links): opens the fold of the part the row ran in, which is the nearest prompt or drawn steer before it.
  • Shaped-turn cache: keys on every open fold in the turn, not only the prompt's.
  • steeredAnswers, and the steer clause in staysOut, are gone: a steer now opens its own part.
  • Gallery: transcript/steer-ended shows a finished steered turn, and its play opens the steer's fold.

Changelog

  • cmux NEXT: a finished turn you steered now folds each part's work under its own "Worked for" below your message, instead of moving every tool call above it.

Testing

  • transcript-steer-continuous.test.tsx:
    • "once the chain ends, each part folds its own work, the steer's below the steer" replaces the one-fold assertion. It checks the order (fold, reply, steer, fold, answer), the times (40s and 25s), and that the opened folds hold every tool call in the turn.
    • New: "a Claude turn steered twice keeps every call, each folded below the steer it ran after". This is Leo's turn shape. It checks the exact drawn ids closed and open, that one part opens alone, and turnFoldFor for every row.
    • The Find test and the older-page test now expect a fold for each part.

Observed / Not run

  • Observed: the PR's webview test lane runs these files. Focused fleet runs of the seven turn and fold test files are queued at the test-only commit ae1dace (expected red) and at the fix 304e2d2 (expected green); their results go in a PR comment.
  • Not run: no live app capture. The gallery entry transcript/steer-ended is the visual check, and the gallery advisory run renders it on Linux.

No capture: the change is how webview rows are ordered; the gallery advisory run captures transcript/steer-ended.

Agent session: cosmic-gray

🤖 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 finished steered turns so tool calls no longer appear to vanish below a steer: previously all work folded into one "Worked for" above every steer, so under Leo's latest message only the answer showed.

  • Each part (the prompt's, then one per steer) now folds its own work under its own fold, timed from that prompt or steer; only the last part carries the turn's status.
  • A steer's work stays below the steer, and a reply it followed stays visible as before.
  • turnFoldFor—Find, a shell row's reveal, and message links—opens the fold of the part a row ran in, walking past a prompt that failed to send mid-turn (which opens no fold, except the chat's first prompt, whose turn still opens); the shaped-turn cache keys on all open folds, not only the prompt's.
  • steeredAnswers and the steer clause in staysOut are removed.
  • Added a gallery entry transcript/steer-ended and tests, including a Claude turn steered twice.

Written for commit 3fa9b98. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits October 21, 2026 14:40
…wn Worked for

A steer split nothing once the turn ended: shapeTurn put all the turn's work in one fold under
its first prompt, above every steer, so under Leo's latest message only the answer showed and
the calls that ran after it seemed gone. Each part of the turn (the prompt's, then each
steer's) now folds its own work under its own Worked for, timed from that prompt or steer, and
Find opens the fold of the part a row ran in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d1f-ca00-7e31-b882-4d3c03033ee2&host=cosmic-gray
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 3fa9b98: 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=pr23771 -f ref=chat/steer-folds -f platform=macos -f backend_mode=local

Gallery before/after for 3fa9b98: 16 states rendered, 3 images differ, 1477 more touched states not rendered. Images are in the run's artifact, not on this public PR.

gh run download 39687324275 -R manaflow-ai/cmux -n gallery-advisory-23771-3fa9b98b0186e47ff4a3026ebc36ac48fc7b962a (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.transcript/steer-ended Apple System Colors Light new 0% own transcript.gallery.ts
agent-pane.transcript/steer-ended Apple System Colors new 0% own transcript.gallery.ts
agent-pane.transcript/conversation Apple System Colors Light unchanged 0% own transcript.gallery.ts
agent-pane.transcript/conversation Apple System Colors unchanged 0% own transcript.gallery.ts
agent-pane.transcript/footer-actions-left Apple System Colors Light unchanged 0% own transcript.gallery.ts
agent-pane.transcript/footer-actions-left Apple System Colors unchanged 0% own transcript.gallery.ts
agent-pane.transcript/footer-actions-right Apple System Colors Light unchanged 0% own transcript.gallery.ts
agent-pane.transcript/footer-actions-right Apple System Colors unchanged 0% own transcript.gallery.ts
agent-pane.transcript/github-references Apple System Colors Light unchanged 0% own transcript.gallery.ts
agent-pane.transcript/github-references Apple System Colors unchanged 0% own transcript.gallery.ts
agent-pane.transcript/tasks Apple System Colors Light unchanged 0% own transcript.gallery.ts
agent-pane.transcript/tasks Apple System Colors unchanged 0% own transcript.gallery.ts
agent-pane.transcript/thinking Apple System Colors Light changed 0.0176% own transcript.gallery.ts
agent-pane.transcript/thinking Apple System Colors unchanged 0% own transcript.gallery.ts
agent-pane.transcript/streaming Apple System Colors Light unchanged 0% own transcript.gallery.ts
agent-pane.transcript/streaming Apple System Colors unchanged 0% own transcript.gallery.ts
agent-pane.chat-inspector/full Apple System Colors Light unchanged 0% imports turns.ts (1 hops)
agent-pane.chat-inspector/full Apple System Colors unchanged 0% imports turns.ts (1 hops)
agent-pane.chat-inspector/context-connectors-open Apple System Colors Light unchanged 0% imports turns.ts (1 hops)
agent-pane.chat-inspector/context-connectors-open Apple System Colors unchanged 0% imports turns.ts (1 hops)
agent-pane.chat-inspector/changes-breakdown Apple System Colors Light unchanged 0% imports turns.ts (1 hops)
agent-pane.chat-inspector/changes-breakdown Apple System Colors unchanged 0% imports turns.ts (1 hops)
agent-pane.chat-inspector/subagents-open Apple System Colors Light unchanged 0% imports turns.ts (1 hops)
agent-pane.chat-inspector/subagents-open Apple System Colors unchanged 0% imports turns.ts (1 hops)
agent-pane.chat-inspector/tasks-finished Apple System Colors Light unchanged 0% imports turns.ts (1 hops)
agent-pane.chat-inspector/tasks-finished Apple System Colors unchanged 0% imports turns.ts (1 hops)
agent-pane.chat-inspector/cloud-empty Apple System Colors Light unchanged 0% imports turns.ts (1 hops)
agent-pane.chat-inspector/cloud-empty Apple System Colors unchanged 0% imports turns.ts (1 hops)
agent-pane.chat-inspector/push Apple System Colors Light unchanged 0% imports turns.ts (1 hops)
agent-pane.chat-inspector/push Apple System Colors unchanged 0% imports turns.ts (1 hops)
agent-pane.chat-width/standard Apple System Colors Light unchanged 0% imports turns.ts (1 hops)
agent-pane.chat-width/standard Apple System Colors unchanged 0% imports turns.ts (1 hops)

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

Tour of 3fa9b98b01 (run): no media. The tour did not run: only webview code changed (3 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 to tour it on a Mac.

@blacksmith-sh

blacksmith-sh Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test 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.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-6i3y7 created for this PR by the cmux coordinator.

teamleaderleo and others added 2 commits October 21, 2026 15:08
Review of #23771: a prompt that failed to send mid-turn draws among the turn's rows and opens no
fold, yet turnFoldFor stopped at it, so Find on a later call opened nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d1f-ca00-7e31-b882-4d3c03033ee2&host=cosmic-gray
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Fleet run of the seven turn and fold test files (cmux-ci run scripts/ci/run-webviews-tests.sh, CMUX_WEB_TEST_FILES):

  • At the test-only commit ae1dace (red step 5ddc7e41730905d23e4c18aa): transcript-steer-continuous.test.tsx FAILED. The failures were the updated or new tests: "once the chain ends, each part folds its own work…", the Find/footer test, and the older-page test. The other six files passed.
  • At the fix 304e2d2 (step dfc792079bb446ec195012c6): all seven files PASSED.

dfdd5e2 then makes turnFoldFor skip prompts that are still unsent (from the review) and adds a test for it. 0e0cab6 only formats the test.

Reds at 304e2d2 that are not from this PR:

  • gallery health: url-chip#pull-request-lines-by-kind and changes-scope-menu#keyboard play timeouts. This PR doesn't change either entry.
  • release-notary: the restored-terminals-come-back.md highlight.
  • web lint: this one was mine (formatting). 0e0cab6 fixes it.

Review of #23771: turnView opens the chat's first turn with its first prompt even when that
prompt failed to send, so turnFoldFor falls back to it when nothing before it opens a turn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d1f-ca00-7e31-b882-4d3c03033ee2&host=cosmic-gray
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent, correctness first): SHIP at 3fa9b98

An independent reviewer agent (acpmux session steerfolds-review) read the full diff, then re-reviewed each later commit, and returned SHIP. It found two problems in turnFoldFor, both fixed in this PR: prompts that were never sent are now skipped, and when the walk finds no opener it falls back to the first prompt.

  • Tests: the focused fleet tests pass at this head (step cdb2f468cc2995a8e6e6b100).
  • Gallery: transcript/steer-ended renders with its play (gallery health, ready=1).
  • Fast gates: I re-dispatched them against the current base, and run 39690968623 passed.

None of the remaining reds come from this PR:

  • gallery health: url-chip#pull-request-lines-by-kind, an entry this PR doesn't touch.
  • release-notary: the restored-terminals-come-back.md highlight.
  • the CI guard group: a dpkg lock that apt was holding on the runner.
  • Guard status: rolls up the two failures above.

@github-actions

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/39692485830 at 7692cfb failed: cmux-next fast tier.
Those jobs last passed at 9940d4b. This pull request is one of 5 merged since: #20295, #23782, #23740, #23771, #23830.
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.

@github-actions

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