Skip to content

List hybrid plugins as enabled when they live in plugins[] - #9760

Closed
ujo4eva wants to merge 2 commits into
omacom:quattrofrom
ujo4eva:fix/list-plugins-hybrid-enabled
Closed

ujo4eva wants to merge 2 commits into
omacom:quattrofrom
ujo4eva:fix/list-plugins-hybrid-enabled

Conversation

@ujo4eva

@ujo4eva ujo4eva commented Sep 2, 2026 •

Copy link
Copy Markdown

omarchy plugin list treated any plugin with bar-widget in its kinds as enabled only if the id sat in bar.layout. That is the right switch for a bar-only widget. It is the wrong switch for a plugin that is also an overlay or service.

Those hybrids can be on via plugins[] without a top-level layout slot. The glyph may live inside another widget (a tray host, for example) instead of in left/center/right. The overlay is loaded, isEnabled is true, and the list still said disabled.

This showed up with perfektnacht.controller-launcher (service, overlay, bar-widget): it was in plugins[] and hosted inside a tray, the wheel summoned fine, and omarchy plugin list reported disabled. omarchy plugin enable returned ok and changed nothing.

listedEnabled now treats a plugins[] entry as on for bar-widgets. First-party hybrids are unchanged: taking omarchy.menu off the bar still lists it disabled, while isEnabled keeps the menu loadable.

Test plan

  • bash test/shell.d/plugin-registry-contract-test.sh
  • plugin enable/clone/add/validate and menu-plugin tests

Fixes #11664

omarchy plugin list treated any bar-widget as enabled only if it sat in
bar.layout. A plugin that is also an overlay or service can be on via
plugins[] without a layout slot — its glyph may live inside another
widget — so the list called it disabled while the overlay was running.

listedEnabled now treats a plugins[] entry as on for bar-widgets, without
changing the first-party hybrid rule that loadability survives taking
the button off the bar.
@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at d4fc9f9, merged onto current quattro (f45461a), on a disposable Omarchy VM with the shell running from that tree. The bug is real, but the change makes disable disagree with list, so this is waiting on a decision from the maintainer.

Reproduced. A third-party plugin with kinds overlay and bar-widget sat in plugins[] with no bar.layout slot. On quattro, omarchy plugin list reported it disabled. With this change, it reports it enabled.

What it breaks. The same plugin on the bar and in plugins[]:

  • omarchy plugin disable prints Disabled. It removes only the bar entry, because findEntryLocation finds the bar entry first. list still reports the plugin as enabled.
  • A second disable removes the plugins[] record, and only then does it list as disabled.

On quattro, the first disable already lists it as disabled. The fixture tests don't catch this. They call listedEnabled directly and never run disable against a plugin in both places.

Two smaller cases, both found by the second opinion and checked against the source:

  • listedEnabled applies inBar || inPlugins to every bar-widget, not just hybrids. A bar-only widget (kinds: ["bar-widget"]) left in plugins[] now lists as enabled, but Bar.qml builds widgets only from bar.layout and never reads plugins[], so nothing is drawn. This contradicts the function's own comment.
  • listedEnabled ignores disabledPlugins. If a first-party hybrid is in plugins[] and its clone is enabled, setEnabled puts the source in disabledPlugins, so isEnabled is false, yet the source still lists as enabled.

Why it needs a decision rather than a patch. The open #12540, from the same area, treats a hybrid's bar entry as its on/off switch. In that model, disable deliberately leaves the plugins[] record so the panel stays reachable, and enable puts the widget back on the bar. #11062 and #13852 expect the same. This change instead counts the plugins[] record as enabled. If both land, enable and disable visibly change the bar while list keeps saying enabled the whole time. Any version of "plugins[] counts as enabled" has this problem unless disable also removes the plugins[] record, which is the opposite of what #12540 relies on. Which model is right is the maintainer's call, so nothing was pushed to this branch.

Tests. On the merged tree, all passed: plugin-registry-contract-test.sh, plugin-enable, plugin-add, plugin-clone, plugin-validate and menu-plugin. Two tests did not run: plugins-test.sh and plugin-auth-boundary-test.sh stop on a missing node on the VM. One ./test/cli failure ("vscode generated theme references current theme file") fails identically on quattro.

