Skip to content

Explain each reading, on hover and in a details view - #3

Merged
sachinsachdeva merged 2 commits into
mainfrom
details-view
Aug 9, 2026
Merged

Explain each reading, on hover and in a details view#3
sachinsachdeva merged 2 commits into
mainfrom
details-view

Conversation

@sachinsachdeva

Copy link
Copy Markdown
Owner

The status bar could only ever show one number per metric, with no room to say what it meant. This adds two ways to ask, and bumps the extension to 2.0.0.

Hover

Hovering a reading opens a markdown panel for that metric alone: the user/system split and per-core load bars behind the CPU percentage, cached and swap memory behind the memory fraction, the GPU's name and core count, battery health and cycle count, and used/free/total for every volume regardless of which single figure disk.format picks.

That per-metric split is why the readings are now five status bar entries rather than one — an entry is the unit VS Code attaches a hover to. Each can now be hidden on its own, and a group whose metrics are all off or unavailable disappears rather than sitting empty.

Click

Clicking opens a details view docked in the panel beside Terminal and Problems, which stays put while it is read. It closes by its title bar ✕, by clicking the same reading again, or from the palette; clicking a different reading moves the outline instead. The panel carries no System Vitals tab until one is asked for.

Breaking changes (hence 2.0.0)

Three things change without being asked to. No setting was removed or renamed, so existing configuration carries over untouched.

  • Status bar goes from one entry to five; anyone who hid or repositioned it must redo that, and narrow windows may drop the lower-priority entries.
  • updatefrequencyms defaults to 10s rather than 2s. VS Code redraws an open hover the instant its content changes, so one interval now governs the reading and its details together — they can never show different samples.
  • Minimum VS Code goes 1.53 → 1.74, for markdown status bar tooltips.

Notes

  • The hover is deliberately untrusted markdown: the click carries the only command worth offering, so no command link has to survive a hostile volume name. Every system-supplied string is still escaped.
  • The details view's document loads nothing from anywhere (default-src 'none', per-view nonce) and writes every figure with textContent.
  • Each metric is sampled once per update and feeds the status bar, its hover and the view alike.

48 tests pass; VSIX verified to bundle systeminformation and ship no tests or source maps.

🤖 Generated with Claude Code

sachinsachdeva and others added 2 commits August 9, 2026 22:47
The status bar could only ever show one number per metric, and no room to
say what it meant. This adds two ways to ask.

Hovering a reading opens a markdown panel for that metric alone: the
user/system split and per-core load bars behind the CPU percentage, cached
and swap memory behind the memory fraction, the GPU's name and core count,
battery health and cycle count, and used, free and total for every volume
regardless of which single figure disk.format picks.

That per-metric split is why the readings are now five status bar entries
rather than one: an entry is the unit VS Code attaches a hover to. It also
means each group can be hidden on its own, and one whose metrics are all
off or unavailable disappears instead of sitting there empty. CPU
temperature moves up beside the other CPU readings so the group is
contiguous.

Clicking opens the same detail as a view in the panel, beside Terminal and
Problems, which stays put while it is read. It closes by its title bar
cross, by clicking the same reading again, or from the palette; clicking a
different reading moves the outline instead. The panel carries no System
Vitals tab until one is asked for, and closing takes the tab away again.

updatefrequencyms now defaults to 10 seconds rather than 2. VS Code redraws
an open hover the instant its content changes, so details rebuilt every
couple of seconds flicker under the pointer. One interval governs the
reading, its hover and the view together, so they never disagree about the
same instant, and every metric is sampled once per update to feed all
three.

The hover is deliberately untrusted markdown: the click carries the only
command worth offering, so no command link has to survive a hostile volume
name. The view's document loads nothing from anywhere and writes every
figure with textContent.

Raises the minimum VS Code version to 1.74, for markdown status bar
tooltips.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sachinsachdeva
sachinsachdeva merged commit ed07920 into main Aug 9, 2026
2 checks passed
@sachinsachdeva
sachinsachdeva deleted the details-view branch August 9, 2026 13:14
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