feat(noctalia): merge doctor pill + vitals into stoa-health plugin#141
Merged
Conversation
The vitals panel actions never ran: every action was a Process object
living inside the Panel, and clicks called closePanel() before setting
running=true — closing the panel destroys the QML tree, which kills
the child process before (or just after) it spawns. The old doctor
pill had the same bug in its panel, which is why only its bar-level
right-click menu ever worked. A second failure mode: Quickshell's
environment may not include ~/.local/bin, so bare "stoa-doctor"
commands could fail to resolve at all.
Both plugins are now replaced by a single stoa-health plugin:
• All actions go through Quickshell.execDetached() — fully detached
from QML object lifetime — wrapped in sh -c with ~/.local/bin
prepended to PATH, and stoa scripts invoked by absolute path.
• Icon-only bar capsule (NIcon heart) colored by overall severity,
with a count badge when issues/failed units exist — matching the
look of native Noctalia widgets instead of a text pill.
• Panel keeps the three tabs (Vitals / Snapshots / Maintenance),
now with icons throughout and an icon refresh button.
• Right-click menu preserved: Run Doctor / Snapshot Now / Open Log.
install.sh links the new plugin and removes the stale doctor-pill and
vitals symlinks; plugins.json states and the settings.json bar-layout
seed now reference stoa-health.
…menu
Adds a Settings.qml entry point (gear button in the plugin manager,
"Settings" item in the bar widget's right-click menu via
BarService.openPluginSettings — same pattern as the official clipboard
plugin). Configurable:
• Bar icon — heart / activity / stethoscope / heartbeat /
shield / first-aid kit
• Issue badge — toggle the red counter on the icon
• Pulse — toggle the warning/error animation
• Poll interval — 5–300 s status refresh
• Terminal — emulator used for actions (kitty default)
BarWidget and Panel read everything through pluginApi.pluginSettings
with manifest defaults as fallback; the panel header icon follows the
bar icon choice.
Each panel action becomes editable through Settings: • Label — NTextInput per row • Icon — NComboBox from a 20-icon palette • Visible — NToggle (hidden actions never render) • Order — ↑/↓ buttons re-sort within the row's tab manifest.json grows a defaultSettings.actions[] of 14 entries (id/tab/label/icon/visible). Each id maps to a hardcoded handler in Panel.runAction(), so reordering or renaming never breaks the behaviour — only how it's labelled and where it sits. Panel.qml now reads pluginSettings.actions, filters by tab+visible, and renders all action rows through a single reusable component. The per-tab boilerplate dropped accordingly. Defaults are duplicated in Panel and Settings so the panel keeps working before the user has ever saved a setting. Settings layout: an "Appearance" section (icon, badge, pulse, poll, terminal) followed by an "Actions" section with a per-tab list and a "Reset to defaults" button.
…settings
stoa-health:
• README.md so the plugin manager shows proper documentation
• Panel floats top-center on screen (panelAnchorHorizontalCenter +
panelAnchorTop) — same placement as the Clipboard History panel —
instead of anchoring to the bar widget
• Settings gear in the panel header (opens plugin settings via
BarService.openPluginSettings), alongside refresh
• version 1.1.0
stoa-drive-pill (brought up to the same standard):
• Icon-only capsule (NIcon, cloud-off when nothing is mounted) with
an optional m/t badge shown only when not all drives are mounted —
replaces the text pill
• Settings.qml: bar icon, badge toggle, poll interval, file manager
• README.md for the plugin manager
• Settings entry in the right-click menu
• Actions moved to Quickshell.execDetached with absolute paths
(same PATH/lifetime hardening applied to stoa-health)
• version 1.1.0
…dopt main's simplified entry)
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.
Summary
Fixes "actions don't run — terminal opens and closes, or nothing happens" and merges the two health-related plugins (
stoa-doctor-pill+stoa-vitals) into a singlestoa-healthplugin.Root cause of the broken actions
Every panel action was a
Processobject living inside the Panel, and clicks calledclosePanel()beforerunning = true. Closing the panel destroys the QML tree — Quickshell kills the child process with it, so the spawned terminal died instantly (or never spawned). The old doctor pill had the exact same bug in its panel, which is why historically only its right-click menu (which lives in the persistent bar widget) ever worked.A second failure mode: Quickshell's environment doesn't necessarily include
~/.local/bin, so bare commands likestoa-doctorcould fail to resolve silently — which explains the right-click regression too.The fix
Quickshell.execDetached()— fully detached from QML object lifetime, immune to panel close.sh -cwith~/.local/binprepended toPATH, and stoa scripts invoked by absolute path ($HOME/.local/bin/stoa-doctoretc.).Process+StdioCollector(read-only, re-spawned per poll — that part always worked).The merge (per request)
One plugin replaces two:
NIconheart — same component native widgets use) colored by overall severity, pulsing on warn/error, with a red count badge when there are issues/failed units. No more text pill.install.shlinksstoa-healthand removes the stalestoa-doctor-pill/stoa-vitalssymlinks;plugins.jsonstates and thesettings.jsonbar-layout seed updated.Post-merge steps (on the machine)
git pull && ./install.sh— links the new plugin, removes the old ones~/.config/noctalia/settings.jsonis copy-seeded and won't update automatically — open Noctalia settings and replace the old doctor-pill bar widget withstoa-health(or edit the bar layout:plugin:stoa-doctor-pill→plugin:stoa-health)Test plan
[FAIL]/[WARN]lines into~/.config/stoa/doctor.log→ red/amber + badgehttps://claude.ai/code/session_01NS2BA7fzvSsp3ZhPzU18fL
Generated by Claude Code