Repository navigation
cmux NEXT: a Cloud machine's sidebar header shows its rate, running time, cost so far and the account's machine cap - #23691
Conversation
…its rate, running time, estimate and the account's cap Red on base: CloudMachine has no hourlyRateUsd or runningSince, /api/vm's limits are not decoded, and SidebarMachine carries no cost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d3e-acc6-7a03-a574-453e3de27340&host=cosmic-gray
Hovering a Cloud machine's sidebar header now shows, under its status: $0.26/h · Running 2h 14m · About $0.59 so far 2 of 3 machines running A paused machine shows only "$0.26/h when running". The cap reads "N running, no machine cap" when the plan has none (null) and "Machines are closed on this plan" when it is zero. The running time and estimate are recomputed on each hover. Every number is a server fact: the rate (hourlyRateUsd) and last start (runningSince) on each /api/vm machine, and limits.maxActiveVms / activeVmCount, now decoded and kept on MachineRegistry.cloudLimits. The app holds no rate table and never infers a cap from its machine list. A malformed value drops the line, never the machines. cloud machine-status also answers hourly_rate_usd, running_since (ISO 8601) and estimated_cost_usd, and its text gains the cost line. Strings are localized in all 21 locales of the sidebar catalog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d3e-acc6-7a03-a574-453e3de27340&host=cosmic-gray
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Owned by cloud-team-ready on cosmic-gray · session |
|
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)
Passes: CI passes on CI passes on Written by red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on db5d0b0 to compare; do not merge until green; see lane-rules Tour of |
|
Found 11 test failures on Blacksmith runners: Failures
...and 1 more test failures. View all on Blacksmith
|
|
Bead |
…ost test names the sidebar's SidebarSection Fleet step 99d9c5cebdea: Date and Locale in public signatures need a public Foundation import under InternalImportsByDefault, and CmuxNextDaemon also declares SidebarSection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d3e-acc6-7a03-a574-453e3de27340&host=cosmic-gray
…t; the rate reads per hour in five more locales Review gates on ec7ad84: a public all-static enum is a namespace type (package conventions), and "%@/h" was identical to English in bs, es, fr, it and pt-BR (localization debt ratchet). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d3e-acc6-7a03-a574-453e3de27340&host=cosmic-gray
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
|
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d3e-acc6-7a03-a574-453e3de27340&host=cosmic-gray
|
|
|
Review (subagent, correctness first): SHIP at 9e3c63f The review covered the PR diff against the base it merged (db5d0b0..9e3c63f) and found nothing blocking.
|
CloudMachine.swift: keep both the idle-pause fields (pauseReason, idlePauseMinutes) and the cost-line fields from #23691. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d3e-acc6-7a03-a574-453e3de27340&host=cosmic-gray
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Pilot blocker 1b, app half. When you hover a Cloud machine's sidebar header, the tooltip now shows what the machine costs and the account's machine cap.
cloud machine-statusalso returns the cost to agents.What a person sees
Hovering a Cloud machine's header in the sidebar shows this under its status:
$0.26/h when running, with no running time or estimate.limits.maxActiveVmsis null), the cap line readsN running, no machine cap. If the cap is0, it readsMachines are closed on this plan.Why the header tooltip: it is the existing place a person hovers over one machine. The rest of the app has no machine hover card. Machine settings show only a name and a connected flag. Cloud Machine Status is a 12 s toast that shows only one line. The header is also where a person looks before resuming or starting another machine.
Where the numbers come from
Everything comes from the server; the app has no rate table of its own:
/api/vm:hourlyRateUsdandrunningSince. The server PR is cmux Cloud: /api/vm machines carry their hourly rate and when they started running #23682, which takes the rate from the shared rate table inweb/services/billing/chiefPricing.ts. Until cmux Cloud: /api/vm machines carry their hourly rate and when they started running #23682 deploys, these fields are absent and no cost line shows.limitsobject of/api/vm:maxActiveVmsandactiveVmCount. The server already sends it; the app now decodes it and keeps it onMachineRegistry.cloudLimits. The cap is never inferred from the machine list (fix(cloud): a zero machine cap is not a fraction #16012).Agents
cmux cloud machine-status --target machine:vm-…now also returnshourly_rate_usd,running_since(ISO 8601) andestimated_cost_usd, and its text gets the same cost line.cloud list-machines(#23570, not merged yet) should returnlimits {max_active_vms, active_count}. That follow-up depends on #23570, so it's not in this PR and I didn't touch the files #23570 changes.Proof
CloudMachineCostTests(CmuxNextAppTests) covers:limits, not from counting the list;Fleet steps (
package-test-lane.sh suite, Xcode 26.6): redc8bca577a9c2e9ee68c0c26aat the test-only commit 462640f (CloudMachinehas no memberhourlyRateUsd, noMachineCostText); green2544f59e2c85ba6cca8886dbat eac5d29, the last commit with PR changes. That run covered CloudMachineCostTests, SidebarIconMeaningTests, CloudMachineCapabilityTests, CloudCLITargetTests and HostGroupHeaderStatusTests, and all passed. The head 9e3c63f only adds a base merge of feat-cmux-next on top of it.cmux-ci compile-check --apppassed at that head (fleet job9fed05893ce835fc4b7c0eed).Note on the estimate: the rate is the provider's list price for the machine's size. Plans are flat today, so the line is an estimate of compute used, not a bill.
Strings are localized in all 21 sidebar-catalog locales.
check-l10n.shreports 0 errors andprepush-gate.pyis clean.Capture: native UI, but the tooltip only shows on hover over a live Cloud machine with server cost data, and no tour scene covers that, so I added the
media-tourlabel.🤖 Generated with Claude Code
Agent session: cosmic-gray