Skip to content

feat(ui): show machine CPU and RAM in the cloud picker - #125696

Merged
steipete merged 1 commit into
mainfrom
steipete/capabilities-cpu-ram-display-2c05ae
Aug 18, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/capabilities-cpu-ram-display-2c05ae

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The cloud machine picker described each class in prose. The description was the widest thing in
the row, so it ellipsized — and it never told the operator what they actually pick on:

Before After
before after

Stan…, Cheap smoke checks and sm…, and a clipped Default pill on the left; the real machine
shape, fully fitting, on the right.

Why This Change Was Made

Machine classes are provider-neutral intent labels, so OpenClaw had no authoritative CPU/RAM
source — the schema said exactly that:
"CPU, memory, and price stay absent until providers expose authoritative values."

Rather than mirror per-provider instance tables into OpenClaw, the owning dependency now reports
them: openclaw/crabbox#1396 adds an optional classes array to
crabbox providers --json carrying each class's primary instance type plus its nominal vCPU and
RAM. This PR consumes it.

description was never released (added in #124864; in no tag, not an ancestor of
v2026.8.1-beta.2), so it is deleted rather than deprecated — no compat tail.

User Impact

  • The picker shows 32 vCPU · 64 GB instead of prose, and rows stop clipping.
  • Both surfaces benefit: the new-session where-chip and the placement move dialog share
    renderCloudMachineMenuItems.
  • Operators on an older Crabbox see label-only rows. Missing binary, non-zero exit, timeout,
    unparseable JSON, absent classes, or an unmatched provider all degrade to just the label — no
    error, no empty dash. Numbers appear once that host's Crabbox carries the field.
  • Only aws, azure, gcp, hetzner and namespace-instance report shapes initially; other backends
    show label-only by design.

Evidence

Live gateway (isolated OPENCLAW_STATE_DIR, own port, real Crabbox binary — not a mock).
environments.list over the wire:

{"id":"standard","label":"Standard","cpu":32,"memoryGb":64,"default":true}
{"id":"fast","label":"Fast","cpu":64,"memoryGb":128}
{"id":"large","label":"Large","cpu":96,"memoryGb":192}
{"id":"beast","label":"Beast","cpu":192,"memoryGb":384}

Both screenshots are Playwright captures driving the real picker on that gateway at the same
viewport; the before shot is a full build of origin/main, so both halves (gateway + UI) are
genuinely the prior state.

node scripts/check-changed.mjs                      # exit 0 (format, typecheck, lint, 7 guards)
node scripts/run-vitest.mjs ui/src/pages/new-session extensions/crabbox
                                                    # 9306 passed / 50 skipped; 106 passed
pnpm build                                          # exit 0

$autoreview (Codex gpt-5.6-sol, high): clean, no accepted/actionable findings —
"patch is correct" (0.99).

Production LOC: +133 / −42 (net +91); tests +165 / −28; docs +3 / −3. The growth is the CLI
catalog read — spawn, boundary validation, single-slot lifecycle memoization, and the degradation
paths — offset by deleting the duplicate projectWorkerMachineOption projector that
normalizeWorkerMachineOptions already did.

@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 18, 2026 07:40
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime extensions: crabbox size: M maintainer Maintainer-authored PR labels Aug 18, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 18, 2026
@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 18, 2026, 6:04 PM ET / 22:04 UTC.

ClawSweeper review

What this changes

This PR adds optional CPU and RAM metadata to cloud machine choices, reads it from Crabbox, and renders it in the Control UI picker instead of prose descriptions.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

The rebased head addresses both prior findings: catalogs are keyed by resolved Crabbox binary and the optional catalog request has a five-second timeout. The protected maintainer PR remains open for exact-head CI and maintainer review.

Priority: P2
Reviewed head: 2aeff43806532811e5589f80b6c4227b781a19e1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is coherent and covers the prior cache and timeout regressions, with the remaining operational risk explicitly bounded.
Proof confidence 🌊 off-meta tidepool Not applicable: Contributor proof gating does not apply to this maintainer-authored PR; its body nevertheless supplies live Gateway output and linked picker captures.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Contributor proof gating does not apply to this maintainer-authored PR; its body nevertheless supplies live Gateway output and linked picker captures.
Evidence reviewed 7 items Current-main baseline: Current main exposes synchronous machine options with only an optional description, establishing the pre-PR provider and protocol behavior.
Provider implementation: The PR runs the optional catalog command with a five-second budget, keys its single-flight cache by resolved binary, and falls back to an empty catalog on failure.
Gateway and UI boundary: The Gateway awaits provider options before returning profiles, and the UI renders CPU-only, memory-only, combined, and absent-shape cases without an empty sub-line.
Findings None None.
Security None None.