Reviewers. Claude Opus 5.5 reviewed and reproduced this. Codex Medium gave the second opinion. It arrived at the same disable inconsistency on its own, though its independence isn't guaranteed, and it added the two smaller cases above.

…ybrid-enabled

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	shell/services/PluginRegistry.qml
#	test/shell.d/fixtures/plugin-registry/shell.qml
@greptile-apps

greptile-apps Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Updates omarchy plugin list so a hybrid plugin referenced through plugins[] appears enabled even without a top-level bar slot.

  • Hybrid bar widgets in the plugin list follow their active config.

Reviews (1) · Last reviewed commit: "Merge remote-tracking branch 'omacom/qua..." · Reviewed by Greptile

@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at 9fc8be8, merged onto current quattro (d367a56), on a disposable Omarchy VM with the shell running from that tree. #12540 has merged since the last review, and it settles the question this PR was waiting on in the other direction. As written, this change now contradicts what quattro ships, so it is waiting on the maintainer, with a recommendation to close it.

What #12540 settled. On quattro, a bar-widget's on/off switch is its bar.layout slot. omarchy plugin disable removes only that slot and deliberately keeps the plugins[] record, for hybrids (so the panel or overlay stays loaded) and for bar-only widgets (so settings such as an apiKey survive). Its tests in test/shell.d/fixtures/plugin-registry/shell.qml assert both. #12540 also fixed the other half of #11664: omarchy plugin enable on a hybrid that sits only in plugins[] now puts it on the bar instead of returning ok and changing nothing.

What this PR does on top of that. listedEnabled reports inBar || inPlugins for every bar-widget. After disable, the state is "no bar slot, plugins[] record kept", which is exactly the state it reports as enabled. On the merged tree, I added two assertions to the registry fixture: after setEnabled(id, false), the plugin lists as disabled. One covered a panel+bar-widget hybrid, the other a bar-only widget with a plugins[] record. Both failed. Every other assertion in plugin-registry-contract-test.sh passed, this PR's and #12540's alike. On quattro, list uses inBar and reports both as disabled. For a user this means:

  • omarchy plugin disable prints Disabled and the widget leaves the bar, but omarchy plugin list still says enabled.
  • Setup → Plugins → Enable lists only plugins whose enabled is false (bin/omarchy-menu-plugin:13), so the menu can no longer bring that widget back. Disable keeps offering it instead.

Why this isn't a patch. "Hybrid in plugins[] without a bar slot" is now the normal result of disabling it, so no rule over the config can list it as enabled for this PR and disabled for #12540. What's left of #11664 is that a hybrid whose overlay or service is running shows as disabled while it is off the bar. Fixing that would mean reporting that state separately, for example as a loaded field beside enabled, without changing what enabled means. That's a design choice for the maintainer. Separately, the branch no longer merges cleanly: both PRs add a fixture line at the same spot in test/shell.d/fixtures/plugin-registry/shell.qml. Nothing was pushed.

Reviewers. Claude Opus 5.5 reviewed and ran this. Codex Medium and muse-wonder (via pi, thinking high) gave second opinions. Both reached the same disable/list contradiction, though their independence isn't guaranteed. Codex added the menu consequence above, which I checked against bin/omarchy-menu-plugin and bin/omarchy-plugin-list.

@ujo4eva

ujo4eva commented Nov 1, 2026

Copy link
Copy Markdown
Author

Closing this. I'd read plugins[] as the list of active plugins, but #12540 settled it the other way: on quattro, a bar widget is on when it has a bar.layout slot, and omarchy plugin disable removes the slot but deliberately keeps the plugins[] record. Counting a plugins[] record as enabled, as this PR does, would make plugin list say "enabled" right after disable. The Setup → Plugins → Enable menu would then stop offering the widget, so it couldn't be turned back on from there. Thanks for the re-review that caught it.

What I was after was for a widget that's active but folded into the tray not to list as disabled. That already holds on quattro: the tray drawer is a bar.layout section, and inBar checks every section, so those widgets list as enabled. There's nothing left for this PR to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Third-party service plugins report enabled: false despite being correctly configured and actually running

2 participants