omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Bar drag-and-drop: empty left/right sections can't accept widgets; center drops broken on a notched top bar

Open negentropic opened this issue 3 weeks ago • 3 comments

Tested on a MacBook Pro 16" (notched panel). Drags were done with a virtual mouse (uinput). Positions are logical px, and the bar layout was read from shell.json after each drop.

1. Empty left / right sections can't accept dragged widgets

Once a side section has no widgets, nothing can be dragged into it. The widget lands in the center group instead. This happens with the bar at the top and at the bottom, so the notch isn't involved.

Steps to reproduce

  1. Empty the left section: omarchy bar move omarchy.workspaces --section centerBegin --index 0. The layout now has "left": [].
  2. Drag omarchy.clock to the far left of the bar and release it.

Expected: the clock goes into left. Actual: the clock lands at the start of centerBegin, and left stays [].

Results

Bar Setup Drop Result
top left: [workspaces] clock at x=160 ✅ left: [workspaces, clock]
top left: [] clock at x=61 ❌ lands in centerBegin[0]
top left: [tornikegomareli.spaces] (third-party) clock at x=220 ✅ left: [spaces, clock]
bottom left: [workspaces] clock at x=300 ✅ left: [workspaces, clock]
bottom left: [] clock at x=61 ❌ lands in centerBegin[0]
bottom right: [] (all right widgets moved to centerEnd) clock at x=1680 ❌ lands at the end of centerEnd

Likely cause

Bar.qml → moduleDropAtScene() only builds drop targets from existing widget slots, then calls BarModel.centerDropTarget() (plugins/bar/BarModel.js:189). Outside the center box it uses nearestEdge() over the slots that aren't in the center, and otherwise falls back to centerBegin/centerEnd. When a side section has no slots, there's nothing on that side to match, so the drop goes to the center. The center box (centerDropZone) and the tray drawer (traySectionDropRect) give an empty section a drop area; left and right don't.

Suggested fix

Give an empty left/right section a drop zone at its bar edge, as centerDropZone / traySectionDropRect do for the center and tray.

Workaround

omarchy bar move omarchy.workspaces --section left --index 0

2. Notched top bar: center drag-and-drop misbehaves

With the bar on top of a notched panel, centerBesideRight (BarModel.js:625) draws all the center sections (centerBegin, center, centerEnd) up against the right section. On this panel (3456×2234, the only mode it offers) that's always the case with the bar at the top.

2a. Nothing can be placed beside the notch

The middle of the bar can't hold anything. A drop there goes to the nearest widget edge, which in practice means the start of centerBegin. If the dragged widget is already first, it looks like it snapped back.

Expected: widgets can sit just left and right of the camera cutout, for example centerBegin left of it and centerEnd right of it, the way the center sits in the middle of a bottom bar.

2b. Reordering inside the center group fails when dropping onto a neighbor

Bar Drag Drop Result
bottom (no notch) update-center → onto the clock's left edge x=480 ✅ moved before the clock
top (notch) update-center → onto the clock x=1100, 1130, 1170 ❌ layout unchanged
top (notch) update-center → just outside the group's left end x=1071 ❌ layout unchanged
top (notch) update-center → well left of the group x=1000, 864 ✅ moved before the clock

The same drag that works on a bottom bar does nothing on a notched top bar unless the drop is well outside the group. A guess, not verified: the center sections are pinned to the right section and grow toward the start (fixedEdge: "end"). The room opened for the dragged widget shifts its neighbors away from the pointer, so the drop resolves back to the widget's own room.

2c. Drops just past the end of the center group go into the tray drawer

Top bar: dragging the clock to the gap between the end of the center group and the right section (x=1478) opened the tray drawer, and the clock was added to tray (hidden behind the < chevron). The tray drawer's drop zone (traySectionDropRect) reaches over that gap, so there's no way to drop at the end of the center group. To a user it looks like the widget vanished.

Summary of the notch results

Bar Drop Result
bottom (no notch) clock just right of the center group, x=870 ✅ center: [clock], drawn in the middle of the bar
top (notch) clock just left of the notch, x=701 ❌ goes to centerBegin[0] (where it already was)
top (notch) clock just right of the notch, x=1000 ❌ goes to centerBegin[0] (where it already was)
top (notch) clock just past the center group, x=1478 ❌ goes into the tray drawer

I was previously able to place widgets on both sides of the notch. I can't say under which conditions: the panel has only one resolution, and the notch is matched in every configuration on this machine.

Not reproduced

My left section was originally emptied after I moved the bar to a side edge, then the bottom, then back to the top. Repeating that, both with omarchy bar position and by dragging empty bar space (top → left edge → bottom), left left intact. The earlier emptying was probably an accidental widget drag rather than the position change.

System

  • Hardware: Apple MacBook Pro (16-inch, M1 Max, 2021), eDP-1 3456×2234 @ scale 2; cutout top: 64 in /usr/share/omarchy-platform/display-cutouts.json
  • Omarchy: 4.5.0-3
  • omarchy-mac: 0.2.3-2
  • Hyprland: 0.56.2-7
  • Quickshell: 0.3.2.r7.g2b4501a-1
  • Kernel: 7.2.11-14-1-ARCH

negentropic avatar Nov 11 '26 20:11 negentropic

https://github.com/user-attachments/assets/674c9ffc-78fc-4d61-9eb4-f168f21bc532

negentropic avatar Nov 11 '26 20:11 negentropic

Codex High read the report and follow-up, checked the drop-routing code on quattro at d54cde78f174761803e4caa96c38006a3461d0d2, and looked up related issues and proposed fixes. The empty-side-section case is also tracked in #9842. Open PRs #16753 and #18587 address empty side sections; #18587 explicitly leaves the notch cases in this report outside its scope.

My classification was bug, but the configured classification reviewer, deepseek-v4p1-flash, returned no classification. The required two-model classification is therefore unsettled, and this item is left for maintainer review. No tests or live reproduction ran, and no substantive second-opinion review was requested after that classification step stopped the run. This pass rests on Codex High's review alone.

omarchybot avatar Nov 19 '26 02:11 omarchybot

Codex High reproduced both empty-side failures on an ISO-based worker running quattro at 3ae299b2cf3c4fabb8447a9e25a23135cdbdec7e: dragging the clock into an empty left section on a top bar put it in centerBegin, and dragging it into an empty right section on a bottom bar put it in centerEnd. The CLI checks and focused bar-test.sh, bar-notch-test.sh and live bar-drag-test.sh passed; those existing tests do not cover the empty-section failure.

The empty-section part overlaps #9842 and has proposed fixes in #16753 and #18587; #19185 addresses the left side. The notch cases make this report broader than #9842, and none of these PRs fixes the whole report, so this stays open without a closing link to a partial fix.

The current notch layout explicitly puts all three center sections beside the right section; #17744 proposes splitting them around the cutout. I also inspected the attached recording and the tray/drop-routing code. Opening the tray during a drag can shift that adjacent center group, so a position measured before the drag may refer to a different target once its drawer opens. A software simulation of the notch layout successfully reordered a widget onto the clock; that does not validate your Mac or reproduce your exact layout's failure.

The configured second-opinion process was interrupted twice before completion. Its availability check succeeded, but no completed second opinion is credited; these checks and findings rest on Codex High’s review alone. No fix revision has been verified.

This is left for the maintainer to consider the existing fixes and notch layout. To isolate the remaining reorder and tray-drop cases, please include .bar.layout before and after a failed drop, including the tray's pinned/hidden settings, and whether the target coordinates were measured before or after its drawer opened.

omarchybot avatar Nov 23 '26 10:11 omarchybot