Skip to content

Cloud start: the folder-grant wait is bounded and waits for the sent folder's grant - #34592

Merged
teamleaderleo merged 1 commit into
feat-cmux-nextfrom
cloud-grant-wait-bound
Nov 4, 2026
Merged

teamleaderleo merged 1 commit into
feat-cmux-nextfrom
cloud-grant-wait-bound

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Fix-forward of a review follow-up on #34427, which made a Cloud send wait for the folder grant from picking Cloud. That is part of Leo's Cloud refusal ask: "what happened here on this build?"

The wait had no time limit and waited on the last Cloud pick's grant, whichever folder that was. So a workspace.useFolder that never answered kept the composer locked forever.

  • cloudFolderGrants (cloudRun.ts) keeps grants by folder, spelled the way cloudStartFolder spells them. A Cloud start waits only for the grant of the folder it sends.
  • The wait stops at CLOUD_FOLDER_GRANT_WAIT_MS (3 s), and then the start is sent anyway. If the folder still isn't granted, the host's worded "pick the folder" refusal (Cloud start: a start refused on this Mac says why, and marks no step failed #34406) covers it, and the prompt stays in the composer.
  • Timer: one setTimeout per waiting send. It is cleared when the grant settles, and it ends by itself at 3 s. A grant leaves the map once it settles.
  • grantedCloudStart is the pane's Cloud start, and App.tsx uses it as-is. New tests in cloudRun.test.ts drive that wiring: the start is held until the grant settles, it goes after the time limit when the grant never answers, and it waits only for its own folder's grant. A source check ties App.tsx to the helper.

Risk: small and contained in the Cloud first-send path.

Agent session: agent session

🤖 Generated with Claude Code


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


Summary by cubic

Bounds the Cloud send's folder-grant wait so a grant that never answers can no longer hold the composer. A Cloud start now waits only for the grant of the folder it sends, and at most 3 seconds before sending anyway; the host's worded refusal still covers a folder that isn't granted.

Written for commit abaa017. Summary will update on new commits.

View guided diff Turn on auto-fix

…folder's grant

Fix-forward of #34427's review follow-up. The Cloud send waited on the last
Cloud pick's workspace.useFolder promise with no time limit, so a grant that
never answered kept the composer locked. Grants are now kept by folder
(cloudFolderGrants), a start waits only for the grant of the folder it sends,
and at most CLOUD_FOLDER_GRANT_WAIT_MS (3 s); past that it sends anyway and
the host's worded refusal (#34406) covers a folder still not granted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@teamleaderleo teamleaderleo added the leo-named-fix An obvious fix to something Leo named: lands on push, review runs in parallel label Nov 4, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@teamleaderleo
teamleaderleo merged commit 31ffec4 into feat-cmux-next Nov 4, 2026
72 of 121 checks passed
@teamleaderleo
teamleaderleo deleted the cloud-grant-wait-bound branch November 4, 2026 02:00
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 4, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude-opus-5-5 medium): SHIP at abaa017

Checked: the folder key matches the cwd that cloud.startChat sends (cloudStartFolder on both paths), the timer is cleared when the grant wins, a rejected grant neither blocks nor goes unhandled, granting is safe to pass as a bare callback, and the tests are sound.
Follow-ups: [follow-up] the App.tsx wiring check uses source-text regexes, so a harmless reformat breaks it.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

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

red: web / Web status; a job it gathers is red on this change (its line here); do not merge until green; see lane-rules
red: web / react-apps-check; a job it gathers is red on this change (its line here); do not merge until green; see lane-rules
red: web / react-apps-check (1); no finished base run on b181d9c to compare; do not merge until green; see lane-rules

Shipped in:

lawrencecchen added a commit that referenced this pull request Nov 4, 2026
…ict-template-expressions)

#34592 (31ffec4) builds a call label with ${params.cwd}, an unknown;
vp lint treats that as an error in the pre-push web lint, so the merge
service's hook refused #34577's squash. String() it; no behavior change.
lawrencecchen added a commit that referenced this pull request Nov 4, 2026
…t spacing test's after() helper (#34577)

* base red: the What's New brief's More line sits on the spacing scale (design tokens)

check:design-tokens is red on feat since b7c9441 (#34477): the brief
popover's .wn-pop-more used margin-top 2px, off the token scale. It now
uses --ds-space-1 (4px), the same gap .wn-pop-all uses above it.

* base red: transcript spacing test defines after() again (webviews typecheck)

webviews typecheck is red on feat: test/transcript-spacing-kinds.test.ts:247
calls after(), which #34464 (1e8a45b) removed together with below()
while #34370 (8557b10, written on a base that still had them) added a
new use. Restore both helpers as #34370 measured with them; no other change.

* base red: cloudRun test names a string in its template (vp lint restrict-template-expressions)

#34592 (31ffec4) builds a call label with ${params.cwd}, an unknown;
vp lint treats that as an error in the pre-push web lint, so the merge
service's hook refused #34577's squash. String() it; no behavior change.

* base red: format three webviews files the way vp fmt --check wants

feat's emoji shortcode change (#34364) left App.tsx, emojiShortcodes.test.ts
and composer-emoji.browser.test.ts unformatted, so vp fmt --check fails the
pre-push web lint on every webviews push. Output of scripts/web-lint.sh --fix.

* base red: the Cloud start source check accepts the formatted App.tsx call

vp fmt puts cloudFolderGrant.granting(folder.cwd, pickFolder(...)) on
several lines, and cloudRun.test.ts read it as one line, so it failed
after the format commit. The pattern now allows whitespace between the
arguments. bun test cloudRun.test.ts: 21 pass, 0 fail.
teamleaderleo added a commit that referenced this pull request Nov 4, 2026
…d emoji files (#34667)

#34592 and #34364 landed four webviews files that vp fmt --check refuses.
Format them. The formatter wraps App.tsx's cloudFolderGrant.granting(...)
call, so cloudRun.test.ts's source-text check of it now allows whitespace
between the arguments; it asserts the same call.


Agent-Session: https://cmux.com/deeplink/agent?id=aid-d750cf10922c785efa64

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

No deployments
ci-routing-agent — abaa0175 Deployed Nov 4, 2026 by teamleaderleo via cmux-tui tree preflight #108721
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

leo-named-fix An obvious fix to something Leo named: lands on push, review runs in parallel risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant