Remap Cloud workspace shortcuts

Merged
AU
1mo ago
+1121-401

Cmd-N now always creates a local workspace. Cmd-Y creates a Cloud workspace using the last usable Cloud context and opens New Cloud Machine when none is available; Cmd-Shift-Y always opens New Cloud Machine.

The shared routing paths, Settings defaults, menu and command-palette actions, accessibility-facing labels, localization keys, web shortcut data, and Cloud documentation now use the same scopes. Regression coverage exercises local Cmd-N, Cloud target resolution and fallback, Cmd-Shift-Y, custom bindings, menu hints, and palette mappings.

Changelog

  • Changed: Remapped workspace shortcuts so Cmd-N is local, Cmd-Y follows Cloud context, and Cmd-Shift-Y opens New Cloud Machine.

Validation

  • python3 scripts/verify-local.py --swift-changed (17/17 selected checks passed; native app compilation/tests are excluded by the local verification policy)
  • python3 scripts/localization_catalog.py check (10 catalogs, 9 locales; 0 parity errors)
  • scripts/sync-test-wiring (clean)
  • git diff --check
  • Focused local-workspace regression coverage now includes no-argument routing and repeated Cmd-N in a Cloud-anchored group; the approved nx-remote package-test route was attempted at this SHA but is blocked because this machine cannot resolve cmux-lawrence-2.
  • ./scripts/localize-changes (reports the repository's existing translation debt/manual attention; no catalog parity errors)
  • Hosted macos / swift-package-tests passed on the current PR head in run 38014289845; the separate macOS compile admission check is still pending.
  • Fleet build v4 succeeded for exact SHA ae1b5398d61412d53f8d8432030216a7b182fccb, tag 12240-cloud-shortcut-remap-v4, job f1eac7a67e8621252b9adda4, artifact sha256:620cc7ac859ab99287e6eb3b697920da4cc35896eebe09a968a2c9e647893fd1, published at HQ build.
  • Retired the exact v3 development backend with the approved stop/remove flow; cleanup-dev-builds dry-run found no matching local v1-v3 artifacts and removed nothing.

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


Summary by cubic

Remaps workspace shortcuts so Cmd-N always creates a local workspace, Cmd-Y creates a Cloud workspace on the last usable Cloud context (falling back to the New Cloud Machine flow when none is usable), and Cmd-Shift-Y always opens the New Cloud Machine flow. Previously Cmd-Y opened New Cloud Machine, Cmd-Shift-Y created a Cloud workspace, and Cmd-N could create a Cloud workspace when a Cloud one was selected.

Routing

  • Both creation paths share actions carrying a selectionRevision so Cloud admission resolves the right workspace before provider lookup; retries don't re-admit an already-accepted pane.
  • Clicking a Cloud sidebar row sets it as the Cmd-Y target immediately, and Cmd-Y can pre-admit a local pane with a predicted title before the provider resolves.

Scope and coverage

  • Updates default bindings, plus-button and context menus, the command palette (new New Cloud Workspace entry), localization keys, web shortcut data, READMEs across 24 locales, and docs; the obsolete "no machines" alert string is removed.
  • Adds regression tests for local Cmd-N routing, optimistic Cmd-Y selection, fallback, retries, Cmd-Shift-Y, custom bindings, menu hints, and palette mappings.

[!NOTE]
Medium Risk
Touches primary keyboard routing and Cloud workspace admission/focus races across many entry points; behavior is heavily tested but mistakes could mis-route creates or focus the wrong workspace after async Cloud work.

Overview
Cmd-N, Cmd-Y, and Cmd-Shift-Y are remapped: ⌘N always creates a local workspace (File menu, titlebar, palette, Ghostty new_tab, plus-menu “New Workspace”), ⌘Y creates a Cloud workspace on the last usable Cloud context, and ⇧⌘Y always opens New Cloud Machine. Default shortcuts, README tables (all locales), docs, and web shortcut examples match this layout.

Cloud targeting and async safety gain a navigation selectionRevision on creation requests so focus/admission only applies while the user’s selection is still current. Sidebar Cloud row clicks can record a provisional machine (no local workspace yet) via selectCloudMachine / recordCloudWorkspaceSelection, so ⌘Y follows the clicked row before projection finishes. ⌘Y pre-admits a local pane with a predicted title (reserveLocalWorkspace) before provider lookup; missing fleet or access now falls back to New Cloud Machine instead of a “no machines” alert, while arbitrary provider errors do not trigger that fallback.

Local creation adds performNewLocalWorkspaceAction with explicit working-directory inheritance rules (including Cloud-anchored groups) and threads inheritWorkingDirectory through group creation. Command palette adds New Cloud Workspace; the obsolete machines.workspace.noMachines string is removed.

Reviewed by Cursor Bugbot for commit 7815b339de5a7503ed3c656def75f998eea7fddd. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • New Features
    • Added a New Cloud Workspace command to the command palette. It uses the most recently selected usable Cloud machine, or opens the New Cloud Machine flow if none is available.
  • Updates
    • ⌘Y creates a Cloud workspace; ⇧⌘Y opens the New Cloud Machine flow.
    • ⌘N creates a local workspace, including when a Cloud workspace is selected. Local workspaces inherit the working directory only when appropriate for the selected workspace.