Repository navigation
Clear a stuck bar-move ghost when the gesture is interrupted - #7563
calledtoconstruct wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes #7276 by reliably dismissing the bar-move ghost after interrupted gestures.
Changes:
- Clears stale move state on destruction, dropped grabs, and subsequent presses.
- Adds regression checks for each cleanup path.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
shell/plugins/bar/Bar.qml |
Adds fallback gesture cleanup paths. |
test/shell.d/bar-test.sh |
Verifies the new cleanup safeguards. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Reviewed, reproduced on a worker, and fixed up with one small commit. The bug is real, and this fixes it. On a worker built from the Omarchy ISO, with the shell running from each tree, I pressed and held the empty bar centre until the move started, switched Pushed 8b99b9d, which removes the Tests, on the worker at 8b99b9d: Second opinion: Codex at medium effort. It found the dead handler and the too-loose assertions independently. Both are fixed above. Its second round on 8b99b9d found nothing. It could read this session's working, so its agreement isn't guaranteed independent. This is waiting on the maintainer. Fixes #7276. |
The overlay stays mapped when a reload, remap, or dropped grab tears down the gesture area without released or canceled. Cancel the move on destruction, after a lost press, and on a later click so omarchy-bar-move-ghost cannot outlive the gesture. Fixes omacom#7276
Qt emits released before pressedChanged on a release, and canceled before pressedChanged when the grab is lost, so by the time this handler ran dragging was always already false and it returned without scheduling anything. Watched on a worker: released fires first with dragging still true, then pressedChanged with it false. The remaining assertions now require the call, root.clearBarMove(), rather than the bare name, which a no-op reference also matched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
8b99b9d to
a888bc5
Compare
[Low impact] The PR appears safe to merge; the remaining runtime-test suggestion is non-blocking. Findings
SummaryClears leftover bar-move previews in two places:
Reviews (3) · Last reviewed commit: "Merge quattro into fix-7276-bar-move-gho..." · Reviewed by Greptile |
| if ! perl -0ne 'exit(/component CenterGestureArea: MouseArea \{.*?Component\.onDestruction:\s*if\s*\(\s*dragging\s*\)\s*root\.clearBarMove\(\)/s ? 0 : 1)' \ | ||
| "$ROOT/shell/plugins/bar/Bar.qml"; then | ||
| fail "bar move clears when the gesture area is destroyed mid-drag" | ||
| fi | ||
| pass "bar move clears when the gesture area is destroyed mid-drag" | ||
|
|
||
| if ! perl -0ne 'exit(/component CenterGestureArea: MouseArea \{.*?onPressed:\s*function[^{]*\{[^}]*barMoveActive[^}]*root\.clearBarMove\(\)/s ? 0 : 1)' \ |
There was a problem hiding this comment.
Gesture behavior remains untested These checks only look for cleanup statements in the QML source. They would still pass if destroying the gesture area failed to clear an active ghost, or if the next press failed to dismiss it. A runtime test of those interrupted-gesture paths would catch regressions that these checks cannot.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Re-verified after the rebase onto Reproduction, on a worker built from the Omarchy ISO with the shell running from each tree. A real pointer pressed and held the empty bar centre until the move ghost appeared. Then
Tests at a888bc5: On the Greptile note: it's right that the two new assertions check the source text, not the behaviour, like the rest of Second opinion: Codex at medium effort reviewed this head against the new base and found no defect in the change. It also flagged the same weakness in the assertions. It could read this session's working, so its agreement isn't guaranteed to be independent. This isn't ready yet because the test suite doesn't pass. The failure comes from the stale |
The only conflict was in test/shell.d/bar-test.sh, where quattro added its plugin api and indicator assertions at the same spot this branch added its gesture assertions; both are kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This branch had stopped merging into Reproduction, on a worker built from the Omarchy ISO, with the shell running from each tree. A real pointer pressed and held the empty bar centre until the move ghost appeared. Then
Tests at bd036fb: Second opinion: Codex at medium effort reviewed the merge and this head against the new base. It found no defect. It checked that nothing from either side of the conflict was lost, and that the newer This is waiting on the maintainer. Fixes #7276. |
quattro removed the bar's source-reading tests in omacom#16334, and AGENTS.md now rules them out, so the conflict in bar-test.sh resolves to quattro's file and drops the two regex checks this branch had added. The fix in Bar.qml merges cleanly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This branch had stopped merging into Reproduction, on a worker built from the Omarchy ISO, with the shell running from each tree. A real pointer held the empty bar centre until the move ghost appeared. Then
One result is different from last time. With The description still says the change handles "the pointer grab is dropped without Tests at b86d798: Second opinion: Codex at medium effort and muse-wonder (via pi, thinking high) both reviewed the merge and this head. Neither found a defect. Both confirmed that nothing else from either side of the merge was lost, that This is waiting on the maintainer. Fixes #7276. |
Summary
released/canceled, and on a later press if the overlay is still up.omarchy-bar-move-ghostlayer was staying mapped after a mid-gesture reload/remap, which left a checkered slab over the bar for the rest of the session.Fixes #7276
Test plan
bash test/shell.d/bar-test.shhyprctl layershas noomarchy-bar-move-ghost.