Fix/ci headless and portable release - #26
Merged
manupawickramasinghe merged 2 commits intoJul 31, 2026
Merged
Conversation
Sort::Disk and format_rate were reachable only from the Task Manager
window, so every GUI-less feature combination saw them as dead code and
clippy's -D warnings turned that into a build failure:
error: variant `Disk` is never constructed
error: function `format_rate` is never used
The fix is parity rather than an allow(dead_code): `sensorview ps` is
meant to be the same data from a terminal, and it was the one view of a
process that could not show what a process is doing to the disk. It now
has a DISK column and `--sort disk`, which also exercises both items from
the headless build.
The new test says so explicitly, so the next person to see it fail knows
it is guarding the headless build rather than checking a cosmetic.
Verified with ci.yml's own matrix — all seven feature combinations,
including the bare `--no-default-features` one that broke.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The release workflow attached an installer, a .deb, an .AppImage and a .dmg, but no portable build. Adding one turned out to need a code change rather than a workflow line. A lone sensorview.exe is not a portable app on Windows. Every sensor on this platform comes from the LibreHardwareMonitor sidecar, and default_source() falls back to LhmBridge::empty when it cannot find one beside the binary — so a bare .exe opens reporting nothing at all. The new `portable` feature compiles the sidecar into the binary and unpacks it to %LOCALAPPDATA% on first run, keyed by version and payload size so an upgrade never reuses the previous release's bridge. It writes to a private name and renames into place, because a half-written 70 MB file that the next run mistakes for complete is worse than not unpacking at all. Unpacked there rather than beside the executable on purpose: a portable binary is expected to run from a USB stick or a network share and must not assume it can write next to itself. The feature is off by default — it costs ~70 MB, which only this artifact wants to pay — and is a no-op on macOS and Linux, which read their sensors natively. build.rs fails loudly if the sidecar has not been published, rather than emitting a portable build whose whole selling point silently does not work. CI now builds it on Windows so it cannot rot between tags. Separately, build.rs gated the requireAdministrator manifest on the profile alone, so the *headless* release binary — the one offered for servers and containers — also demanded admin, and a non-elevated parent could not start it at all (CreateProcess, ERROR_ELEVATION_REQUIRED, with no UAC prompt available to a service or container). Now gated on the `gui` feature too: the GUI still elevates deliberately, the CLI degrades to fewer sensors instead of refusing to launch. The release job also checks that each platform actually produced its artifacts. Publishing attaches whatever the globs match, so a format that failed to build would otherwise surface as a release quietly missing a platform. Verified: the portable binary run alone in an empty directory unpacks its bridge and reports real sensors, and the headless release binary now starts unelevated, which it previously could not. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.