Skip to content

cmux NEXT environment picker: a started chat offers Move to Cloud, or Bring Back Local - #23157

Merged
teamleaderleo merged 7 commits into
feat-cmux-nextfrom
cmux/cloud-offload-picker
Oct 21, 2026
Merged

teamleaderleo merged 7 commits into
feat-cmux-nextfrom
cmux/cloud-offload-picker

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

A started chat's computer picker now offers that chat's one move, the same action as the tab's right-click menu:

  • A chat on this Mac shows this Mac and Move to Cloud, with "Copies this folder to a Cloud machine, a new one if you have none, and continues the chat there" under it. It runs cloudMove on this tab. With no arguments, CloudMove reuses a Cloud machine (a connected one, else any, else a new one), syncs the folder there (cmux link sync push), moves the chat (cmux link agent move) and opens it on that machine; this Mac's tab closes. Progress and failures are the app's existing toasts.
  • A chat on a Cloud machine shows that machine and Bring Back Local, with "Merges the machine's changes into the folder on this Mac and continues the chat here" under it. It runs cloudBringBack on this tab. A chat that wasn't moved from this Mac is refused by the action itself, with its own reason (the app's refusal notice).
  • An SSH machine's chat, and the floating chat (no tab to move), keep the fixed computer label as before. New chats keep today's picker exactly.
  • Return on a search never runs the move by itself (the existing auto-highlight guard); the row runs only when the arrow keys or the pointer reach it.
  • Which move a chat gets is the app's call, not the page's. pane.tabState now replies with moves: the Cloud moves the chat's own right-click menu offers now (AgentChatTabActions.menuItems, which hides rows with CloudMove.hiddenMenuItems). The picker offers only those and reads them again when it opens. So a Cloud chat that no move from this Mac put there, or an SSH chat whose machine kind isn't known yet, keeps the fixed label instead of offering a row the app refuses.
  • Both run on the person's gesture: AgentPaneModel.connectActions gains cloudMove and cloudBringBack, and CONNECT_ACTIONS gains move and bringBack.
  • action.run from the pane now reports a failure (unavailable) when the app did not run the action and no fallback ran. Before, it said success. On it, the page shows "Move to Cloud isn't available for this chat" (or Bring Back Local) through the existing notice. An action that ran and then stopped reports itself in the app, so there is no double notice.

Row names reuse the catalog titles' translations; the two detail lines and the notice are new strings in all 21 locales (needs_review).

Gallery: agent-pane.composer-context variants started-move-to-cloud and started-bring-back.

No capture: the change is the agent pane's web picker rows; the two gallery variants above render both states, and no native layout changed.

CmuxNextApp: no source growth (check-app-size.sh --base ok).

Testing

  • webviews/test/environment-picker.test.tsx:
    • red on 1429604: 4 fail. The started chat's computer is a fixed label, and CONNECT_ACTIONS has no move.
    • green on 074afcc.
    • red on 3d0f0d0: 1 fails. A Cloud chat the app won't bring back still gets the row.
    • green on 51eefd0 (24 pass).
  • AgentPaneConnectActionTests (fleet package-test-lane.sh): green on df38ec8, where all 5 tests pass.
    • The tabState test failed on 3d0f0d0 before df38ec8 fixed how it reads the reply envelope.
    • Red runs on 1429604 and on 593075e (3d0f0d0 plus the corrected test) are re-running; their results follow in a comment.
  • cmux-ci compile-check --app: passed on 074afcc, 51eefd0 and df38ec8.

