Skip to content

fix(stoa-health): clicks, empty Settings, and no-terminal background actions#142

Merged
VictorGSchneider merged 1 commit into
mainfrom
claude/loving-ride-w82ov-fixes
Jun 12, 2026
Merged

fix(stoa-health): clicks, empty Settings, and no-terminal background actions#142
VictorGSchneider merged 1 commit into
mainfrom
claude/loving-ride-w82ov-fixes

Conversation

@VictorGSchneider

@VictorGSchneider VictorGSchneider commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

Three concrete bugs from the report ("clicks don't work", "settings panel is empty", "terminal opens and does nothing"), plus the no-terminal background mode you asked for. The previous round didn't actually solve clicks or settings; this one is grounded in the official plugin source (verified against noctalia-plugins/clipboard).

1. Panel clicks finally fire

runInTerm() / runSilent() called pluginApi.closePanel() before Quickshell.execDetached(). Closing the panel destroys the QML tree synchronously — anything after it in the same JS handler runs in a torn-down context and silently no-ops. Order is now: spawn first, close second. Same fix on the header gear.

2. Settings panel renders content

The previous Settings.qml imported NLabel and NTextInput — neither exists on the public plugin widget set. The official clipboard plugin only uses NSpinBox / NToggle / NComboBox. A missing widget type makes the whole file invalid, hence the empty panel. Section headers now use plain Text; the per-action label editor uses QtQuick.Controls.TextField styled to match.

3. No terminal, no confirmation

Every action runs through Quickshell.execDetached wrapped in a tiny sh -c that fires three notify-send calls (Running / Done / Failed). No terminal. Pacman/yay get --noconfirm so they never block on a prompt.

For commands that genuinely need root (updates, scheduled cleanup), a new Privileged commands setting picks between:

  • pkexec (default) — graphical polkit prompt once per action. Safe, not silent.
  • sudo -n — fully silent, but requires you to add NOPASSWD sudoers rules for the specific commands (/usr/bin/pacman, /usr/bin/yay, ~/.local/bin/stoa-maintain). Real security tradeoff — chosen consciously.

Also

  • Removed the inert panelAnchorHorizontalCenter / panelAnchorTop properties — confirmed in the official source that panels don't declare them; anchoring is decided by the shell from the caller arg to openPanel(screen, this).
  • Dropped the terminal setting (no longer used).
  • README and per-action customisation (label/icon/visibility/order) preserved.

Test plan

  • Click a Vitals action → notification "Running: Doctor" → "Done: Doctor", no terminal
  • Open Settings from the panel header gear → all sections render (Appearance / Privileged / Actions)
  • Edit an action label and save → label persists after Noctalia restart
  • Right-click → Settings opens the same panel
  • Update all on pkexec mode → one polkit prompt, then silent execution
  • Switch to sudo -n without adding sudoers rules → "Failed: Update all" notification (fast, correct)

https://claude.ai/code/session_01NS2BA7fzvSsp3ZhPzU18fL


Generated by Claude Code

…inal actions

Three concrete bugs the previous round didn't actually solve, plus the
no-terminal background mode you asked for.

1. Panel clicks never fired runAction:
   runInTerm/runSilent called pluginApi.closePanel() BEFORE
   Quickshell.execDetached(). closePanel() destroys the QML tree
   synchronously — anything after it in the same JS handler runs in a
   torn-down context and silently no-ops. Order is now: spawn first,
   close second. Same fix applied to the header gear button.

2. Settings.qml rendered blank because it imported widget types that
   don't exist on the plugin widget set. The official clipboard plugin
   uses only NSpinBox / NToggle / NComboBox (verified against
   noctalia-plugins source). NLabel and NTextInput were guesses —
   loading them invalidates the whole file, hence the empty panel.
   Section headers now use plain Text; text fields use QtQuick.Controls
   TextField with an Noctalia-styled background.

3. Background-only action execution:
   • Every action now runs through Quickshell.execDetached with a
     short sh -c wrapper that fires three notify-send calls
     (Running / Done / Failed). No terminal is opened anywhere.
   • Commands that need root (updates, scheduled cleanup) use a
     configurable privilege helper: "pkexec" (default, graphical
     polkit prompt) or "sudo -n" (fully silent — requires the user
     to add NOPASSWD sudoers rules). The choice lives in Settings.
   • pacman/yay get --noconfirm so they never block on a prompt.

Also removed the inert panelAnchorHorizontalCenter / panelAnchorTop
properties: confirmed by reading official plugin sources that panels
don't declare those — anchoring is decided by the shell from the
caller passed to openPanel(screen, this). They were no-ops.

The "terminal" setting is gone (no longer used). README and per-action
customisation remain.
@VictorGSchneider VictorGSchneider self-assigned this Jun 12, 2026
@VictorGSchneider VictorGSchneider merged commit 95868b2 into main Jun 12, 2026
1 check passed
@VictorGSchneider VictorGSchneider deleted the claude/loving-ride-w82ov-fixes branch June 12, 2026 02:04
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.

2 participants