Show host CPU / RAM vitals in the sidebar #19
No reviewers
Labels
No labels
bug
docs
enhancement
good first issue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pedromcaraujo/forge!19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "sidebar-host-vitals"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #18.
What
Whole-box CPU and RAM gauges at the foot of the sidebar, polled from a new
/vitalsendpoint on the tmux sidecar. Global only — per-channel usage isgoing in Claude Code's own status line instead.
Backend —
web/tmux_ctl.pyGET /vitals, read straight from/proc(no psutil, so the sidecar keeps thesame dependency set as the rest of the launcher):
cpu— busy %, measured as a delta between successive polls, so each answercovers exactly the window the user just watched. A fresh 150ms sample is
taken when there's no usable previous one (first call after a restart, or
after a >60s gap because the tab was hidden).
mem— usesMemAvailable, so page cache doesn't read as "full".swap,disk(the session user's home),load,cores,uptime.Every field is independently nullable; anything unreadable comes back
nulland the frontend hides that gauge rather than inventing a zero.
modules/launcher.nixproxies/vitalsalongside/status.Frontend —
web/index.htmlTwo gauges + a secondary line (
6.2G/7.8G · disk 72%), with load/swap/uptimein the tooltip. Amber past 75%, red past 90% — darkened in the light theme,
where the dark palette's amber washes out on a Boox. On mobile it collapses to
a
CPU 34% RAM 80%pill beside the channel chips.Polling is 5s and skipped while the tab is hidden: the cadence is the CPU
averaging window, and a phone in a pocket shouldn't keep the box awake. The
existing visibility handler catches back up on focus.
Test plan
nix flake checkpassescheck-launcher.mjs)/vitalsreturns sane values across successive calls (TestClient)and light/e-ink all lay out correctly, with RAM at 80% colouring amber