Skip to content

feat: migrate pills to Panel.qml — fix left-click + right-click menus - #118

Merged
VictorGSchneider merged 1 commit into
mainfrom
claude/cool-clarke-AUFdY
May 29, 2026
Merged

feat: migrate pills to Panel.qml — fix left-click + right-click menus#118
VictorGSchneider merged 1 commit into
mainfrom
claude/cool-clarke-AUFdY

Conversation

@VictorGSchneider

@VictorGSchneider VictorGSchneider commented May 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replaces QtQuick.Controls.Popup (broken in LayerShell bar windows) with the correct Noctalia architecture: pluginApi.togglePanel() + Panel.qml for left-click, and NPopupContextMenu + PanelService.showContextMenu() for right-click
  • Both stoa-doctor-pill and stoa-drive-pill now have a Panel.qml registered in their manifest.json

stoa-doctor-pill

  • BarWidget.qml: left-click → pluginApi.togglePanel(), right-click → context menu with Run Doctor / Open Log
  • Panel.qml (new): status header (color-coded dot + summary text) + action rows (Run Doctor, Open Log); polls stoa-doctor-status on open

stoa-drive-pill

  • BarWidget.qml: removed the inline Popup driveMenu; left-click → pluginApi.togglePanel(), right-click → context menu with Mount All / Unmount All / Open ~/Drive; pill only tracks total/mounted (no _drives array needed here)
  • Panel.qml (new): per-drive rows with mount/unmount buttons, VFS cache progress bars, Open/Cache buttons; footer with Mount All / Unmount All / ~/Drive; polls stoa-drive-status on open

Test plan

  • Left-click doctor pill → panel opens with status + action rows
  • Left-click again → panel closes
  • Right-click doctor pill → context menu appears with Run Doctor / Open Log
  • Run Doctor action triggers stoa-doctor, re-polls status after finish
  • Open Log opens kitty with doctor log
  • Left-click drive pill → panel opens with per-drive rows
  • Mount/Unmount buttons in panel work; status refreshes after 2 s
  • Open button opens Thunar at mount point (or VFS cache if offline)
  • Footer Mount All / Unmount All / ~/Drive work
  • Right-click drive pill → context menu with Mount All / Unmount All / Open ~/Drive
  • Pill colors update correctly (secondary = all mounted, tertiary = partial, surface-variant = none)

https://claude.ai/code/session_01JH7MsJFvce1eEde8DJiCfe


Generated by Claude Code

Replace QtQuick.Controls.Popup (incompatible with LayerShell bar windows)
with pluginApi.togglePanel() + Panel.qml for left-click, and
NPopupContextMenu + PanelService.showContextMenu() for right-click.

- stoa-doctor-pill: new Panel.qml (status header + Run Doctor / Open Log)
- stoa-drive-pill: new Panel.qml (per-drive rows, cache bars, footer actions)
- Both BarWidget.qml rewritten: left-click opens panel, right-click context menu
- Both manifest.json updated with "panel" entryPoint

https://claude.ai/code/session_01JH7MsJFvce1eEde8DJiCfe
@VictorGSchneider VictorGSchneider self-assigned this May 29, 2026
@VictorGSchneider
VictorGSchneider merged commit 0b0aa04 into main May 29, 2026
1 check passed
@VictorGSchneider
VictorGSchneider deleted the claude/cool-clarke-AUFdY branch May 29, 2026 03:47
VictorGSchneider added a commit that referenced this pull request May 31, 2026
## Problema

Duas regressões introduzidas pela rodada de install.sh + PR #118:

### 1. Stoa Memento Mori duplicado (×N) no Desktop Widgets

A função `_link` em `install.sh` não era idempotente: toda re-execução
fazia `mv` do symlink existente para `.bak.TIMESTAMP` e criava um novo.
O diretório `.bak.*` continuava apontando para o mesmo plugin, e o
Noctalia escaneava a pasta `plugins/` e carregava **todas** as entradas
— incluindo os backups — como instâncias separadas do mesmo plugin.
Resultado: N cópias de "Stoa Memento Mori" no picker.

**Fix:** antes de fazer backup, verifica se o symlink já aponta para o
source correto. Se sim, retorna imediatamente — sem backup, sem re-link.

### 2. Bar widgets do doctor e drive sumiam após `install.sh`

`stoa-doctor-pill/Panel.qml` usava `NIcon`, que não existe no
`qs.Widgets` do Noctalia. Se o Noctalia valida os entry points no
registro do plugin, um erro de QML faz o plugin inteiro falhar —
derrubando o bar widget junto.

**Fix:** removido `NIcon`; as linhas de ação ficam só com `NText`.

## Resumo das mudanças

- `install.sh`: `_link` agora é idempotente (skip se symlink já está
correto)
- `stoa-doctor-pill/Panel.qml`: removido `NIcon` e campo `icon` do model

## Para limpar os `.bak.*` existentes

```bash
rm ~/.config/noctalia/plugins/*.bak.*
```

Reinicie o Noctalia depois.

https://claude.ai/code/session_01JH7MsJFvce1eEde8DJiCfe

---
_Generated by [Claude
Code](https://claude.ai/code/session_01JH7MsJFvce1eEde8DJiCfe)_
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