Skip to content

fix(layout): hug-size fits content for fill meters (+ network/VRAM clips) (0.0.43)#45

Merged
gyng merged 2 commits into
mainfrom
fix/network-widget-clip
Jun 14, 2026
Merged

fix(layout): hug-size fits content for fill meters (+ network/VRAM clips) (0.0.43)#45
gyng merged 2 commits into
mainfrom
fix/network-widget-clip

Conversation

@gyng

@gyng gyng commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Problem

Widgets clipped at "hug" (fit-content) size: the Network template, the GPU panel, and GPU VRAM text (ellipsized).

"Hug" (basis: 'content') already shrink-wrapped text leaves, but fill meters (gauge / sparkline / cpu / GPU panel) were pinned to their authored box and clipped by the slot's overflow:hidden whenever their content needed more.

Fix (three layers)

  • SystemicflowStyle.ts: a content-basis fill meter keeps its authored box as the default extent but floors both axes at min-content, so a hugged meter sits at max(box, its content) and never clips. Safe because meter fonts are fixed (only AnalogClock is container-query scaled) → min-content is stable, no measure→grow feedback. Text leaves were already correct; this extends correct hug to fill meters.
  • Network templatetemplates.ts: box h:104 → derived NETWORK_H (~150) from the layout constants (two 60px histograms + margins + rate row), so it fits and can't drift.
  • GPU VRAMformat.ts/gpu.ts: formatBytesPair shares one unit ("12.3 GiB / 16.0 GiB""5.6 / 11.2 GiB") so the value fits the narrow stat cell.

Verification

  • type-check, lint, 1317 unit tests (flowStyle + format tests pin the new behavior), build — green.
  • Real-browser e2e: 31 passed. The 1 "failure" is a pre-existing flaky QuickJS-WASM timing test (passes on re-run; my change only touches content basis, while added widgets use fr).
  • Visual confirmation of the live GPU/network widgets is Windows-only (real telemetry) — to eyeball after install.

🤖 Generated with Claude Code

gyng and others added 2 commits June 15, 2026 05:18
…clips)

"Hug" (basis: 'content') already shrink-wrapped TEXT leaves, but FILL meters
(gauge / sparkline / cpu / GPU panel) were pinned to their authored box and clipped
by the slot's overflow:hidden when content needed more — the GPU "hug clipped" and
VRAM-ellipsis reports.

- flowStyle.ts: content-basis fill meters keep the authored box as the default extent
  but FLOOR both axes at min-content, so a hugged meter sits at max(box, its content)
  and never clips. Safe because meter fonts are fixed (only AnalogClock is
  container-query scaled) → min-content is stable, no measure→grow feedback.
- templates.ts: the Network template box (h:104) is derived from its layout constants
  (~150) so it fits the two histograms + rate row and can't drift.
- format.ts/gpu.ts: formatBytesPair shares one unit for the GPU VRAM readout
  ("12.3 GiB / 16.0 GiB" → "5.6 / 11.2 GiB") so it fits the narrow stat cell.

Verified: type-check, lint, 1317 unit tests, build, and the real-browser e2e (31 passed;
the 1 flake is a pre-existing QuickJS-WASM timing test, unrelated — added widgets use fr
basis, not content). Visual confirmation of the live GPU/network widgets is Windows-only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gyng gyng merged commit 87067e8 into main Jun 14, 2026
3 checks passed
@gyng gyng deleted the fix/network-widget-clip branch June 14, 2026 21:23
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