Repository navigation
New Tab: a project picked there goes with a Cloud start (copied to the machine at its branch with local changes) - #29789
Conversation
…copies it A Cloud send copies only the pane's own folders (AgentPaneHandOff.folderInScope). A recent project picked on the New Tab page changed only page state, so a Cloud start from it was refused (pathOutsideRoots, #29294). The pick now goes to the host on its click (workspace.useFolder, as the chat composer's chip does); the grant spends that click's gesture, leaving Return's for cloud.startChat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Gallery before/after for
States
Pick other states with a Shipped in:
|
|
Owned by an agent session · session |
|
Review (codex, router-review): SHIP at c1f4595 Reviewer: codex gpt-6.1-sol xhigh, fast tier. Follow-ups: 1. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward. SHIP at c1f4595 Visual verdict: all 16 supplied after images match their before counterparts; no UI regression.
Follow-ups:
|
…Cloud start (#29926) onProjectPicked was attached only once sandbox.checked was true, so a project picked on the New Tab page while the host's check was out never went through workspace.useFolder and the Cloud start could still fail with pathOutsideRoots (review of #29789). The callback is now attached whenever Cloud may be offered, the check aside (newTabProjectPick). Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: cmux-bot[bot] <348531757+cmux-bot[bot]@users.noreply.github.com>
Leo, 2026-10-31: "JUST PASSING THE SELECTED FOLDER/'PROJECT' WHEN YOU PICK CLOUD THAT'S THE BEST WAY. IT JUST GOES IT JUST WORKS". Also: "CODEX/CHATGPT CLOUD JUST WORKS. WE ALL HATE SETTING UP ENVIRONMENTS".
What was wrong
The Cloud start already carries the selected project:
cloud.startChat(#28111) copies the chat's folder to the person's Cloud machine through Move to Cloud's sync (cmux link sync push, Rust), which takes a git working copy together with its.git. That brings the remote (minus URL user info), the branch, HEAD, index, stash, uncommitted changes and untracked files that aren't ignored. A folder outside git is copied file by file. Then the chat starts in that copy. No environment form is involved.The New Tab page broke that path.
cloud.startChatcopies only the pane's own folders (AgentPaneHandOff.folderInScope: its roots and folders the person picked). A recent project picked on New Tab changed only page state, so a Cloud send from it was refused withpathOutsideRoots. This was found in #28686's review and tracked in #29294 (P2, "New Tab's Cloud send skips folder authorization"). The chat composer's own folder chip already hands its pick to the host (chooseProject→workspace.useFolder).What changes (web only, no Swift)
NewTabScreengetsonProjectPicked(cwd), called frompickProjectwhen the person picks a folder on this Mac (folder chip, widget card, Choose Folder, new worktree).App.tsxsends that pick to the host on the click (pickFolder→workspace.useFolder), the same call the chat composer's chip makes. It skips folders Cloud would never copy (home or above it, percloudStartFolder). A home or root answer asks nothing here; the local start still asks on Return.grantPickedspends a gesture credit. Granting on Return would leavecloud.startChatwithout one and fail it withgesture_required. The click's credit pays for the grant, and Return keeps its own credit for the start.Prior art read
#28111 (cloud.startChat, the copy), #29046 (moves the start's pick, ledger and copy to Rust; open, stacked), #28686 and #29294 (Composer Cloud and its follow-ups), #29669 (Start New Chats In: Cloud), #29145 and #29556 (
~/workdefault), #28823 (fs-v1 on a fresh VM), #19448 (Move to Cloud transfer). cmux-platform's derived environments (POST /v1/environments/derive) clone a repo from its remote. They don't carry local uncommitted changes, so this keeps the local copy path.Tests
a project picked on the page is reported on its click (onProjectPicked), so Cloud can copy it.NewTabScreen.test.tsxpluscloudRun.test.ts, 33 pass, 0 fail, andtsc --noEmitclean (run).Follow-up (not in this PR): the first push of a large repo uploads its whole
.git. A clone from the remote plus a push of only the local delta would be faster, but it needs git credentials on the machine, so it waits for the credential relay work.Agent session: agent session
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes the New Tab page so a project picked there is carried into a Cloud start, copied to the Cloud machine with the chat.
Previously, picking a recent project on New Tab only changed page state, so a Cloud send from it was refused with
pathOutsideRoots(#29294). The pick is now handed to the host on its click (workspace.useFolder, the same call the chat composer's folder chip makes), andcloud.startChatcopies the pane's folders including that picked project. Only folders Cloud would copy (never home or above it) are handed over, and only while Cloud is offered; the local start still asks on Return. The hand-off happens on the click rather than Return because the grant spends a gesture credit, and Return's credit must stay available for the start. Web-only, no Swift changes.Written for commit c1f4595. Summary will update on new commits.