Third-party bar-widgets never receive barWidgetRegistry, so a widget cannot host other widgets
A third-party bar-widget never receives barWidgetRegistry, and the PluginBarApi facade it gets as bar doesn't expose one either. A widget that hosts other widgets — a tray with a drawer, a group, an overflow menu — therefore has no way to resolve the components it is meant to show.
I don't know whether this is a deliberate narrowing or an oversight, so this is a question as much as a report.
What a bar-widget receives
Bar.qml's injectProps() injects exactly three properties:
https://github.com/omacom/omarchy/blob/quattro/shell/plugins/bar/Bar.qml#L1999-L2006
function injectProps() {
var target = activeItem
if (!target) return
if ("bar" in target) target.bar = firstParty
? root : root.pluginBarApiFor(pluginApiId, moduleName, registered)
if ("moduleName" in target) target.moduleName = moduleName
if ("settings" in target) target.settings = moduleSettings
}
For a third-party widget, bar is the PluginBarApi facade, whose surface is tooltips, click targets, popouts, panel switching, _run, _setCenterHoverRevealSuppressed, and _moduleWidgets:
https://github.com/omacom/omarchy/blob/quattro/shell/plugins/bar/Bar.qml#L250-L270
_moduleWidgets looks close but isn't it — it returns the plugin's own live instances across monitors, and only for its own module name:
_moduleWidgets: function(requestedId) {
return String(requestedId || "") === String(moduleName || "")
? root.moduleWidgets(moduleName) : []
}
Where the registry does get injected
shell.qml injects barWidgetRegistry at three sites — the bar itself, service instances, and panel loaders:
configureBar— https://github.com/omacom/omarchy/blob/quattro/shell/shell.qml#L223- service instantiation — https://github.com/omacom/omarchy/blob/quattro/shell/shell.qml#L920
- panel loader — https://github.com/omacom/omarchy/blob/quattro/shell/shell.qml#L1333
pluginBarWidgetRegistryFor already builds a detached, capability-scoped snapshot for third parties, so the safe object exists:
https://github.com/omacom/omarchy/blob/quattro/shell/shell.qml#L755-L772
It just never reaches the bar-widget instantiation path — the one place that would need it to host anything.
Effect
io.github.tyrichards.tray declares property var barWidgetRegistry and reads root.barWidgetRegistry || (root.bar ? root.bar.barWidgetRegistry : null). Both are null, so its drawer resolves 0 of the 8 widgets it is configured to hold. Instrumented in a local fork:
[tray] entries=8 hosted=8 hasContent=true registry=NULL resolved=0
agents/skills/shell-dev.md says entry points accept pluginRegistry / barWidgetRegistry "as appropriate", which reads as though a bar-widget could ask for one.
Question
Is widget-hosting meant to be a full-bar-only capability now? If so, the docs could say so, and a bar-widget asking for barWidgetRegistry could be warned rather than silently handed null — the failure is invisible until someone opens the drawer.
If it isn't deliberate, adding the same if ("barWidgetRegistry" in target) target.barWidgetRegistry = ... line to injectProps (through pluginBarWidgetRegistryFor, so third parties keep the detached snapshot) would restore it without widening what a widget can reach. Happy to send that PR.
Reported with the help of Claude Code.
I'm running into this with Plugin Containers, so there's another plugin affected by this limitation.
Containers originally worked as a regular bar widget. Its author converted it into a replacement bar in 7483097 to regain access to the widget catalogue and bar configuration.
That workaround exposes a second limitation: widgets hosted by a replacement bar receive a service-less shell facade. Bambu Companion, Syncthing and OmaSettings all use bar.shell.serviceFor(moduleName), which returns null through that path.
On my system, running Omarchy 4.0.4-1, all three plugins report enabled: true, but their widgets lose that service connection. This happens even with no containers configured: selecting Containers as the active bar is enough. Bambu's logs include Cannot read property 'connected' of null and Cannot read property 'daemonReady' of null.
The service restriction is documented and has a security reason. It does mean that becoming a full bar doesn't solve the original widget-hosting problem for plugins that depend on services.
Could Omarchy provide a supported way to group widgets while keeping their creation and service access under the trusted stock bar? Containers could describe group membership and presentation preferences, while the host creates each widget with its own scoped interface.
Exposing the catalogue would help resolve components, but service access also needs to be part of the hosting contract for these plugins to work.
I read this against quattro at be7c7bf and the v4.0.2 and v4.0.3 tags. Nothing was run; the mechanism is established in source. Claude Opus 5.5 did the diagnosis and Codex at medium effort reviewed it independently. Codex agreed on the mechanism and added the two points about the proposed fix below.
What is true. On quattro a third-party bar-widget has no direct route to a widget catalogue. ModuleSlot.injectProps() in shell/plugins/bar/Bar.qml sets only bar, moduleName and settings. For a third-party widget bar is the PluginBarApi facade, which has no registry. _moduleWidgets answers only for the caller's own module. pluginBarWidgetRegistryFor() is called for replacement bars, services and panels, but never for bar widgets.
It is a 4.0.3 regression, caused by a deliberate change. In v4.0.2, injectProps() set target.bar = root for every widget, so bar.barWidgetRegistry was the host registry itself. Commit 1702cf0be ("Restrict third-party shell plugin capabilities", first shipped in v4.0.3) replaced that with the facade. The same commit documented catalogue snapshots as a full-bar capability (docs/omarchy-shell.md, agents/skills/shell-dev.md, and the header of shell/services/PluginBarWidgetRegistryApi.qml). So the narrowing was intended. Nothing shows whether anyone specifically weighed that it would also stop widget hosting.
The one-line fix needs more than one line. Two problems:
injectProps()has no manifest for the widget it is filling.root.manifestbelongs to the active bar, which is first-party for the stock bar.pluginBarWidgetRegistryFor()returns the raw host registry for a first-party or missing manifest. So the natural way to write the line would give third-party widgets more than they had before this issue was filed, not the detached snapshot. A correct version needs a host-side lookup of the widget's own plugin manifest.- The snapshot carries live
Componentobjects, including first-party ones. A widget that instantiates them gets children that never pass throughinjectProps(), so they get nobar, no settings and no service access. That is @CristianoCorsi's point, and the code confirms it. Only the stock bar can askpluginShellForId()for a service-capable facade for a widget it creates. A registry alone would let a tray render simple widgets, but not service-backed ones like media.
A workaround today. A plugin that also declares a service can reach the snapshot through that service. The service has barWidgetRegistry injected, and the widget can reach its own service with bar.shell.serviceFor(<own id>). That still doesn't help with the service-access problem for hosted children.
Related, not duplicates. #10937 (_moduleWidgets scoped to the caller), #10929 and #11932 (drag API and state) and #11185 (slot geometry) are other capabilities the same 4.0.3 facade change removed. Each needs its own fix. #10992 names a null bar.barWidgetRegistry.metadataFor() as one candidate cause of its News Radar symptom, so it may share this mechanism. Its report is broader than this one.
What happens next. This waits on the maintainer. Whether third-party widgets may host other widgets, and what their hosted children receive, decides the third-party capability boundary. That isn't a defect fix I can make on my own, so no pull request was opened. If hosting should be supported, the commenter's suggestion fits the existing design: the plugin describes the grouping and the stock bar instantiates each child with its own scoped facade. If it is meant to be full-bar-only, the docs could say so. A widget that declares barWidgetRegistry could also get a warning instead of silently receiving nothing.
Possibly relevant here: #15281 (open, from @dhh) adds a first-party tray bar section, so any bar widget can live in the tray's drawer and be placed via omarchy bar move <id> --section tray or barWidget.defaultSection: "tray". It doesn't give third-party widgets a registry, but it covers the "tray with a drawer" case through the trusted stock bar, which is the direction @CristianoCorsi suggested above.
Thanks @jandrusk. I checked #15281 against quattro at 492b8837d. It landed there as 1a161eb51 and is not in a release yet; v4.0.4 is the latest. Claude Opus 5.5 read the source, and Codex at medium effort traced it on its own. Codex agreed and added the sectionHost point below. Nothing was run.
What it covers. Widgets in the new tray section are ordinary ModuleSlots, created by the stock bar inside the tray's drawer (shell/plugins/bar/Bar.qml, the traySectionComponent loader). Each one goes through injectProps() itself, so a third-party widget in the drawer gets its own scoped facade, including bar.shell.serviceFor(<own id>). So a drawer full of widgets, service-backed ones included, now works without a third-party tray. That covers the case io.github.tyrichards.tray was built for, and the service gap @CristianoCorsi described doesn't apply inside the drawer.
What is still open. injectProps() is unchanged. A third-party bar widget still receives no barWidgetRegistry, and PluginBarApi still exposes none. So a widget still cannot resolve or create other widgets in its own UI. Groups other than the one tray drawer, like Containers, are not covered either: the sections are still left, center, tray and right. Codex also found that any widget exposing a sectionHost property gets the shared tray section drawn into it, so a third-party tray clone can host the drawer's widgets. That hook isn't documented, and it only hosts the one shared tray section, not a group of the plugin's own.
What happens next. This still waits on the maintainer: whether third-party widgets should host widgets beyond the tray drawer, and if so how. If the drawer is the intended answer, the issue could be narrowed to the rest or closed once #15281 ships.