Repository navigation
fix(cloud): resume New Cloud Machine after sign-in once - #27104
Conversation
|
Bead |
Default changesThis pull request changes 1 default at
Needs a review. It passes with an independent review receipt on this commit: a comment or review whose first line is Regenerate the snapshot with |
|
Found 10 test failures on Blacksmith runners: Failures
|
|
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)
red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: |
|
Owned by an agent session · session |
|
Review (codex gpt-6-astra high, fast, via review-router): SHIP at 101aab6 No P1/P2 correctness, regression, security or test coverage findings. Fleet suites at this head: cmux-ci step |
Resolves conflicts with #26740 and #26568: keep the palette actions, keep this PR's removal of the agent pane's sign-in fallback, and pass #26740's chat pick into bindMachineCreation (read when the action runs, since sign-in may finish after focus moved). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-5160a5704f7bd6c329fa
|
Review (codex gpt-6-astra high, fast, via review-router): SHIP at ac6d357 No P1 or P2 findings. This head merges feat-cmux-next (which has #27758, #27862, #26740 and #26568). The conflict resolution keeps the palette actions, keeps this PR's removal of the agent pane's sign-in fallback, and passes #26740's chat pick into |
|
Shipped in:
|
The slice head 2b2fc8e (= 43037147a0b's tree: slice + trunk sync c09bb74) merges the feat tip, 130 new commits. 58 files conflicted: - 0 reuse the previous round's resolutions: this round's base is the previous feat tip a14725a, so no hunk had all three sides equal to 5f39f9e's inputs. - Regenerated, not hand-merged: the 4 CmuxMessagesLab patches (Fixture, Layout, RowDrawing, WindowView) from the merged vendored sources against the pinned upstream reconstructed from the side whose patch was consistent (feat's for 3, perf's for WindowView; feat 65de604 edited WindowView.swift without rewriting its patch). - 54 resolved by porting feat's change into perf's shape: - Package.swift (CmuxNext: Floating tests get CmuxNextDesign with perf's Wakeups deps; CmuxMobileKit: Model gets feat's Resources with perf's CmuxSafeConcurrency). - Lineage parents #24136: SidebarSessionTreeFeed (recordedParents and per-host links on perf's ServiceObservation), RemoteAcpmuxWire (host/linksAlias notes posted on perf's mainWork; test-only inits take them too), AgentTabRemoteHost, AgentTabs+Wiring, AgentSessionWorkspace (the record is one completion task on main), tests. - Artifact sandbox #26216: perf's page-host PageArtifactFrame already serves the sandboxed endpoint; feat's navigation tests ported to PageNavigation, frame-ancestors expectation added, artifactFrameURL keeps only the page host, webviews tests on perf's URLs. - pane.commandAvailability (#25405) and chief.face (#27914) beside perf's keyToPaint and Wiring init. - State files off main #27749: AgentUnsentDrafts (perf's ObservedMap) and ScrollAnchors (blockingDecode) on AgentPaneStateFile. - AgentPaneTransport.close: perf's close reason plus feat's host-request failure and trust reset. - CloudService: perf's file, plus #27104 signedOutCreation (scope, policy, stop, signOut in +Machines) and #26740 autosize/sizePick; listIsCurrent moved to +AppServer as feat did. - debug.object_menu into perf's DebugDriverControl; Home fixture presence/faces beside perf's field. - Palette overlay window #26951 into perf's paletteBuilt. - Per-window Home #27880 in perf's dockTab helper; active team (1bb1b96) on perf's cloudAuth. - Busy refusal (a930474, 2a9b813) in perf's LineTransport split (+State, +Route, framed write). - Launch snapshot sidebar doc (dc38061): DaemonLaunchSnapshot.sidebarDoc, shown once settled (whenSettled), its connect follow a ServiceObservation; the Rust test moved to launch_snapshot_tests.rs. - Hover card corners (bc66475) with perf's interactive flag; Chief pet state (#25671) on perf's ServiceObservation and AppearanceSignals; Chief picture crop (#27933) on perf's lanes and optional store; Home presence (#25578) as a FrameObservation; sidebar tab look (#27530) via SidebarLookFollower; settleOpenings (#24374) with perf's snap; Omnibar imports. - acpmux: inbox digest senders without slicing; withdraw_queued async with from_agents_only; cmux-tui-core and platform: connection leases beside perf's modules and InlineSocket (bounded_outbound.rs takes back the `platform::transport` import perf had dropped, which feat's claim_watched_connection names). - webviews: App/NewTab/NewTabScreen (retry, slash commands, at), settings keys moved to cardRows.ts. - Feat's tests that call perf-changed inits fixed: TabConcentricCornerTests (input:), HomeChatPresenceFacesTests (deadlines:, frame delivery), RemoteChildSessionsTests (main run loop for posted notes). Generators: cargo metadata in cmux-tui, cmux-tui/fuzz, Native/DiffSidecar and optchat-chief changed no lock; gen-features.py --check, gen-chromium-host-wire.py --check and --check-ops, sync-resource-api.py --check pass. webviews: bun run check passes. schemas/settings/settings-schema.json stays perf's (generated; the autofix regenerates it): until then feat's chiefLook.test.tsx misses the home.bubbleColors rows.
#27104 added `public enum ActionTrackedWork` with an all-static public surface, which the package-conventions namespace-type rule refuses, so the cmux-next convention lint has been red on feat-cmux-next since ae7c57b. Its only member took the registry as its first argument, so it becomes what the lint asks for: an extension on the receiver type. `ActionTrackedWork.effect(registry: r, ...)` is now `r.trackedWorkEffect(...)`, with the same body and the same strong capture of the registry. No behavior changes. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cloud): signed-out Cloud actions sign in, then run HQ #4884 finding 2: every Cloud action but New Cloud Machine was greyed out with "run Sign In from the command palette" and no way to act. A person's run (palette, menu, context menu, key) of an action whose only reason is "signed out" now signs in and then runs it, through the same one-pending-replay continuation New Cloud Machine uses (#27104). The CLI, MCP, scripts and pages keep the reason and are refused as before. The registry gains ActionRecovery: a way past an unavailable reason that only a person's gesture takes. The palette keeps such a row enabled with a note that says running it signs in first; menus validate it as enabled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-4bbc87e99e6352cca67a * fix(actions): recovery rows keep the key-equivalent gate; shortcuts reach recovery Review at fff7a59: a recoverable menu row returned before the menuKeyEquivalentGate, so a key the router gave elsewhere could start a sign-in. It now goes through the gate like any enabled row. Key binding resolution (RegistryKeyBindings.canPerform) also counts a recoverable action as runnable, so a shortcut such as New Cloud Workspace's reaches the sign-in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-4bbc87e99e6352cca67a * fix(actions): a recoverable context menu row shows the recovery note Review follow-up at a2fbb3d: ActionTargetTitles.decorate showed the stale "run Sign In from the command palette" reason on a row that is now enabled; it shows what the click does instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-4bbc87e99e6352cca67a * capture(cloud): a signed-out Cloud actions state for before/after stills scripts/cmux-next/media/states/cloud-signed-out-actions.json: the palette's Open Desktop row and a fixture Cloud machine's right-click menu while signed out, the menu left open for the still. debug.cloud_machine_fixture gains `backend: true` (DEBUG only): Cloud reads as reachable in a capture build that has no Cloud backend, so the rows show the signed-out reason a person's build shows instead of "This build has no Cloud backend". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-4bbc87e99e6352cca67a * fix(cloud): a recovered Cloud action waits for the machine list before it runs Review follow-up (P1) at a92b55e: after sign-in the machine list loads asynchronously, so Open Desktop or SSH replayed at once found no machine. The sign-in step now also loads the list (refresh ifOlderThan 30 s) before the replay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-4bbc87e99e6352cca67a * fix(cloud): the recovery reads a current machine list, not a recently started one Review follow-up (P1) at 1a70d1f: refresh(ifOlderThan:) returned at once while another read was in flight or after an account switch dropped the list. The recovery now reads unless the store holds a list for this account from the last 30 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-4bbc87e99e6352cca67a * fix(cloud): a recovery whose list read was superseded reads once more Review follow-up (P1) at aa2a733: the sign-in's own refresh could supersede the recovery's read, which then returned false with the list still pending. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-4bbc87e99e6352cca67a --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: cmux-bot[bot] <348531757+cmux-bot[bot]@users.noreply.github.com>
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Clicking New Cloud Machine while signed out now keeps the original creation request and destination through hosted sign-in. A successful sign-in continues once into the existing workspace wizard or requested-machine flow. Replacing the pending request, cancelling sign-in, signing out, changing account scope, closing its window, or disabling Cloud prevents stale creation.
The native action owns this handoff for the Computer menu, Add Device, and command palette. Standalone sign-in fallbacks in the agent pane and Add Device are removed so a refused action cannot silently discard the creation intent. Nonperson callers still receive the signed-out refusal.
This supersedes the native continuation portion of #24837, which predates the workspace wizard and allows multiple waiters on one browser-auth attempt to resume creation. Its CLI auto-open changes remain separate.
Requested behavior: “person-initiated sign-in then resume exact newCloudMachine once (cancel/replacement safe).”
The pending continuation has one generation; the action registry owns the sign-in work and records its network wait and failure. Replacement, sign-out, and policy teardown invalidate it; auth completion consumes it before invoking creation. The hosted sign-in attempt owns its existing timeout and cancellation.
Validation
101aab62316d43ca06958746aed3e05ce9b02ac4: cmux-ci step71597d472155a75226ce8cdffinished with exit 0 on the native fleet.CloudSignedOutCreationContinuationTestsandCloudWorkspaceSetupLifecycleTests: 19 tests passed across the two suites.AgentPaneConnectActionTests: 7 tests passed. Total: 26 test executions across the three filters; the account replacement test covers four cases.git diff --checkandprepush-gate.pypass; the gate reports only the existing app-size warning. No live browser sign-in was performed; the handoff is exercised through controlled native continuations and the actual action registry.No capture: native action continuation and tests only; existing sign-in and workspace wizard presentations are reused.
Changelog
Fixed: New Cloud Machine continues after sign-in without requiring another click or replaying a superseded request.
Agent session: agent session
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Clicking New Cloud Machine while signed out now holds the original request and resumes creation once after hosted sign-in succeeds, instead of discarding the intent or requiring another click.
ActionTrackedWorkpreserves deferred work and result tasks across the sign-in handoff, so post-auth outcomes surface through the registry.Migration
Written for commit ac6d357. Summary will update on new commits.