cmux NEXT Cloud: a storefront with your plan's sizes and one-click Get, featured in the App Store
Cloud machines were hard to find in cmux NEXT. A signed-out Cloud page said "Sign in" and nothing else, and a team with no machines saw "No machines yet". This PR adds a storefront for them and a way in from the App Store.
Cloud page storefront (webviews/src/pages/cloud/Storefront.tsx). It shows when you're signed out, when the team has no machines, or at #/get. Once a team has a machine, a header button switches between "Your Machines" and "Sizes and Plans".
- Hero: a headline, one short paragraph, and an SVG of work moving from a laptop to a cloud machine. The packets only animate inside
prefers-reduced-motion: no-preference, and the host'sdata-cmux-motion=offstills them. - Three benefits: it keeps running while the Mac sleeps, it takes the load off the Mac, and you can snapshot a machine and start new ones from it.
- Sizes are cards built from the live
CloudPlan:memory_options_mb, with locked sizes marked "Not in your plan" and linked to See Plans. Each card has a suggested use. Live availability reads "3 of 5 machines active" fromplan.usageandplan.limits.max_active. Once the limit is reached, Get is disabled and the line says so. - Get opens the existing create sheet on that size. The host still confirms the create natively, since it's a money op. When the create answers, the page switches to the machine list with the new machine selected. The first time the watch mirror shows that machine
running, the page runs the host's connect action, which opens it in a workspace. If the machine fails or is deleting first, the page drops the request without connecting. - The copy is honest: no prices and no computed limits. Every number comes from the plan. The footnote says you confirm each machine and can pause or delete it at any time.
App Store (webviews/src/pages/apps/CloudFeature.tsx). The top of the Discover home gets a featured "Cloud Machines" banner (only when there's no query and no category). Its button runs app.open {app: "cmux/cloud"}. AppsPage.tsx changes by two lines, so this doesn't collide with #21997's Discover restore.
Strings: 25 new Cloud page keys and 4 store.cloud.* keys in all 21 languages. Non-English entries are marked needs_review.
Gallery (pages.cloud): new variants storefront, storefront-full and storefront-get. empty and signed-out now render the storefront, so they show the before and after. pages.apps list shows the banner.
Observed / Not run
- Ran on this branch:
bun test src/pages/cloud src/pages/apps test/apps-flow.test.ts(22 pass, 1 browser-lane skip). That includes the newstorefront.test.ts: the route, Get preselects the size, a locked size falls back, a machine created by Get connects once when it runs, New Machine never auto-connects, and a failed machine drops the request. - Also passed:
bun run typecheck(no errors in 1877 files),vp fmt/vp linton the changed folders, and check:type-scale, check:system-blue, check:layers, check:text-focus, check:dialog-keys and check:status-glyphs. - Not run: the full
scripts/web-lint.shlocally (it timed out under the Mac's load; CI's web lint covers it). No screenshots yet; the gallery advisory run captures the variants above. No Swift changes, so no Mac build is needed. - The real connect path after a real create depends on the host's
cmux.cloud.machine.connectaction, which already exists. I didn't exercise it against a live Cloud backend.
Changelog
Added: The Cloud page has a storefront with your plan's machine sizes, live availability and one-click Get, and the App Store features cmux Cloud.
🤖 Generated with Claude Code
Agent session: cosmic-gray
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Adds a Cloud machine storefront to the cmux NEXT Cloud page and features it in the App Store, in both the web and native SwiftUI stores. Previously a signed-out or machine-less team saw only "Sign in" or "No machines yet"; now they get a storefront with the plan's sizes, live availability, and one-click Get.
- Size cards come from the live plan: locked sizes show "Not in your plan" and link See Plans with the size named, and availability reads "3 of 5 machines active" from usage and limits. Get disables when the active limit is reached; while the plan loads the storefront offers nothing, and a failed plan read shows the failure with Retry.
- Get opens the existing create sheet on that size; the host still confirms the create natively. The new machine connects once the mirror shows it running (its detail also loads via select), and a failed or deleting machine drops the connect without opening. The open wish survives a Retry while the confirm sheet is open; sign-in, sign-out, or team switch clears it, and a create answered after one of those is neither selected nor opened.
- The storefront carries the account panel, so sign-out, team switch, and usage stay reachable on an empty team.
- Discover's featured Cloud Machines banner shows when there's no query or category and opens the Cloud page; the native SwiftUI store (the default surface) gets it via
AppStoreModel's newonOpenApp, wired on the existing init line soAppsServicestays the same size. - The storefront shows when signed out, when the team has no machines, or at
#/get, and the URL fragment follows the view. Once a team has a machine, a header button switches between Your Machines and Sizes and Plans.
Testing
- Runs
storefront.test.tscovering route parsing, size preselect, locked-size fallback, auto-connect after Get, failed-machine drops, a failed plan read with Retry, and a create answered after a team switch. - Typecheck and focused lint/style checks pass; the full web lint and live backend connect path were not run.