Skip to content

feat: add GPU utilization readout to the menu bar - #4

Open
impiri wants to merge 2 commits into
blaineam:mainfrom
impiri:feat/gpu-menu-bar
Open

feat: add GPU utilization readout to the menu bar#4
impiri wants to merge 2 commits into
blaineam:mainfrom
impiri:feat/gpu-menu-bar

Conversation

@impiri

@impiri impiri commented Aug 2, 2026

Copy link
Copy Markdown

Summary

Adds an optional GPU utilization row to the menu-bar readout (stacked and
horizontal layouts), and fixes a Swift 6.2 build blocker that was preventing
the project from compiling under the current Xcode toolchain.

Changes

feat(menubar): add GPU utilization readout

  • New Show GPU toggle (default off) in Settings → Visible Items, with a
    live preview in both layouts, plus a BlipSettingDescriptor entry so
    Shortcuts can drive it.
  • The row reads monitor.snapshot.gpu.utilization (already plumbed from
    GPUMonitor on direct download and the helper on App Store), colored
    .purple to match the popover and the GPU detail panel.
  • Mirrors the popover's helper gating: in the App Store build the row
    stays hidden until the helper is connected, since GPU utilization is
    helper-only there; the direct-download build always shows it. The Settings
    preview is gated only on the toggle (it's a layout demo, not live data).

fix(disk): resolve Swift 6.2 ImplicitStrongCapture in DiskSpeedTester

The detached disk-benchmark Task declared [weak self] on its nested
closures while self was captured strongly by the enclosing scope, raising
#ImplicitStrongCapture and breaking the build under Swift 6.2. Hoists a
single [weak self] onto the detached Task and drops the redundant inner
capture lists. Behavior-preserving; also stops the benchmark from strongly
retaining DiskSpeedTester while it runs.

Lands first so every commit on the branch builds.

Verification

  • Blip (direct download): builds clean, no warnings.
  • BlipAppStore: builds clean (signing disabled locally to type-check the
    #if APPSTORE path).
  • BlipTests: 84/84 passing.
  • Each commit builds independently → bisectable.

Notes

  • Off by default; existing users see no change.
  • No new strings/localization (matches the existing hardcoded English UI).

Thanks for creating this! I find it useful to see the GPU at a glance, so this PR adds it as an option. (Four items will fit in the menu bar, but it's kinda cramped; I swap disk space out for GPU.) Happy to make any adjustments necessary if you decide to add this feature.

impiri added 2 commits August 2, 2026 19:32
The detached disk-benchmark Task in DiskSpeedTester.start() declared
[weak self] on its nested closures (the progress Task and the trailing
MainActor.run) while self was captured strongly by the enclosing scope.
Under the Swift 6.2 toolchain this raises #ImplicitStrongCapture and
blocked the build entirely.

Hoist a single [weak self] onto the detached Task and drop the redundant
inner capture lists so the nested closures reuse the already-weak self.
This matches the pattern already used elsewhere in the same type. Behavior
is preserved — the security-scoped resource is still released before the
weak-self guard — and as a bonus the detached benchmark no longer strongly
retains DiskSpeedTester while running.
Surface GPU utilization as an optional menu-bar row, in both the stacked
(compact) and horizontal layouts, colored .purple to match the popover and
the GPU detail panel.

- New "Show GPU" setting (default off) in Settings → Visible Items, with a
  live preview in both layouts, and exposed to Shortcuts via a
  BlipSettingDescriptor entry.
- Reads monitor.snapshot.gpu.utilization, which is already plumbed from
  GPUMonitor (direct download) and the helper (App Store).

Mirror the popover's helper gating: in the App Store build the row stays
hidden until the helper is connected, since GPU utilization is helper-only
there; the direct-download build always has it. The Settings preview is
gated only on the toggle, since it's a layout demo, not live data.
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