Skip to content

fix(menu): accept plus in search input - #7659

Open
ketpatil77 wants to merge 7 commits into
omacom:quattrofrom
ketpatil77:fix/menu-plus-input
Open

ketpatil77 wants to merge 7 commits into
omacom:quattrofrom
ketpatil77:fix/menu-plus-input

Conversation

@ketpatil77

Copy link
Copy Markdown

What changed

  • allow printable menu input carrying Shift plus keypad or keyboard-layout modifiers
  • continue rejecting Ctrl, Alt, and Meta shortcuts
  • add regression coverage for the modifier guard

This fixes + being dropped from menu searches on affected keyboard layouts while preserving shortcut handling.

Closes #7629

Testing

  • git diff --check
  • focused Node assertion for the printable-modifier guard

Full shell test runner was unavailable because this Windows host has no Bash/WSL. CI provides the Linux shell suite.

@ketpatil77
ketpatil77 marked this pull request as ready for review August 25, 2026 11:00
Copilot AI balanced review requested due to automatic review settings August 25, 2026 11:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes #7629 by allowing printable menu search input with Shift, keypad, or layout modifiers while still rejecting shortcut modifiers.

Changes:

  • Updates the menu input modifier guard.
  • Adds regression coverage for the new guard.

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/menu/Menu.qml Accepts printable text unless Ctrl, Alt, or Meta is active.
test/shell.d/menu-test.sh Verifies the printable-input modifier guard.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

The image picker's filter had the same exact-modifier guard as the menu, so keypad keys, which carry Qt.KeypadModifier, never reached a filterable picker such as the theme switcher.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Sep 28, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed and verified on an Omarchy worker VM, with this branch merged into current quattro (de63134).

The cause. Qt tags every numeric-keypad key with KeypadModifier, so the old event.modifiers === Qt.NoModifier || event.modifiers === Qt.ShiftModifier check dropped keypad +, and keypad digits along with it. A + typed from the main keyboard already went through. On the worker, typing into omarchy-menu-input with wtype:

Input quattro With this PR
keypad + (nothing) +
keypad 1, +, 2 (nothing) 1+2
x, then Ctrl+A or Alt+A x x (shortcuts still refused)

Pushed to your branch: 354ef34. The image picker's filter (shell/plugins/image-picker/ImagePicker.qml, used by the theme switcher) had the identical guard, so it now gets the same change and a matching assertion in test/shell.d/image-picker-test.sh. On the worker, a filterable omarchy-menu-images picked the wrong image after keypad 1 on quattro, and picked the right one with the fix.

Tests on the worker: test/shell.d/menu-test.sh 128 passed, image-picker-test.sh 21 passed, menu-images-test.sh 6 passed. In ./test/cli, 88 passed and one failed (vscode generated theme references current theme file). That test fails the same way on quattro without this change, so it is not caused by this PR, but it means the full suite is not green.

Second opinion: Codex Medium reviewed the final diff and found no defects. It agreed on the keypad cause and on the scope, though that agreement is not guaranteed to be independent of this review. It also pointed out that on Wayland, AltGr text does not always carry GroupSwitchModifier; that is harmless here, since the new check only rejects Ctrl, Alt and Meta. It noted that the new source-regex assertions check how the guard is spelled rather than how it behaves. That is not a blocker.

This fixes #7629. Nothing is needed from you. It waits on the maintainer, and on the unrelated ./test/cli failure being resolved on quattro.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 9, 2026
quattro appended its own image picker assertions at the same spot as the keypad filter assertion; both are kept.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 9, 2026
@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; the wider input check preserves shortcut exclusions.

Summary

ImagePicker.qml now accepts printable search input with keypad or keyboard-layout modifiers.

  • The image picker accepts printable search text with keypad and layout modifiers.

Reviews (5) · Last reviewed commit: "Merge current quattro and retain printab..." · Reviewed by Greptile

Comment thread test/shell.d/menu-test.sh Resolved
@omarchybot omarchybot added the ready Good to merge label Oct 9, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This branch had stopped merging cleanly into quattro, so I merged current quattro (fcf9eeb) into it and pushed the merge as 5c1be8d. The only conflict was in test/shell.d/image-picker-test.sh, where quattro had added its own image picker assertions at the same spot as this PR's keypad assertion. Both are kept. Against quattro, the change is still the same two guards and two assertions as before.

Verified again on an Omarchy worker VM, with the shell linked to each tree in turn and keys typed with wtype:

Input quattro This head This head, fix reverted
keypad 1, +, 2 into omarchy-menu-input (nothing) 1+2 (nothing)
keypad + (nothing) + (nothing)
x, then Ctrl+A, then Alt+A x x x
keypad 1 in a filterable omarchy-menu-images wrong image right image wrong image

