Skip to content

cmux NEXT: a long live thought streams in Codex's seven-line viewport - #21660

Merged
teamleaderleo merged 4 commits into
feat-cmux-nextfrom
split/20963-thought-live
Oct 18, 2026
Merged

teamleaderleo merged 4 commits into
feat-cmux-nextfrom
split/20963-thought-live

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #21656. This branch includes #21656's commit. Review only the top commit, 6a72fb7a30b0, and land this after #21656.

When the long-thought fold is on (agentPane.debug.foldLongThoughts), a thought taller than 140 px that's still streaming now reads "Thinking" with the existing shimmer. It holds a fixed 140 px viewport, which is seven of its 20 px lines and the 8.75rem Codex gives a live reasoning trace. The newest line sits at the bottom, and older lines fade out at the top over 16 px. Once the agent moves on, the thought folds as before. A thought no taller than 140 px streams in full after "Thought".

  • The fold's measurement now takes the larger of the drawn height and the text's whole height (scrollHeight). Without that, a thought clipped to 140 px would measure 140 and never fold.
  • A Debug toggle in Debug Settings > Pages, "Live thought viewport" (agentPane.debug.liveThoughtViewport), is on by default. When it's off, the app sets data-live-thought-viewport="off" on <html> and a long thought streams in full, as on feat-cmux-next today. It only applies while the fold is on.
  • A thought between 140 px and the fold threshold (about one transcript viewport, never under 400 px) streams clipped, then shows in full once done, because it's too short to fold. The threshold choice comes in the next slice.

Freeze WINDOW areas: Packages/macOS/CmuxNext (Debug tunables in AgentPaneTunables.swift).

Testing

  • bun test src/agent-session/acpmux/conversation/ThoughtRow.test.tsx passes, 16 tests. The new tests cover:
    • a long streaming thought holding the viewport and reading "Thinking";
    • a 140 px thought streaming in full;
    • either toggle off meaning no viewport;
    • a clipped thought (140 px drawn, 900 px of text) still folding once done. That one fails without the whole-height measurement.
  • bun run check in webviews/ passes, and lint-ios-package-conventions.sh --namespace-fix is clean.
  • Added but not run here, because this Linux host has no Chromium or Swift (CI runs them):
    • agent-pane-chat-column.test.ts: a live long thought's text box is 140 px, with its last line in view and its first line above it. With the toggle off, it's taller than 600 px.
    • AgentPaneThoughtTunablesTests.swift: the toggle's key, its default, and its off attribute.
  • Localization: no new user-facing strings. "Thinking" is the existing thinking key.

Changelog

none

🤖 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

With the long-thought fold on, a thought taller than 140 px that's still streaming reads "Thinking" and holds a fixed seven-line viewport, keeping its newest line in view and fading older lines out at the top. Once the agent moves on, it folds as before. A folded thought now reads "Thought for 12s" instead of a preview of its text.

  • The fold measures the text's whole height, so a thought clipped by the live viewport still folds once done.
  • A Debug toggle, "Live thought viewport" (agentPane.debug.liveThoughtViewport), is on by default; off streams the thought in full.
  • A Debug choice, "Folded thought header" (agentPane.debug.thoughtHeader), keeps the old preview style on "preview"; "duration" (default) adds the new tools.thoughtFor string in all 21 pane locales.

Picked up from feat-cmux-next via merges

  • An evicted terminal now shows its last presented frame at once when shown again.
  • The status indicator gains a static look covering tabs, the attention ring, and the agent pane.
  • Workspaces record name source and revision; auto-renames never replace a person's name unless released.
  • acpmux allows no-ask start modes when a caller session inherits the mode or a person approved the preset.

Written for commit 27da1cc. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits October 18, 2026 13:48
A long thought folded once done (#20948, Debug toggle
agentPane.debug.foldLongThoughts) now reads how long the agent thought,
from its first chunk to its latest, clamped at zero for out-of-order
events. An undated thought, or one under a second, reads "Thought".