Live Verification

Command: pnpm openclaw --help

Result: PASS (completed)

pnpm openclaw --help
runner@runnervm76f27:/tmp/clawsweeper-live-proof-125696-KQgd3e/target$ pnpm openclaw --help
$ node scripts/run-node.mjs --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
pnpm openclaw --help
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 400.66 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 64.81 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.4s
node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

[tsdown-build] invocation 2/2 finished in 9.5s
[plugin-control-plane-loads] verified 36 built modules with native require and checked doctor closures
runtime-postbuild: 10 phases completed in 2463ms (slowest: built plugin control-plane loads 1892ms)

OpenClaw 2026.8.1 (2aeff43) — All your chats, one OpenClaw.

Usage: openclaw [options] [command]

Options:
  --container ‹name›   Run the CLI inside a running Podman/Docker container named ‹name› (default: env OPENCLAW_CONTAINER)
  --dev                Dev profile: isolate state under ~/.openclaw-dev, default gateway port 19001, and shift derived ports (browser/canvas)
  -h, --help           Display help for command
  --log-level ‹level›  Global log level override for file + console (
… output truncated …

Assertions:

  • PASS expect_output: Usage:

How this fits together

Cloud worker providers supply machine options to the Gateway, which validates them and returns them to the Control UI. The picker displays provider-supplied machine shape when available and keeps label-only choices when the optional Crabbox catalog cannot be read.

flowchart LR
A[Cloud worker profile] --> B[Crabbox provider]
B --> C[Machine catalog command]
C --> D[Gateway validation]
D --> E[Environment list response]
E --> F[Cloud machine picker]
Loading

Before merge

  • Resolve merge risk (P2) - environments.list now awaits an optional child-process catalog; a hung Crabbox binary delays the picker by up to five seconds before label-only fallback.
  • Resolve merge risk (P1) - The required structured autoreview did not run because TruffleHog is unavailable in this reviewer environment.
  • Complete next step (P2) - No mechanical repair remains; the maintainer label keeps this PR in normal exact-head CI and maintainer-review flow.
Agent review details

Security

None.

PR surface

Source +116, Tests +193, Docs 0. Total +309 across 24 files.

View PR surface stats
Area Files Added Removed Net
Source 11 158 42 +116
Tests 10 227 34 +193
Docs 3 3 3 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 24 388 79 +309

Review metrics

Metric Value Why it matters
Production versus test delta production +158/-42; tests +227/-34; docs +4/-4 The feature adds a provider catalog boundary and validation while substantially extending focused provider, protocol, Gateway, and UI coverage.

Stored data model

Persistent data-model change detected: durable storage schema: src/gateway/worker-environments/provider-lifecycle.ts, durable storage schema: src/gateway/worker-environments/provider-provisioning.test.ts, durable storage schema: src/gateway/worker-environments/service-validation.ts, serialized state: extensions/crabbox/src/crabbox-worker-provider.test.ts, serialized state: extensions/crabbox/src/crabbox-worker-provider.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Accept the bounded picker delay (recommended)
    Keep the five-second catalog timeout and label-only fallback, which limits a failed optional catalog without blocking placement operations.

Technical review

Best possible solution:

Keep the per-binary, five-second bounded fallback and land only after exact-head CI and the protected maintainer review are complete.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a feature change, and the PR supplies live Gateway output plus focused provider and picker coverage rather than a bug reproduction.

Is this the best way to solve the issue?

Yes. It extends the existing generic worker-provider catalog instead of hardcoding provider machine tables in the UI, while preserving label-only output for older or unavailable Crabbox catalogs.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b34eb16071f5.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Contributor proof gating does not apply to this maintainer-authored PR; its body nevertheless supplies live Gateway output and linked picker captures.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded cloud-picker ergonomics feature with no demonstrated failure of existing placement behavior.
  • merge-risk: 🚨 availability: The Gateway response path waits for the optional Crabbox catalog, although the PR bounds failure to five seconds and falls back to labels.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Contributor proof gating does not apply to this maintainer-authored PR; its body nevertheless supplies live Gateway output and linked picker captures.

Evidence

What I checked:

Likely related people:

  • steipete: Merged the cloud-worker machine picker foundation and has the dominant recent history across the Crabbox provider, Gateway lifecycle, protocol, and picker paths. (role: feature owner and recent area contributor; confidence: high; commits: 78beccf05397, 2aeff4380653, 99acca309c3c; files: extensions/crabbox/src/crabbox-worker-provider.ts, src/gateway/worker-environments/provider-lifecycle.ts, packages/gateway-protocol/src/schema/environments.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-18T07:47:25.393Z sha 24c679b :: needs changes before merge. :: [P2] Key machine-shape caches by resolved binary | [P2] Keep optional catalog loading off the picker response path

The cloud machine picker described each class in prose ("Cheap smoke checks
and small repos"), which was the widest thing in the row, got ellipsized, and
did not say what the operator actually picks on. Machine options now carry the
class shape and the picker renders "32 vCPU · 64 GB" instead.

Crabbox reports per-provider class shapes from `providers --json`; the plugin
reads that catalog once per lifecycle and attaches cpu/memoryGb to each option.
A missing binary, failed command, unparseable output, absent classes, or an
unmatched provider all degrade to label-only rows, so an older Crabbox keeps
working.

`description` was never released, so it is removed rather than deprecated, and
listMachineOptions becomes async for the catalog read. Deletes the duplicate
machine-option projector in the environments server method.
@steipete
steipete force-pushed the steipete/capabilities-cpu-ram-display-2c05ae branch from 24c679b to 2aeff43 Compare August 18, 2026 21:57
@steipete

Copy link
Copy Markdown
Contributor Author

Both P2 findings fixed in 2aeff438065 (rebased onto current main).

Key machine-shape caches by resolved binary — you were right and my inline comment was wrong.
I had recorded the shared catalog as an accepted tradeoff, reasoning that profiles on different
Crabbox builds are exotic. They are not: settings.binary is profile-owned and
environments.list loads every profile concurrently, so one profile could show another binary's
CPU/RAM. Now a Map<string, Promise<CrabboxMachineShapes>> keyed by resolved binary, single-flight
per binary. The comment now explains why the key exists instead of excusing its absence.

Keep optional catalog loading off the picker response path — fixed by bounding it. The read
inherited CRABBOX_LIFECYCLE_TIMEOUT_MS (60s) while the Gateway awaits it, so a hung binary stalled
the whole picker for a minute instead of falling back to label-only rows. It now uses a dedicated
CRABBOX_MACHINE_CATALOG_TIMEOUT_MS of 5s — providers --json is a static compiled report with no
network or credentials, measured at ~240ms, so 5s is ~20x headroom and a hang degrades promptly.
I kept the read on the response path rather than moving it off: a background refresh would need
staleness and in-flight state for a one-shot process-stable read, and the harm you identified was
the duration, not the placement. Happy to revisit if you disagree.

You also noted the old timeout test "returns immediately and misses that path" — correct, it never
asserted which budget was used. Two new tests, both of which fail on the pre-fix code:

  • two explicit binaries get separate catalogs (pre-fix: second profile returns the first's 32 vCPU
    instead of its own 8)
  • the catalog read requests CRABBOX_MACHINE_CATALOG_TIMEOUT_MS and asserts it is below the
    lifecycle budget (pre-fix: 60000)

On the stored data model flag: no persistence change here. The listed files are the in-memory
worker-machine-option contract (WorkerMachineOption, its protocol schema, and the normalizer);
no SQLite schema, no migration, no on-disk format. description was unshipped (added in #124864,
in no tag, not an ancestor of v2026.8.1-beta.2), so it is deleted rather than deprecated.

Verification on the rebased head: check-changed exit 0; extensions/crabbox 109 passed;
the two ui/src/e2e new-session specs 4 passed; $autoreview clean before these fixes and
re-run pending on the new head.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 18, 2026
@steipete
steipete merged commit 1d9cda8 into main Aug 18, 2026
420 of 423 checks passed
@steipete
steipete deleted the steipete/capabilities-cpu-ram-display-2c05ae branch August 18, 2026 22:38
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
The cloud machine picker described each class in prose ("Cheap smoke checks
and small repos"), which was the widest thing in the row, got ellipsized, and
did not say what the operator actually picks on. Machine options now carry the
class shape and the picker renders "32 vCPU · 64 GB" instead.

Crabbox reports per-provider class shapes from `providers --json`; the plugin
reads that catalog once per lifecycle and attaches cpu/memoryGb to each option.
A missing binary, failed command, unparseable output, absent classes, or an
unmatched provider all degrade to label-only rows, so an older Crabbox keeps
working.

`description` was never released, so it is removed rather than deprecated, and
listMachineOptions becomes async for the catalog read. Deletes the duplicate
machine-option projector in the environments server method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation extensions: crabbox gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant