Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes leaked omarchy-menu-select waiters when requests are superseded.
Changes:
- Completes displaced menu requests.
- Adds compositor-backed regression coverage for both supersede paths.
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 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
shell/plugins/menu/Menu.qml |
Finishes superseded requests. |
test/shell.d/menu-select-supersede-test.sh |
Runs and validates the regression fixture. |
test/shell.d/fixtures/menu-select-supersede/shell.qml |
Exercises both supersede paths. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| function openDmenu(payload) { | ||
| // Same contract as openExistingMenu: a request displaced by a newer one | ||
| // still gets its done file written, or the waiting script never exits. | ||
| root.finishRequest(null) |
There was a problem hiding this comment.
Fixed in 833e51e by queueing completion writes through the single process, mirroring the releaseNextDoneFile pattern in ImagePicker.qml: finishRequest() pushes onto pendingDoneWrites, runNextDoneWrite() guards on resultProc.running, and onExited drains the next entry. The fixture now opens four requests back-to-back with no delay and asserts every displaced done file (b, c, d) lands.
|
Reviewed, and the fix holds. Nothing found to change. Reproduced on a worker built from the Omarchy ISO, with its compositor serving the tree under test. I ran real
One side effect checked. When nothing is pending, Suite: Second opinion: Codex at medium effort reviewed the diff without running it and found nothing actionable. It judged the queue necessary rather than excess, since two synchronous supersedes would otherwise reuse a running This fixes #7818, which is already linked. It is labelled |
The previous commit took a missing selection file for a caller that gave up, so a caller that leaves creating the file to the shell waited forever for a done file that never came. Nothing in the tree calls the menu that way, but the test in omacom#7826 does, and a plugin could. Note at the summon whether the selection file exists, and skip the answer only when it did and has gone since. A request whose rows cannot be read is answered as before. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
quattro added `altHeld = false` at the top of openExistingMenu(); keep it after the finishRequest(null) this branch adds there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hand-rolled runner reported a missing Quickshell as a pass rather than a skip, and its cleanup stopped only Quickshell, leaving any process the fixture started behind. require_quickshell and run_qml_fixture in base-test.sh do both properly and replace the copied setup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com> Co-Authored-By: muse-wonder via pi, thinking high <noreply@pi.dev>
[Medium impact] The PR appears safe to merge; no actionable issues remain. SummaryThe PR finishes displaced select and input requests before another menu takes over.
|
The house rules ask for an area's existing test file to be extended rather than a new one added, so the check now runs at the end of menu-test.sh, after its headless checks, and skips there without a compositor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This branch had stopped merging with The merge (629771f). The only conflict was at the top of Reproduced again on a worker built from the Omarchy ISO, with its compositor serving each tree. I ran real
The test (207e8d3, 5f66a7c). The runner reported a missing Quickshell as a pass rather than a skip. Its cleanup also stopped only Quickshell, so any process the fixture started was left running. It now goes through Suite: Second opinion: Codex Medium and muse-wonder (via pi, thinking high) reviewed the merged tree and found no defect in the fix on current Competing fixes. #9031, #9056 and #17239 also fix this stranding. Both reviewers were given all four diffs without my answer, and both picked this one: it is the oldest, and none of the newer ones handles a case of this bug that it misses. That matches my reading and earlier triage comments on #9031 and #9056, so their independence isn't guaranteed. What #9031 and #17239 add beyond it is about a different failure, the shell exiting or restarting while a caller waits, plus a This fixes #7818, which is already linked. It is labelled |
The previous commit took a missing selection file for a caller that gave up, so a caller that leaves creating the file to the shell waited forever for a done file that never came. Nothing in the tree calls the menu that way, but the test in omacom#7826 does, and a plugin could. Note at the summon whether the selection file exists, and skip the answer only when it did and has gone since. A request whose rows cannot be read is answered as before. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The previous commit took a missing selection file for a caller that gave up, so a caller that leaves creating the file to the shell waited forever for a done file that never came. Nothing in the tree calls the menu that way, but the test in omacom#7826 does, and a plugin could. Note at the summon whether the selection file exists, and skip the answer only when it did and has gone since. A request whose rows cannot be read is answered as before. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Keep the menu payload and snapshot-provider tests alongside the runtime supersede regression.
Carry the active-request guard from omacom#9056 across all three entry points. The native keybindings menu now clears request state too, and must answer the displaced caller first. Guarding the finish also avoids closing and reopening an idle menu. Extend the runtime fixture to cover a select displaced by keybindings and check that delayed writes leave the replacement open. Co-Authored-By: FernandoJVideira <03.pleaser-minster@icloud.com> Co-Authored-By: GPT-6 (Codex) <noreply@openai.com>
Exercise a selected value while cancellations still occupy the completion writer, as the panel review suggested. Preserve the payload tests’ existing scratch cleanup when the QML fixture installs its cleanup handler. Co-Authored-By: muse-wonder via pi, thinking high <noreply@openrouter.ai> Co-Authored-By: GPT-6 (Codex) <noreply@openai.com>
|
The branch is brought onto On a disposable worker built from the Omarchy ISO, real
Checked by GPT-6 in Codex (effort not exposed), with final source reviews by Opus 5.5 High and muse-wonder via pi, thinking high. Both final reviews found no actionable defect; their agreement is not guaranteed to be independent. The panel contributed the queued-selection coverage. Its proposed completion-queue stall was checked against a real Quickshell process on the worker: Greptile reviewed this head at 5/5 with no new findings. It is labelled |
The previous commit took a missing selection file for a caller that gave up, so a caller that leaves creating the file to the shell waited forever for a done file that never came. Nothing in the tree calls the menu that way, but the test in omacom#7826 does, and a plugin could. Note at the summon whether the selection file exists, and skip the answer only when it did and has gone since. A request whose rows cannot be read is answered as before. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Fixes #7818
Problem
Superseding a pending
omarchy-menu-selectleaks its waiter forever: the bash script polls a done file at 20 Hz that nothing will ever write. Reproduced here on 4.0.0-1 before touching anything:Each leak also strands its mktemp files for the life of the session, since the
trap ... EXITcleanup never runs.Root cause
Two paths discard a live select/input request without finishing it, and both neutralize every escape hatch:
openExistingMenu()clearsrequestActive,selectionFileanddoneFileoutright. The later dismiss can't help (cancel()guards ondmenuActive, which themode = "menu"reassignment just turned false), andfinishRequest()would early-return anyway on the cleared handles.openDmenu()overwrites those same properties when a new select/input supersedes an active one — identical leak through a sibling trigger.Fix
Both functions now call
root.finishRequest(null)before reassigning state, so a displaced request gets its done file written (empty selection -> waiter exits 1). Safe to call unconditionally becausefinishRequest()already early-returns when nothing is pending, andresultProc.onExitedis serial-guarded so the cancellation write cannot close the menu taking over.Since several supersedes can land within the few milliseconds one completion spawn takes,
finishRequest()no longer reassigns the sharedresultProcdirectly — writes push onto apendingDoneWritesqueue drained fromonExitedwith arunningguard, mirroring the existingreleaseNextDoneFilepattern inImagePicker.qml. No visual change in any flow — only hidden bookkeeping writes are added, which is why there are no screenshots to attach.Test
New
test/shell.d/menu-select-supersede-test.sh(compositor-gated, skips cleanly without quickshell) drives the realMenu.qmlthrough both supersede paths via a fixture undertest/shell.d/fixtures/menu-select-supersede/. Scenario A supersedes a live select by opening the regular menu; scenario B opens four selects back-to-back with no delay, displacing three requests synchronously while an earlier completion write may still be spawning. The runner asserts every displaced done file was written and empty.superseding a pending menu select strands its waiter; with the fix it passes, including four consecutive clean runs of the back-to-back scenario../test/all: 183/189 files pass. The 6 failing files (config-test,launch-about-test,runtime-smoke-test,screenshot-sanity-test,snapper-test,unowned-system-paths-test) fail identically on pristinequattroon this machine — pre-existing environment issues, unrelated to this change.