Skip to content

feat(os-vitals): network, disk, GPU, energy and the detail views - #7

Merged
pblobp merged 8 commits into
mainfrom
feat/os-vitals-metrics
Nov 18, 2026
Merged

pblobp merged 8 commits into
mainfrom
feat/os-vitals-metrics

Conversation

@pblobp

@pblobp pblobp commented Nov 18, 2026

Copy link
Copy Markdown
Owner

What changed and why

The remaining macOS metrics and a detail view for each one. Nothing is released by this change.

  • Worker: network rates from netstat (with the default interface from route), disk activity and the GPU from ioreg, volumes from df, the battery and sleep blockers from pmset, and per-process energy impact from top. Energy is read only while the Energy view is open. Rates are counted per interface and per drive, so a counter reset reads as zero and a new device causes no spike.
  • Panel: the Overview gains Network, Disk, GPU and Battery cards. Each card title opens a detail view (CPU, Memory, Network, Disk, GPU, Energy) with a back control. Every line chart has a crosshair and tooltip, for the pointer and the keyboard, and states its current values in its label. Network and disk charts scale to a round value above the visible peak and label it.
  • Protected set: the Orca rule is now the exact name Orca plus the prefix Orca with a space, so an unrelated app such as OrcaSlicer can be quit.

Sections a system cannot report are hidden. A full-history poll with every series is about 320 KB, and a test holds it under 400 KiB.

Plugin

os-vitals

Access changes

No change to capabilities, commands or panels. Five programs are added to the allowlist in policy/os-vitals.json, each by absolute path, and listed in the plugin README and changelog:

  • /usr/sbin/netstat: interface counters.
  • /sbin/route: the default interface.
  • /bin/df: mounted volumes.
  • /usr/bin/pmset: the battery and what keeps the computer awake.
  • /usr/bin/top: per-process energy impact, only while the Energy view is open.

Network: none.

Tests

  • npm run check: formatting, policy, catalog and versions pass; 143 of 143 script tests pass.
  • orca plugin validate plugins/os-vitals --json: valid.
  • orca plugin test plugins/os-vitals --json: 20 of 20 worker tests pass, including the poll-size limit.
  • node --test 'tests/os-vitals/**/*.test.ts': 204 of 204 pass. One case per parsing hazard: rows with no address column, starred interface names, a disk-image driver, volume names with spaces, a desktop with no battery, top's empty first sample.
  • Smoke test on macOS: reads every new source from the real system and passes.
  • Loaded in Orca 1.4.261: the Overview and all six detail views draw live data.

Measured cost on an M4 Pro at a 2 second refresh, worker plus the programs it runs: about 3.1% of one core with the Overview open, 2.0% in the Network view, 0.1% with the panel closed. The Energy view costs about 15% while open, because of top; a follow-up halves that by reading every 10 seconds.

Not verified: chart hover and keyboard inside Orca itself (checked in the browser harness), the light theme in Orca, and desktops or Macs without GPU statistics (fixtures only).

Screenshots

Reviewed locally from Orca (dark) and from the harness (dark, light, 220 px, no battery, no GPU, a spike). Not attached: the CLI cannot upload images, and the repository does not commit screenshots.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EWVANCgSt8W3VxxxZyAyoD

pblobp and others added 8 commits November 17, 2026 18:35
A worker that samples CPU from node:os, an HTML panel with the
Overview CPU card, a status bar item, and the command that opens the
panel through Orca's CLI. The manifest already declares the final
access: two capabilities, one panel, one command, one status bar item.

Unit tests and the smoke test live outside the plugin folder, so they
are not installed.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EWVANCgSt8W3VxxxZyAyoD
The worker reads memory from vm_stat and sysctl, the process list from
ps, and core kinds from ioreg. Process CPU comes from CPU time between
two readings. The panel gains the memory card, the top processes card,
and a sortable, filterable process table with a details drawer.

Processes are read only while a view shows them. Measured cost is
about 1.2% of one core with the Overview open and 0.16% in the
background.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EWVANCgSt8W3VxxxZyAyoD
The worker sends the signal only after reading the process again and
matching its start time, owner and name. It refuses the worker's own
family, anything inside Orca's app bundle, and a protected set of
system and Orca processes. The panel confirms in a dialog, and offers
force quit when the process is still running five seconds later.

Also fixes the ancestor walk, which stopped at the worker's parent,
and re-sends a status bar update that Orca refused.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EWVANCgSt8W3VxxxZyAyoD
CodeQL flagged the development server for returning an error's text
to the client. It now logs the error and answers with a fixed message.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EWVANCgSt8W3VxxxZyAyoD
The worker reads network rates from netstat, disk activity and the GPU
from ioreg, volumes from df, the battery and sleep blockers from pmset,
and per-process energy impact from top. Energy is read only while its
view is open. Rates are counted per interface and per drive, so a
counter reset reads as zero.

The Overview gains four cards. Each card opens a detail view, and every
line chart has a crosshair and tooltip for pointer and keyboard.

The Orca rule in the protected set no longer catches unrelated apps
whose names merely start with the same letters.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EWVANCgSt8W3VxxxZyAyoD
@pblobp
pblobp merged commit dc2383a into main Nov 18, 2026
11 checks passed
@pblobp
pblobp deleted the feat/os-vitals-metrics branch November 18, 2026 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant