Repository navigation
Stop the keybindings scanner spinning on hl list accessors - #10388
calledtoconstruct wants to merge 3 commits into
Conversation
The scan swallows its own errors, so a stub that raised on a numeric index would end the loop, kill the scan, and still exit 0. Bind a chord after the loop and require the menu to render it: Hyprland reports a Lua bind without its key, so the chord can only come from the scan reaching past the loop. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Reviewed by Claude Opus 5 in Claude Code with an independent second opinion from Codex GPT-5.6-sol at xhigh reasoning. The metatable change is correct and I pushed one commit to your branch strengthening the regression test. What follows is about scope rather than about the code, and it matters because your body says The fix works. On a disposable Omarchy worker, a config that iterates What I pushed ( The part that is not fixed, and why the issue links overstate what this closes. On quattro the scan does not get as far as most people's own bindings. That is the second of the two failure modes these issues are really about, and this PR does not touch it. So Where this leaves it. Four open PRs fix this bug: yours, #10212, #8876 and #7564. Yours, #10212 and #8876 are the same one-mechanism change; yours additionally answers nil for numeric keys on Codex agreed with the qconsole analysis, and since it can read this session's files its independence is not guaranteed where it merely agrees. Three things it contributed that I had not reasoned about, and that I verified against the source: |
noop compared as a table and aborted the scan before user bindings.
|
daabd4f: noop now has comparison and arithmetic metamethods, so the stock qconsole |
|
Automated duplication check: this pull request looks similar to #8876, which covers the same keybindings scanner ipairs termination fix. I keep that one open and close this one to consolidate review. If you feel this is the wrong decision, please open the PR again with a note on the difference. |
User configs that
ipairs(hl.get_loaded_plugins())hangomarchy-menu-keybindingsat 100% CPU. The Hyprland stub's__indexreturned a table for numeric keys, soipairsnever saw nil.Return nil for numeric keys on the noop/
hlmetatables. Give noop comparison (__lt,__le,__eq) and arithmetic metamethods so stockqconsole.lua'smonitor.scale <= 0and the followingheight / scale - reserveddo not raise;pcallno longer aborts the scan beforerequire("hypr.bindings").The regression tests load a standalone
hyprland.luathat iterateshl.get_loaded_plugins()and binds a chord after the loop, and a stock user config (require("default.hypr.omarchy")thenrequire("hypr.bindings")) with a probe bind in~/.config/hypr/bindings.luathat must render asSUPER + Y.Fixes #10214
Related hang/missing-binds reports that need both of these stub changes: #7025, #8819, #9052, #9395. This does not time-box the lua child, so a config that spins for some other reason can still hang the menu.