Repository navigation
feat(ui): show machine CPU and RAM in the cloud picker - #125696
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 18, 2026, 6:04 PM ET / 22:04 UTC. ClawSweeper reviewWhat this changesThis 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 readinessThe 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 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherCloud 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]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +116, Tests +193, Docs 0. Total +309 across 24 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
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.
24c679b to
2aeff43
Compare
|
Both P2 findings fixed in Key machine-shape caches by resolved binary — you were right and my inline comment was wrong. Keep optional catalog loading off the picker response path — fixed by bounding it. The read You also noted the old timeout test "returns immediately and misses that path" — correct, it never
On the stored data model flag: no persistence change here. The listed files are the in-memory Verification on the rebased head: |
|
Merged via squash.
|
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.
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:
Stan…,Cheap smoke checks and sm…, and a clippedDefaultpill on the left; the real machineshape, 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
classesarray tocrabbox providers --jsoncarrying each class's primary instance type plus its nominal vCPU andRAM. This PR consumes it.
descriptionwas never released (added in #124864; in no tag, not an ancestor ofv2026.8.1-beta.2), so it is deleted rather than deprecated — no compat tail.User Impact
32 vCPU · 64 GBinstead of prose, and rows stop clipping.renderCloudMachineMenuItems.unparseable JSON, absent
classes, or an unmatched provider all degrade to just the label — noerror, no empty dash. Numbers appear once that host's Crabbox carries the field.
show label-only by design.
Evidence
Live gateway (isolated
OPENCLAW_STATE_DIR, own port, real Crabbox binary — not a mock).environments.listover 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) aregenuinely the prior state.
$autoreview(Codexgpt-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
projectWorkerMachineOptionprojector thatnormalizeWorkerMachineOptionsalready did.