Observed / Not run

  • Observed: the bun test above (red, then green), prepush-gate.py (no new violations), check-app-size.sh --base origin/feat-cmux-next (ok). In bun run check, vp check exits 1 on 3 warnings in files this PR doesn't touch (IncomingMessageCard.tsx, HistoryPage.tsx, sidebar-rail-css.test.tsx); every step before it passed.
  • Independent review (a separate read-only session): the first pass failed on two findings (offering a move from the machine's kind; Bring Back Local's detail line not stacking). Both are fixed in 51eefd0, and the re-review passed.
  • Not run: acpmux-protocol:check and scripts/web-lint.sh locally (bun runs are blocked on this Mac; CI's web lint covers them), and a live move in a DEV build.

Changelog

Added: A started agent chat's computer picker offers Move to Cloud, or Bring Back Local for a chat on a Cloud machine.

Agent session: cosmic-gray

🤖 Generated with Claude Code

teamleaderleo and others added 2 commits October 21, 2026 00:38
… or Bring Back Local (red: a started chat's computer is a fixed label, and the pane may not run either action)

environment-picker.test: a started local chat's picker shows this Mac and
Move to Cloud; a started Cloud chat's shows its machine and Bring Back
Local; Return on a search never moves a chat; an SSH chat or a host with
no move keeps the fixed label.
AgentPaneConnectActionTests: cloudMove and cloudBringBack run on the
person's gesture; an action the app did not run is an unavailable failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c03-0c22-7660-ab5f-4cf259edf1c3&host=cosmic-gray
… Bring Back Local on a Cloud machine (environment-picker.test, AgentPaneConnectActionTests)

A started chat's computer is fixed, so its picker lists only where it runs
and its one move: Move to Cloud from this Mac (it reuses a Cloud machine or
makes one, copies the folder and continues the chat there) and Bring Back
Local from a Cloud machine. They run the tab menu's same actions (cloudMove,
cloudBringBack) on this tab, on the person's gesture. An SSH machine's chat
and the floating chat keep the fixed label. An action the app did not run
is now an unavailable failure, and the page says the move isn't available
for this chat; a move that ran and stopped reports itself in the app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c03-0c22-7660-ab5f-4cf259edf1c3&host=cosmic-gray
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@teamleaderleo

teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator Author

Owned by cloud-upsell-b0 on cosmic-gray · session

@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 a4cbc68: 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=pr23157 -f ref=cmux/cloud-offload-picker -f platform=macos -f backend_mode=local

Gallery before/after for a4cbc68: 16 states rendered, 4 images differ, 2 more touched states not rendered (picked by the Gallery: line in the PR body). Images are in the run's artifact, not on this public PR.

gh run download 39610564110 -R manaflow-ai/cmux -n gallery-advisory-23157-a4cbc6890e45ae122520dcdf0e0f70a660cc5f15 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.composer-context/started-move-to-cloud Apple System Colors Light new 0% pr-body
agent-pane.composer-context/started-move-to-cloud Apple System Colors new 0% pr-body
agent-pane.composer-context/started-bring-back Apple System Colors Light new 0% pr-body
agent-pane.composer-context/started-bring-back Apple System Colors new 0% pr-body
agent-pane.composer-context/closed Apple System Colors Light unchanged 0% pr-body
agent-pane.composer-context/closed Apple System Colors unchanged 0% pr-body
agent-pane.composer-context/folder-menu Apple System Colors Light unchanged 0% pr-body
agent-pane.composer-context/folder-menu Apple System Colors unchanged 0% pr-body
agent-pane.composer-context/folder-favicons Apple System Colors Light unchanged 0% pr-body
agent-pane.composer-context/folder-favicons Apple System Colors unchanged 0% pr-body
agent-pane.composer-context/duplicate-worktrees Apple System Colors Light unchanged 0% pr-body
agent-pane.composer-context/duplicate-worktrees Apple System Colors unchanged 0% pr-body
agent-pane.composer-context/duplicate-search Apple System Colors Light unchanged 0% pr-body
agent-pane.composer-context/duplicate-search Apple System Colors unchanged 0% pr-body
agent-pane.composer-context/repo-worktrees Apple System Colors Light unchanged 0% pr-body
agent-pane.composer-context/repo-worktrees Apple System Colors unchanged 0% pr-body
agent-pane.composer-context/repo-worktrees-open Apple System Colors Light unchanged 0% pr-body
agent-pane.composer-context/repo-worktrees-open Apple System Colors unchanged 0% pr-body
agent-pane.composer-context/repo-worktrees-search Apple System Colors Light unchanged 0% pr-body
agent-pane.composer-context/repo-worktrees-search Apple System Colors unchanged 0% pr-body
agent-pane.composer-context/repo-worktrees-guessed Apple System Colors Light unchanged 0% pr-body
agent-pane.composer-context/repo-worktrees-guessed Apple System Colors unchanged 0% pr-body
agent-pane.composer-context/computer-menu Apple System Colors Light unchanged 0% pr-body
agent-pane.composer-context/computer-menu Apple System Colors unchanged 0% pr-body
agent-pane.composer-context/environment-picker Apple System Colors Light unchanged 0% pr-body
agent-pane.composer-context/environment-picker Apple System Colors unchanged 0% pr-body
agent-pane.composer-context/environment-picker-no-cloud Apple System Colors Light unchanged 0% pr-body
agent-pane.composer-context/environment-picker-no-cloud Apple System Colors unchanged 0% pr-body
agent-pane.composer-context/saved-environments Apple System Colors Light unchanged 0% pr-body
agent-pane.composer-context/saved-environments Apple System Colors unchanged 0% pr-body
agent-pane.composer-context/saved-environment-picked Apple System Colors Light unchanged 0% pr-body
agent-pane.composer-context/saved-environment-picked Apple System Colors unchanged 0% pr-body

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

Probably yours: web / react-apps-check (1) failed: a Python test failed, ERROR: test_warn_only_style_guards_pass_a_pr_adding_a_finding (__main__.ScopedChecksTests.test_warn_.... This PR merged before its CI finished: fix forward on main.

CI failed on a4cbc6890e (run 39610564164 attempt 1): 1 code, 1 unknown.
macOS jobs did not run: compile and app tests were skipped: Fast static checks skipped.

Job Verdict Why
web / react-apps-check (1) code a Python test failed
web / react-apps-check unknown no known signature; failed step: Check webview test shards
Matched log lines
web / react-apps-check (1): ERROR: test_warn_only_style_guards_pass_a_pr_adding_a_finding (__main__.ScopedChecksTests.test_warn_only_style_guards_pass_a_pr_adding_a_finding)

Not re-run automatically: web / react-apps-check (1), web / react-apps-check are not machine failures.

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.

red: web / Web status; base red: the same failure on the base ae42201; does not block
red: web / react-apps-check; base red: the same failure on the base ae42201; does not block
red: web / react-apps-check (1); NEW: green on the base ae42201; do not merge until green; see lane-rules

CI fast guards failed on ab54851c3f (https://github.com/manaflow-ai/cmux/actions/runs/39593766306). It does not block the merge; a red guard merged into main breaks it for every open PR.
The log named no failed step; see the run.

Agents: python3 scripts/ci/guard_attribution.py fix applies the mechanical fixes locally.

Tour of a4cbc6890e (run): no media. The tour job failed before the tour ran (build or setup); the run log has the output.

@blacksmith-sh

blacksmith-sh Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Found 7 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpa06_uoxo/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmpcd8efnor/summary-missing.json (live):/summary-missing.json (live): View Logs
test/agent-pane-scrollbar-full-height.test.ts/agent-pane-scrollbar-full-height.test View Logs
test/agent-pane-scrollbar-full-height.test.ts/agent-pane-scrollbar-full-height.test View Logs
test_a_pull_request_that_changes_the_shortcut_inputs_still_rewrites_them (main.Sett
ingsOnlyArtifactLeavesTheActionFollowers.test_a_pull_request_that_changes_the_shortcut_
inputs_still_rewrites_them) (job='autofix')/
test_a_pull_request_that_changes_the_shortcut_inputs_still_rewrites_them (main.Sett
ingsOnlyArtifactLeavesTheActionFollowers.test_a_pull_request_that_changes_the_shortcut_
inputs_still_rewrites_them) (job='autofix')
View Logs
test_regenerated_action_exports_bring_the_followers (main.SettingsOnlyArtifactLeave
sTheActionFollowers.test_regenerated_action_exports_bring_the_followers) (job='autofix'
)/
test_regenerated_action_exports_bring_the_followers (main.SettingsOnlyArtifactLeave
sTheActionFollowers.test_regenerated_action_exports_bring_the_followers) (job='autofix'
)
View Logs
test_settings_exports_alone (main.SettingsOnlyArtifactLeavesTheActionFollowers.test
_settings_exports_alone) (job='autofix')/
test_settings_exports_alone (main.SettingsOnlyArtifactLeavesTheActionFollowers.test
_settings_exports_alone) (job='autofix')
View Logs

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

teamleaderleo and others added 2 commits October 21, 2026 00:50
…s chat menu offers (red: it offers Bring Back Local on any Cloud chat, and tabState reports no moves)

Review (#23157): a Cloud chat no move from this Mac put there, a chat on
an SSH machine whose kind is not known yet, or a chat the app won't move
got a row the app then refuses. The page now takes the moves from the app:
pane.tabState reports the moves the chat's right-click menu offers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c03-0c22-7660-ab5f-4cf259edf1c3&host=cosmic-gray
… right-click menu offers (environment-picker.test, AgentPaneConnectActionTests)

pane.tabState reports the Cloud moves the chat's right-click menu offers
now (the App's CloudMove.hiddenMenuItems decides), and the picker offers
only those, read again when the list opens. A Cloud chat no move from this
Mac put there, or an SSH chat whose machine kind isn't known yet, keeps the
fixed label. Bring Back Local's detail line sits under its name, as New
Cloud Machine's does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c03-0c22-7660-ab5f-4cf259edf1c3&host=cosmic-gray
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

codex-review: SHIP at df38ec8

  • Reviewed the current diff, its focused tests, and the affected call paths; no correctness bug found.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Fleet results for AgentPaneConnectActionTests (package-test-lane.sh, Xcode 26.6):

  • Red on 1429604 (tests only): moveAndBringBackRunOnAGesture fails. The pane refuses cloudMove and cloudBringBack (ok is not true, ran is []).
  • Red on 593075e (3d0f0d0 plus the test-envelope fix): tabStateReportsTheMovesTheChatMenuOffers fails. tabState reports no moves.
  • Green on df38ec8: all 5 tests pass:
    • anActionTheAppDidNotRunIsAFailure
    • moveAndBringBackRunOnAGesture
    • openCloudOpensTheCloudStorefrontOnAGesture
    • otherConnectActionsRunWithoutArguments
    • tabStateReportsTheMovesTheChatMenuOffers
  • cmux-ci compile-check --app passed on df38ec8.

Not this PR's reds:

  • cmux-next checks: the reds are "Script tests (pin-cmux-tui, embed-cef, ensure-cef store)" and the first-turn-cost script, both in scripts this PR doesn't touch.
  • react-apps-check: composer-history history-recall reports a 0.0002 layout shift in the prompt field. That gallery entry renders no environment picker and no onOffload, so this PR doesn't change it. I'm rerunning the failed job once.

@cursor

cursor Bot commented Oct 21, 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.

…ase order (only the five picker strings are new)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c03-0c22-7660-ab5f-4cf259edf1c3&host=cosmic-gray
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent subagent review, re-review PASS at 51eefd0; later commits are test-only df38ec8, a clean base merge ab54851 with no other changes, and a4cbc68 which only restores base key order in the agent pane string catalog, JSON-identical to ab54851): SHIP at a4cbc68

Compile: cmux-ci compile-check --app passed on the merged head ab54851 (57 s); a4cbc68 changes only the order of keys in Localizable.xcstrings.

Remaining reds at ab54851, all not this PR's:

@teamleaderleo
teamleaderleo merged commit f600827 into feat-cmux-next Oct 21, 2026
@teamleaderleo
teamleaderleo deleted the cmux/cloud-offload-picker branch October 21, 2026 13:44
@github-actions

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