Tests on the worker, at 5c1be8d: menu-test.sh 129 passed, image-picker-test.sh 118 passed, menu-images-test.sh 18 passed, and ./test/cli 117 passed with no failures. The ./test/cli failure noted in my last comment is gone on current quattro, so the full suite is now green. With the fix reverted, the two new assertions fail and nothing else does.

Second opinion: Codex Medium reviewed the merged head and found no defects. It confirmed that the merge resolution keeps every quattro assertion, that these are the only two handlers under shell/ with the old guard, and that the change is proportionate. That agreement is not guaranteed to be independent of this review. Greptile also found nothing blocking. It repeated an earlier point: the new assertions check how the guard is spelled rather than how it behaves. The worker run above checks the behaviour directly.

This fixes #7629. Nothing is needed from you. It now waits on the maintainer.

@omarchybot omarchybot removed ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review labels Oct 15, 2026
quattro moved the menu's search line onto a TextInput (FilterInput) that types every key the menu leaves unaccepted and refuses only Alt and Super chords, so keypad keys reach the menu filter there without this branch's guard. The menu half of the fix and its assertion are dropped in favour of quattro's; the image picker still filters through Keys.onPressed with the exact-modifier check, so its fix stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge and removed verified Omarchy Triage has verified that this issue is ready for final review labels Oct 15, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This branch had stopped merging cleanly into quattro again, so I merged current quattro (c582e1d) into it and pushed the merge as 20b5da6.

What changed in the merge. quattro has since moved the menu's search line onto a text input (shell/Ui/FilterInput.qml, from #15508). The menu now types whatever key it does not handle itself and refuses only Alt and Super chords, so keypad keys already reach the menu filter on quattro without this branch's guard. The conflict was in that handler, so the merge takes quattro's Menu.qml and drops this branch's menu assertion, which checked a line that no longer exists. The image picker still filters through its own key handler with the old exact-modifier check, so its fix stays. Against quattro, this pull request is now that one guard in shell/plugins/image-picker/ImagePicker.qml and its assertion in test/shell.d/image-picker-test.sh.

Verified on an Omarchy worker VM, with the shell linked to each tree in turn and keys typed with wtype:

Input quattro This head This head, fix reverted
keypad 1 in a filterable omarchy-menu-images (images alpha, bravo, zulu-1) alpha zulu-1 alpha
row 1 in the same picker zulu-1 zulu-1 zulu-1
keypad 1, +, 2 into omarchy-menu-input 1+2 1+2 1+2

At this head, Alt+Z and Ctrl+Z in the picker still type nothing.

Tests on the worker, at 20b5da6: ./test/cli 125 passed, menu-test.sh 162 passed, image-picker-test.sh 168 passed, menu-images-test.sh 18 passed. With the fix reverted, the new image picker assertion fails and nothing else does.

Second opinion: Codex Medium reviewed the merged head and found no defects. It agreed that the merge resolution is right, that no other handler under shell/ still uses the old guard, and that the change is proportionate. That agreement is not guaranteed to be independent of this review.

#8023 makes the same change through a shared Util.extendsFilter helper with a behavioural test. Both accept and refuse the same keys, AltGr included. This one was opened first, so it is the one brought forward. Codex Medium came to the same answer when asked without being told mine.

This fixes #7629. Nothing is needed from you. It now waits on the maintainer.

@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review and removed verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 16, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

@ketpatil77 your latest commit, e7e49c5 ("test: exercise image picker modifier combinations"), is empty: its tree is identical to 20b5da6 before it, so no new tests reached the branch. If you meant to add modifier-combination tests, they are still on your machine. Nothing else needs changing for the fix itself.

Re-verified at e7e49c5 on an Omarchy worker VM, against current quattro (33783b1), with the shell linked to each tree in turn and keys typed with wtype into a filterable omarchy-menu-images over images alpha, bravo and zulu-1:

Input quattro This head This head, fix reverted
keypad 1 alpha (dropped) zulu-1 alpha (dropped)
row 1 zulu-1 zulu-1 zulu-1

At this head, Ctrl+Z and Alt+Z in the picker still type nothing. On the worker, ./test/cli (125), image-picker-test.sh (168), menu-images-test.sh (18), menu-test.sh (162) and filter-input-test.sh passed. The seven commits on quattro since the last review do not touch the picker, and the branch still merges cleanly.

Second opinion: Codex Medium reviewed this head and found no defects. It confirmed the commit is empty and that the fix is proportionate and still needed. That agreement is not guaranteed to be independent of this review.

#8023 makes the same picker change through a shared Util.extendsFilter helper. Both accept and refuse the same keys, AltGr and Shift+keypad included, and #8023 adds a behavioural test where this one checks the source line. That is better coverage, not a case this one misses, so the older one, this one, remains the fix to bring forward, and Codex Medium came to the same answer. #8023 already carries ready, so this one is verified but not ready: two ready fixes for one bug would conflict on merge, and choosing between them is the maintainer's call.

This fixes #7629. It now waits on the maintainer.

@ketpatil77

Copy link
Copy Markdown
Author

You are right: e7e49c5 was empty. I captured the file while a baseline test run had temporarily restored its original contents. Corrected in ee6964d; I verified the remote commit contains test/shell.d/image-picker-test.sh with 29 additions and 4 deletions. The table-driven checks evaluate the actual guard with Shift plus keypad/layout modifiers and confirm Control, Alt, and Meta combinations are rejected. The focused image-picker suite passes 197 assertions. This follow-up adds behavioral coverage; the production fix is unchanged.

@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review and removed verified Omarchy Triage has verified that this issue is ready for final review labels Oct 17, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

@ketpatil77 thanks, ee6964d has the tests this time. They pull the picker's guard out of ImagePicker.qml and run it against every modifier combination, so they test what the guard does rather than how it is spelled. With the fix reverted, the new test fails on "image picker accepts keypad".

Re-verified at ee6964d on an Omarchy worker VM, against current quattro (cce8b1c), with the shell linked to each tree in turn and keys typed with wtype into a filterable omarchy-menu-images over images alpha, bravo and zulu-1:

Input quattro This head This head, fix reverted
keypad 1 alpha (dropped) zulu-1 alpha (dropped)
row 1 zulu-1 zulu-1 zulu-1

At this head, Ctrl+Z and Alt+Z in the picker still type nothing. On the worker, ./test/cli (125), image-picker-test.sh (197), menu-images-test.sh (18), menu-test.sh (162) and filter-input-test.sh passed. The fix itself has not changed, and the branch still merges cleanly into quattro.

Second opinion: none this round. The configured reviewer, Codex Medium, answers, but its daily limit of reviews was used up, so this head was reviewed by Claude Opus 5.5 alone. Codex Medium reviewed the same fix at the earlier heads and found no defects.

#8023 makes the same picker change through a shared Util.extendsFilter helper, and it already carries ready. Both accept and refuse the same keys, and now both have behavioural tests. This one is older, so it is still the fix to bring forward. It is verified but not ready, because two ready fixes for one bug would conflict on merge and a head with no second opinion cannot be ready anyway. Choosing between the two is the maintainer's call.

This fixes #7629. It now waits on the maintainer.

@ketpatil77

Copy link
Copy Markdown
Author

Merged current quattro into this branch and resolved the image-picker test conflict. Kept upstream's current test layout and retained the 29-line printable-input regression coverage; the effective diff remains one input guard plus its tests.

Validation on the merged tree: the complete JavaScript payload from image-picker-test.sh, with the repository's shared test prelude, passes under Node; git diff --check passes. GitHub now reports the branch mergeable.

This Windows environment has no Bash or running Omarchy desktop, so the Linux shell wrapper and interactive keyboard behavior remain unverified locally.

@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review and removed verified Omarchy Triage has verified that this issue is ready for final review labels Oct 30, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

@ketpatil77 thanks for bringing the branch up to date. 9de81fc resolves the conflict in test/shell.d/image-picker-test.sh correctly. The assertions it drops are ones quattro removed itself, and your modifier-combination test is kept. Against quattro, the pull request is now the one guard in shell/plugins/image-picker/ImagePicker.qml:723 and that test.

The Menu.qml half of the original change no longer appears in the diff because quattro no longer needs it. Since #15508 (in v4.5.0-rc1), the menu's search line is a real text input (FilterInput), so + and keypad keys type there without any modifier check. What #7629 reported for the menu is fixed on quattro. This pull request fixes the same drop in the filterable image picker.

Re-verified at 9de81fc on an Omarchy worker VM. I merged the branch into current quattro (e4fffc6) and linked the shell to each tree in turn. Then I typed keys with wtype into omarchy-menu-images --filterable over images alpha, bravo and zulu-1, and pressed Return:

Input quattro This head This head, fix reverted
keypad 1 alpha (dropped) zulu-1 alpha (dropped)
row 1 zulu-1 zulu-1 zulu-1
Ctrl+Z, Alt+Z nothing typed nothing typed nothing typed

The worker ran these tests at the head, and all passed:

  • ./test/cli (125)
  • image-picker-test.sh (171)
  • menu-images-test.sh (12)
  • filter-input-test.sh

With the fix reverted, image-picker-test.sh fails on "image picker accepts keypad".

Second opinion: two reviewers read the head: Codex Medium, and muse-wonder through pi at high thinking. Neither found a defect. Both confirmed the merge resolution and that the menu is covered on quattro. They agreed with my reading, and their independence from it is not guaranteed.

#8023 makes the same picker change through a shared Util.extendsFilter helper. It accepts and refuses the same keys, and it carries ready. This one is older and handles every case #8023 does. Both reviewers came to the same view. This is the fix to bring forward, so it is verified but not ready: two ready fixes for one bug would conflict on merge. Choosing between them is the maintainer's call.

It now waits on the maintainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Menu prompts don't allow "+" character

3 participants