#20948's "Thought" plus first line stays as the Debug choice
agentPane.debug.thoughtHeader = preview, which the app sets on <html> as
data-thought-header. New string tools.thoughtFor in all 21 pane locales
(split from #20963).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the long-thought fold on (agentPane.debug.foldLongThoughts), a thought
taller than 140px that is still streaming reads "Thinking" and holds a
fixed 140px viewport (Codex's 8.75rem) with its newest line at the bottom
and older lines fading out over 16px. Once done it folds as before; the
fold measures the text's whole height, not the clip.

Debug toggle agentPane.debug.liveThoughtViewport, on by default; off sets
data-live-thought-viewport="off" and the thought streams in full (split
from #20963).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: b6ce4a56-75a5-4926-91c7-63437b49e760

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Receipt for 27da1cc (this PR's head; a new push replaces it)

  • Visual review: HQ feed card · gallery before/after runs
  • Checks: this head
  • 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=pr21660 -f ref=split/20963-thought-live -f platform=macos -f backend_mode=local

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

all web/size checks green

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Not verified: macOS jobs did not run: compile and app tests were skipped on 27da1cc2fd; ci-status is green without them.

CI passes on 27da1cc2fd (run 39167557877 attempt 1).
macOS jobs did not run: compile and app tests were skipped: Fast static checks skipped (the macos job needs both to succeed). Re-run CI once they pass, before merging.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

CI fast guards passes on 27da1cc2fd (https://github.com/manaflow-ai/cmux/actions/runs/39167557877). This covers only the fast guards, not CI: CI's result is the ci-status check, and the CI failure attribution comment names any failing test.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

react-apps-check (1) and (2) fail in bun run check:text-focus on CmuxNextDaemonRecovery/DaemonRecoveryControls.swift:98. #20765 brought that file onto feat-cmux-next, so the failure is base red, the same as on #21656. That failure stops the job before its Test webviews step, so the webview tests were skipped: ThoughtRow.test.tsx and the new Chromium cases in agent-pane-chat-column.test.ts haven't run in CI. Those tests need a rerun once the base check is fixed, before this lands. The other 92 checks pass.

🤖 Generated with Claude Code

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Closing and reopening to start a fresh CI run on the current base: #21679 fixed the base check:text-focus red, and a plain rerun would reuse the old merge commit. Head unchanged.

@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 18, 2026 15:54 — with GitHub Actions Inactive
@cursor

cursor Bot commented Oct 18, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

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

@blacksmith-sh

blacksmith-sh Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmppycwvibs/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmpzc96itaw/summary-missing.json (live):/summary-missing.json (live): View Logs

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

…a squash)

# Conflicts:
#	Packages/macOS/CmuxNext/Sources/CmuxNextAgentPane/AgentPaneTunables.swift
#	Packages/macOS/CmuxNext/Tests/CmuxNextAgentPaneTests/AgentPaneThoughtTunablesTests.swift
#	webviews/src/agent-session/acpmux/conversation/ThoughtRow.test.tsx
#	webviews/src/agent-session/acpmux/conversation/ThoughtRow.tsx
#	webviews/src/agent-session/acpmux/conversation/conversation.css
@teamleaderleo
teamleaderleo merged commit 0dc10b5 into feat-cmux-next Oct 18, 2026
173 of 187 checks passed
@teamleaderleo
teamleaderleo deleted the split/20963-thought-live branch October 18, 2026 22:38
teamleaderleo added a commit that referenced this pull request Oct 18, 2026
… as a squash)

# Conflicts:
#	Packages/macOS/CmuxNext/Sources/CmuxNextAgentPane/AgentPaneTunables.swift
#	Packages/macOS/CmuxNext/Tests/CmuxNextAgentPaneTests/AgentPaneThoughtTunablesTests.swift
#	webviews/src/agent-session/acpmux/conversation/ThoughtRow.test.tsx
#	webviews/src/agent-session/acpmux/conversation/ThoughtRow.tsx
@github-actions

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant