omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Third-party bar-widgets locked out of bar drag-reorder (PluginBarApi exposes no drag state)

Open ujo4eva opened this issue 2 months ago • 1 comments

Third-party bar-widgets cannot participate in bar drag-reorder (regression vs pre-sandbox shell)

Setup

  • Omarchy 4.0.3-1, quickshell 0.3.1-1
  • Intel i5-9300H, Intel UHD 630 + NVIDIA GTX 1050 Max-Q
  • Affected plugin: io.github.tyrichards.tray 1.9.3 — its headline feature (drag any bar widget into its drawer) used to work and no longer does, with no plugin-side change.

What happens Dragging a widget over the third-party tray never registers: no highlight, no insertion marker, release falls through to stock bar reorder. Additionally, a hand-written hosted entry (widgets: [{entry: {id: ...}}] on the tray's shell.json entry) never renders, with no load error in the shell log.

Why (traced to the sandbox)

  • Third-party widgets receive PluginBarApi (shell/Ui/PluginBarApi.qml) instead of the Bar object. It exposes no drag state or operations: barDragSource/Window/Screen/SceneX/Y, captureBarDragGhost (plugins/bar/Bar.qml:529), moduleDropAtScene (:913), dropMarkerRect (:445), moduleClickTargetAt/pressModuleClickTarget, moduleSlots/slotWindow are all absent, so a widget cannot observe or join a drag.
  • pluginHasBarCapabilities (shell.qml:354) requires kinds: ["bar"], so a kinds: ["bar-widget"] plugin's _mutateBarConfig is gated off (shell.qml:654-656) and cannot persist a drop Shepherd-style layout change.
  • Net: any widget needing drop-target behavior is architecturally blocked. Filing here rather than only upstream because the fix (read-only drag-state exposure and/or a scoped widget-capture mutate path for widgets, or an explicit statement that drag-interop is first-party-only) has to come from the shell side.

Repro

  1. omarchy plugin add https://github.com/TyRichards/omarchy-tray.git --enable --yes, swap omarchy.tray for io.github.tyrichards.tray in shell.json.
  2. Drag any bar widget onto the tray — nothing happens.
  3. Optional: hand-add "widgets": [{"entry": {"id": "bt.codecs"}, "listed": true}] to the tray entry — drawer still renders empty on hover.

Happy to capture logs, test a branch, or move this to Discussions if you prefer to track it as a feature request rather than a regression.

ujo4eva avatar Sep 15 '26 11:09 ujo4eva

This is the same root cause as #10929 (the 4.0.3 bar-widget sandbox removed the drag API from PluginBarApi, which broke the omarchy-tray drawer). It might be easiest to track it there. Related sandbox gaps: #11185 (slot geometry) and #11063 (barWidgetRegistry).

Also worth knowing: #15281, opened today, adds a first-party tray bar section, so you can drag any widget into the tray's drawer without a plugin. That may cover the main use case here. The hosted-entry rendering problem would still need its own fix.

jandrusk avatar Oct 13 '26 16:10 jandrusk