-
Notifications
You must be signed in to change notification settings - Fork 0
feat(mqlaunch): living frame — health-tinted panel, Pulse chip, sparklines - #228
Merged
Merged
feat(mqlaunch): living frame — health-tinted panel, Pulse chip, sparklines #228MCamner merged 1 commit into
MCamner merged 1 commit into
Conversation
...lines The launcher surface was static text: the frame and the MEM/BAT numbers looked the same whether the machine was fine or not. Now the last Pulse verdict drives the picture. - surface_panel_color tints the panel border (yellow WARN/INCOMPLETE, red FAIL) from the cached mq.pulse.v1 document; PASS, no run, a stale run (> MQ_HEALTH_MAX_AGE, default 1h) or MQ_PANEL_HEALTH_TINT=0 keep the theme colour. It reads a file — never runs a collector. - The dashboard header shows `PULSE: WARN 12m ago` in place of the static "adaptive layout active" text, and the rule under the logo follows the same colour. - MEM and BAT carry braille sparklines (⣀⣄⣤⣶⣷⣿): up to 12 readings kept under ~/.cache/macos-scripts/spark-<metric>, appended at most every MQ_SPARK_INTERVAL seconds (30) so the line is a trend, not one moment. MQ_SPARKLINES=0 turns them off. Plain UTF-8, so NO_COLOR and piped output carry the same glyphs. Two zsh defects found on the first live run, both in mq-ui.sh which the zsh launcher sources: `local path` shadowed the array tied to PATH and emptied it for the rest of the call (cksum, cut: command not found), and `status=` assigns to zsh's read-only alias of $?. Renamed to cache_path and verdict. tests/ui-zsh-surface-smoke.sh sources the library under zsh with a Pulse fixture and asserts the verdict, an intact PATH, the tinted frame and a silent stderr; it fails on both original bugs. Also: mtime via `stat -c %Y || stat -f %m` (GNU first — on GNU stat -f is filesystem status and succeeds with a report), and the overall status is taken with `head -n 1` so a single-line document does not also match an item's status. panel-color-smoke pins MQ_PULSE_CACHE to a missing file so it tests the theme plumbing, not this machine's last Pulse. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XPB297VJQ4zSEY32wSVAEh
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.
The launcher surface was static text: the frame and the MEM/BAT numbers
looked the same whether the machine was fine or not. Now the last Pulse
verdict drives the picture.
red FAIL) from the cached mq.pulse.v1 document; PASS, no run, a stale
run (> MQ_HEALTH_MAX_AGE, default 1h) or MQ_PANEL_HEALTH_TINT=0 keep
the theme colour. It reads a file — never runs a collector.
PULSE: WARN 12m agoin place of the static"adaptive layout active" text, and the rule under the logo follows the
same colour.
under ~/.cache/macos-scripts/spark-, appended at most every
MQ_SPARK_INTERVAL seconds (30) so the line is a trend, not one moment.
MQ_SPARKLINES=0 turns them off. Plain UTF-8, so NO_COLOR and piped
output carry the same glyphs.
Two zsh defects found on the first live run, both in mq-ui.sh which the
zsh launcher sources:
local pathshadowed the array tied to PATH andemptied it for the rest of the call (cksum, cut: command not found), and
status=assigns to zsh's read-only alias of $?. Renamed to cache_pathand verdict. tests/ui-zsh-surface-smoke.sh sources the library under
zsh with a Pulse fixture and asserts the verdict, an intact PATH, the
tinted frame and a silent stderr; it fails on both original bugs.
Also: mtime via
stat -c %Y || stat -f %m(GNU first — on GNU stat -fis filesystem status and succeeds with a report), and the overall status
is taken with
head -n 1so a single-line document does not also matchan item's status. panel-color-smoke pins MQ_PULSE_CACHE to a missing
file so it tests the theme plumbing, not this machine's last Pulse.
Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01XPB297VJQ4zSEY32wSVAEh