Repository navigation
Preserve menu position and search state when navigating back - #7800
AnthonyPoschen wants to merge 6 commits into
Conversation
Keep the parent row selected when returning from a submenu with the keyboard. Assisted-by: Codex/GPT-5
Keep the active query while entering and returning from nested menu results. Assisted-by: Codex/GPT-5
Entering a submenu begins a fresh search while Back restores the query saved for each menu level. Validation:\n- bash test/shell.d/menu-test.sh\n- qmllint shell/plugins/menu/Menu.qml Assisted-by: Codex/GPT-5
Keep Backspace available for editing while Left consistently returns to the parent menu. Validation:\n- bash test/shell.d/menu-test.sh\n- qmllint shell/plugins/menu/Menu.qml Assisted-by: Codex/GPT-5
Make Left at the top-level menu return to the unfiltered starting view. Validation:\n- bash test/shell.d/menu-test.sh\n- qmllint shell/plugins/menu/Menu.qml Assisted-by: Codex/GPT-5
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56389fea66
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR improves keyboard navigation in the Omarchy Quickshell menu (shell/plugins/menu/Menu.qml). Previously, navigating back reset the selected row and cleared the search query. Now each menu level remembers its own selected index and search text, so returning with Left/Backspace restores the parent menu's cursor position and filter. navStack is upgraded from a stack of menu-id strings to a stack of { id, selectedIndex, filterText } snapshots to carry this state.
Changes:
setActiveMenugainsrestoredIndex/restoredFilterparams and pushes a full state snapshot ontonavStack;goBackrestores that snapshot when leaving a submenu.- Key handling:
Leftnow always navigates back (and clears an active search at the top level), whileBackspacestill edits the current search and only navigates back when the search is empty. - Updated
test/shell.d/menu-test.shsource-pattern assertions to match the new signatures and control flow.
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 1 comment.
| File | Description |
|---|---|
| shell/plugins/menu/Menu.qml | Stores per-level selection/search snapshots in navStack, restores them in goBack/setActiveMenu, and reworks the Left/Backspace key handling. |
| test/shell.d/menu-test.sh | Updates source-pattern assertions to cover the new setActiveMenu signature, snapshot push, and back-navigation key flow. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Limit Left-key menu navigation to regular menu mode so dmenu prompts retain their entered text. Validation:\n- bash test/shell.d/menu-test.sh\n- qmllint shell/plugins/menu/Menu.qml Assisted-by: Codex/GPT-5
|
i noticed this has progressed, i am available to iterate if needed. |
|
Automated duplication check: this pull request looks similar to #7074, which covers the same menu goBack selection restore. 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. |
|
Reopening after the automated duplication check against #7074. #7074 and this PR both restore the selected row when This PR also:
Why the extra state matters: filter root to
Happy to iterate if the smaller cursor-only change is preferred first. |
Why it changed
i liked exploring the menu's with the keyboard and got annoyed the menu selection got reset on me and i couldn't go back a menu without backspacing an entire search. Gif shows the new flow
What changes
Improves keyboard navigation in the Omarchy menu:
Leftor Backspace restores the previous menu’s selected row.Leftalways navigates back, including while a search query is active.Leftclears the active search and returns to the normal starting view.Validation
bash test/shell.d/menu-test.shqmllint shell/plugins/menu/Menu.qml