Skip to content

cmux NEXT: a Cloud machine's sidebar header shows its rate, running time, cost so far and the account's machine cap - #23691

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
cloud-machine-cost-line
Oct 22, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
cloud-machine-cost-line

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

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-status also returns the cost to agents.

What a person sees

Hovering a Cloud machine's header in the sidebar shows this under its status:

Connected
$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, with no running time or estimate.
  • If the plan has no cap (limits.maxActiveVms is null), the cap line reads N running, no machine cap. If the cap is 0, it reads Machines are closed on this plan.
  • The running time and estimate are recalculated every time you hover, so they never go stale.
  • VoiceOver reads the same lines (accessibility help).

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:

Agents

cmux cloud machine-status --target machine:vm-… now also returns hourly_rate_usd, running_since (ISO 8601) and estimated_cost_usd, and its text gets the same cost line. cloud list-machines (#23570, not merged yet) should return limits {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:

  • rate and estimate formatting ($0.26, 2h 14m, 3d 4h, under a minute shows as 1m, under one cent);
  • the cap for null, 3 and 0, and that it comes from limits, not from counting the list;
  • a paused machine shows no running cost, in both the tooltip and the CLI fields;
  • decoding, including malformed values;
  • the header tooltip, and that an SSH header ignores cost;
  • the machine-status fields.

Fleet steps (package-test-lane.sh suite, Xcode 26.6): red c8bca577a9c2e9ee68c0c26a at the test-only commit 462640f (CloudMachine has no member hourlyRateUsd, no MachineCostText); green 2544f59e2c85ba6cca8886db at 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 --app passed at that head (fleet job 9fed05893ce835fc4b7c0eed).

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.sh reports 0 errors and prepush-gate.py is 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-tour label.

🤖 Generated with Claude Code
Agent session: cosmic-gray

teamleaderleo and others added 2 commits October 21, 2026 13:02
…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
@teamleaderleo teamleaderleo added media-tour Run the cmux-next UI tour (cmux-next-media.yml) on every push risk:low Risk tier (docs/ci/risk-tiers.md) labels Oct 21, 2026
@cursor

cursor Bot commented Oct 21, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot 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.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by cloud-team-ready on cosmic-gray · session

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 9e3c63f: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr23691 -f ref=cloud-machine-cost-line -f platform=macos -f backend_mode=local

Passes: CI passes on 9e3c63f547.

CI passes on 9e3c63f547 (run 39705346622 attempt 1).

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

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 9e3c63f547 (run): no media. The tour job failed before the tour ran (build or setup); the run log has the output.

@blacksmith-sh

blacksmith-sh Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Found 11 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmp0alqqr9m/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpkae594jj/summary-fail.json (live):/summary-fail.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
convention violations found (ERROR lines above)./
convention violations found (ERROR lines above).
View Logs
nightly cmux-tui resolve/nightly cmux-tui resolve View Logs
test_every_submodule_free_checkout_on_an_owned_runner_resets_submodules (main.Reuse
dWorkspaceSubmodules.test_every_submodule_free_checkout_on_an_owned_runner_resets_submo
dules)/
test_every_submodule_free_checkout_on_an_owned_runner_resets_submodules (main.Reuse
dWorkspaceSubmodules.test_every_submodule_free_checkout_on_an_owned_runner_resets_submo
dules)
View Logs
test_every_submodule_free_checkout_on_an_owned_runner_resets_submodules (main.Reuse
dWorkspaceSubmodules.test_every_submodule_free_checkout_on_an_owned_runner_resets_submo
dules) (job='web-bundles')/
test_every_submodule_free_checkout_on_an_owned_runner_resets_submodules (main.Reuse
dWorkspaceSubmodules.test_every_submodule_free_checkout_on_an_owned_runner_resets_submo
dules) (job='web-bundles')
View Logs

...and 1 more test failures. View all on Blacksmith

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-hxr9t created for this PR by the cmux coordinator.

…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
@cursor

cursor Bot commented Oct 21, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot 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.

@github-actions github-actions Bot added risk:normal Risk tier (docs/ci/risk-tiers.md) and removed risk:low Risk tier (docs/ci/risk-tiers.md) labels Oct 21, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / nightly-guards / workflow-guard-tests / release-notary is red on 14 of 20 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / cmux-next localization debt ratchet is red on 20 of 20 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next crash-class rules / cmux-next crash-class rules is red on 11 of 11 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent, correctness first): SHIP at 9e3c63f

The review covered the PR diff against the base it merged (db5d0b0..9e3c63f) and found nothing blocking. cmux-ci compile-check --app passed at this head (fleet job 9fed05893ce835fc4b7c0eed). The cost suites passed in fleet step 2544f59e2c85ba6cca8886db at eac5d29, the last commit with PR changes. Remaining reds, none of them from this PR:

@teamleaderleo
teamleaderleo merged commit 09364d7 into feat-cmux-next Oct 22, 2026
@teamleaderleo
teamleaderleo deleted the cloud-machine-cost-line branch October 22, 2026 03:18
teamleaderleo added a commit that referenced this pull request Oct 22, 2026
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
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 9e3c63f5 Deployed Oct 22, 2026 by teamleaderleo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

media-tour Run the cmux-next UI tour (cmux-next-media.yml) on every push risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant