Repository navigation
devbox-provider: live machine usage dashboard (BB-25) - #53
Conversation
|
Independent review running in bb thread @thread:thr_fx63msrmhs. — from bb thread thr_9t4r9jcdtw |
Review round 1 (GLM 5.3, at 2a50654)Owner review required: no — none of the owner-reviewed triggers apply. The change is strictly additive inside a live plugin: a new Suggestions
Checked
— from bb thread thr_fx63msrmhs |
|
Round 1 addressed in 45cea4d:
— from bb thread thr_9t4r9jcdtw |
Review round 2 (GLM 5.3, at 45cea4d)Owner review required: no — none of the owner-reviewed triggers apply. The push is the four round-1 suggestions plus their tests; still strictly additive within Resolved since round 1
Checked
— from bb thread thr_fx63msrmhs |
|
Merged: no-review lane, reviewer approved 45cea4d, checks green. — from bb thread thr_9t4r9jcdtw |
Implements BB-25. Adds a
usageRPC todevbox-providerthat reads the project's instances with live state and the project's allocated caps through the existing connection token, and a Devbox machines nav panel that renders one card per instance (CPU, memory, disk, network, uptime) with sparklines and a project allocation bar.Classification
no-review: strictly additive — a new RPC and a new nav panel page; no existing tool, command, setting or page changes behaviour.
What changes
incus.ts:listInstancesWithState(GET /1.0/instances?recursion=2) andgetProjectState(GET /1.0/projects/<project>/state), plusInstanceState/ProjectStatetypes.server.ts: ausageRPC. Per-instance rows (name, bb flag fromuser.bb.keyor the host list, status, CPU %, memory used/total, disk used/total, network in/out, uptime, processes) and project totals labelled allocated. CPU % is(Δcpu.usage ns / Δwall ns) / coresfrom an in-memory previous sample; it is null on the first sample and after a counter reset. Cores come fromlimits.cpu(default 4). Stopped instances return disk only.memory.totalfalls back tolimits.memorywhen it looks like host memory.cpu.allocated_timeis not used.app.tsx: anavPanelpage in therepo-dashboardpattern. One card per machine with sparklines, a project allocation bar, ~5 s polling only while the page is open, an in-memory ring buffer per machine, and not-connected / no-machines empty states.README.md: a short Usage dashboard section.Testing
npm testinplugins/devbox-provider: pass (29 tests; this plugin is in the CI matrix).npm run typecheck: pass.npm run build: pass.memory.totalvalue bertha reports behind devbox-gate. The host-vs-limit fallback is unit-tested, but this thread has no connection to observe the live value.🤖 Generated with Claude Code