Bar widgets under a replacement (cloned) bar cannot resolve their own service — panel dead-ends on "warming up"
Environment
- omarchy 4.0.3-1, Hyprland + quickshell
- Reproduced with a
barplugin created via the plugin generator (manifest carriesomarchy: { "clonedFrom": "omarchy.bar" })
What happened
After the 4.0.3 scoped-shell change, a third-party bar widget that pairs a service + bar-widget kind can no longer reach its own service when the bar is a replacement bar:
-
Stock
Bar.qmlinjectsbarfor non-first-party widgets as a facade whose.shellispluginShellForId(moduleName)— service-capable, trusted-bar only (Bar.qml:234-237). -
A replacement bar receives a scoped shell with no
pluginShellForId, and the generated clone's common widget pattern istarget.bar = root(the bar root itself), sobar.shell.serviceFor("my.plugin")lands increateScopedPluginShell()._serviceLookup(shell.qml:608):return allowOwnService ? shell.pluginServiceFor(key, requestedId) : nullwhere
keyis the bar's id.pluginOwnsTarget(barId, pluginId)is false for the hosted widget, so the lookup returnsnull. -
Result: the widget's service binding stays
nullforever; the panel renders its "loading/warming up" placeholder and never resolves. The identical plugin works perfectly under the trusted default bar.
Steps to reproduce
- Any
service+bar-widgetplugin whose BarWidget readsbar.shell.serviceFor(moduleName)(e.g. a tree widget backed byService.qml). omarchy plugins bar new→ clone ofomarchy.bar; keep the generatedtarget.bar = rootin ModuleSlotinjectProps.- Select the clone as the active bar and add the widget — the panel never receives its service.
Expected
Widget-coupled services resolve identically regardless of which bar (stock, or a user-selected omarchy.bar clone) hosts the widget. Plugin service objects are already gated by resolveEnabledId + the plugin's own manifest — the hosting bar's identity shouldn't shadow the widget's own id.
Proposed fix (locally validated)
Widen _serviceLookup only for the active bar when its manifest is an omarchy.bar clone the user deliberately selected; arbitrary custom bars keep the service-less facade:
_serviceLookup: function(requestedId) {
if (allowOwnService) {
var own = shell.pluginServiceFor(key, requestedId)
if (own) return own
}
if (key === shell.activeBarId && shell.activeBarManifest
&& String(shell.activeBarManifest.id || "") === key) {
var meta = Util.isPlainObject(shell.activeBarManifest.omarchy)
? shell.activeBarManifest.omarchy : null
if (meta && String(meta.clonedFrom || "") === "omarchy.bar")
return shell.serviceFor(shell.pluginRegistry.resolveEnabledId(requestedId))
}
return null
},
This fixes the case without touching any plugin. Alternatives for discussion: an explicit "widgetServices": true flag in the bar clone's manifest, or having the generated bar clone stamp pluginShellForBarEntry-style facades the way stock does (currently blocked — pluginShellForId is trusted-bar-only by design).
Happy to open a PR in whichever shape you prefer.
I traced this on quattro (be7c7bf37) by reading the source; nothing was run, since the question is what the code allows rather than whether it fails. The symptom is real, and on quattro it is the intended behaviour of a security boundary rather than an accident.
Why the lookup is null. A third-party widget under a replacement bar gets its bar from pluginBarApiFor() (shell/plugins/bar/Bar.qml:2127), which gives a replacement bar pluginShellForBarEntry() instead of pluginShellForId() (Bar.qml:250-258). That entry facade (shell/shell.qml:705) carries lifecycle and settings callbacks but no _serviceLookup, so serviceFor() returns null (shell/services/PluginShellApi.qml:30). The target.bar = root wiring in the report is from an older clone; a clone of today's Bar.qml hands widgets the entry facade, so the reporter's change to createScopedPluginShell() would not reach this path.
Why it was built that way. 1702cf0be and 094c91306 ("Tighten replacement bar plugin boundaries", after a security report) made the entry facade service-less on purpose. The bar creates and keeps the facade it hands the widget, so any own-service lookup on it also gives the replacement bar the widget's live service object. docs/omarchy-shell.md:54 and manual/32-shell-plugins.md:42 document the limitation, and the manual says to switch back to the built-in omarchy.bar for such widgets.
On the proposed fix. omarchy.clonedFrom is a manifest field the plugin author writes (bin/omarchy-plugin-clone:73 sets it, but nothing verifies it). Trusting it would let any bar that claims omarchy.bar ancestry fetch every loaded third-party service through serviceFor(). Authentication services are stored separately and stay out of reach either way.
Related. #11713, #11796, #12648, #13289 and #14101 report the same limitation. PRs #13194, #13471 and #13633 each propose a different way to give hosted widgets their own service, and so each relaxes the documented boundary to some degree.
Codex Medium reviewed this independently. It agreed with the mechanism and the history, and it added two things: the proposed change leaves the entry facade untouched, and it could find no way to give a hosted widget its own live service without the hosting bar being able to read it too. Its independence is not guaranteed.
What happens next is the maintainer's call: keep the boundary, or allow a narrower grant like the ones those PRs propose. Nothing is waiting on you.
This matches #14101 (and the broader third-party/cloned-bar serviceFor cluster: #13289, #12648, #13794). Fix PRs in flight: #13633 / #13471.
I'd close this as a duplicate of #14101 and keep discussion there.
Same root cause on 4.5.0-3 with a different plugin, io.github.moizibnyousaf.omawhatsapp (kinds bar-widget + service), on a clone of omarchy.bar:
- Stock
omarchy.bar: clicking the bar icon opens the dropdown. - Clone (
omarchy plugin clone omarchy.bar): the click does nothing and nothing is logged.omarchy-shell io.github.moizibnyousaf.omawhatsapp statuskeepsdropdownOpen: false, while the service itself is alive:statusanswers andopenAppopens the window with all chats. - The widget does
bar.shell.serviceFor(root.pluginId)(plugins/omawhatsapp/BarWidget.qml:13), which isnullunder the replacement bar, soLoader.active: !!root.omanever loads.
The own-service-only grant proposed in #13471 / #13633 is what this widget needs; it never resolves anything but its own service id. Adding a second real-world case in case it helps weigh the boundary.
The 4.5.0-3 omawhatsapp report is consistent with the same limitation on current quattro (419a5a7095d118a218d5f84548dbd83ce90067e6). I rechecked widget injection in Bar.qml, pluginShellForBarEntry() and PluginShellApi.serviceFor(): replacement-bar widgets still receive an entry facade with no service lookup. This was a source review; I did not reproduce the WhatsApp plugin on a worker.
PR #13633 has closed in favor of #13471; #13194 and #13471 remain open. This report predates #14101, which is now closed, so the suggestion to close this one as its duplicate does not apply. The documented workaround remains the built-in omarchy.bar.
Codex High reviewed the source, and Opus 5.5 High and muse-wonder via pi, thinking high, also reviewed it. They agreed that giving the shared entry facade a service lookup would also give the hosting bar access to that service; reviewer independence is not guaranteed. Whether to change that documented access policy remains the maintainer's decision. Nothing further is needed from the reporter for that decision.