Cloud: open detected ports through private live previews
Cloud Machine Ports discovers listeners on configured NEXT Cloud machines and offers an Open in Browser chooser. cmux cloud machine-ports returns the same private preview links, and cloud open-browser --port N --path /docs opens the authenticated preview in the app browser while preserving its sign-in bootstrap.
Leo: “yeah we have bits and pieces of this with the computer use preview but i think we can do better” (HQ #5846, item 9).
Preview discovery and ingress belong to cmux-platform. The client calls its new POST /v1/cloud/machines/{id}/previews/refresh directly with the existing person access token and team. Debug builds using the staging Cloud owner select platform staging; an explicit debug HTTPS origin can configure another development preview API. Builds without preview ingress keep their existing browser and port behavior. Classic routes and the computer-use card keep their existing behavior.
The existing port strings and catalog move to CmuxNextCloudUI, keeping the app module smaller. Design: leo-workspace design/cloud.md. Prior art read: #25284 (port/browser actions), #28279 (pending port actions). pr-overlap reported no overlapping open PR.
Observed / Not run
- Passed: prepush static gate, XCStrings structure, localization default parity, test wiring, scoped CloudPorts localization (within existing debt), and feature policy.
- Added behavioral coverage for the exact new API route and account/team headers, production fallback, bootstrap token/path preservation, insecure URL refusal, the native chooser, and CLI result fields. Fleet Linux app compile passed at
924af0f3f43c718748aa7f1a4cfef9a10d2392bb(job47d9a55263d66246d01b72b9, 65 seconds). Fleet native test binary compiled successfully;CloudLivePreviewTests(7 tests) andCloudBrowserActionTests(13 tests) both passed (jobc779c9df80c95f10964ae260, exit 0). The first fleet compile caught a pane-controller/model mismatch; this head fixes it. - Local Swift parsing is unavailable because this lane has no Swift compiler. Broad preflight also reports existing localization debt and missing CmuxDeviceHub workspace grouping at base
88080e84e81a83f29ef29495c5a716bd6b588bdd; this PR changes neither package membership nor those catalogs. - No capture: the real Cloud preview route needs the matching platform deployment and authenticated DEV probe. This PR alone is not item-9 delivery; the owner will read back the real preview in DEV before calling the item working.
Risk: the configured staging path now uses private HTTPS ingress; production keeps its existing path. No new timers or observers.
Agent session: agent session