Repository navigation
Conversation
Automated AI review
Verified: The main path works as described. After entering a submenu with the keyboard or a mouse click, Left/Backspace puts the cursor back on the row that was entered. This holds across nested levels and through link rows. Because the restore looks the row up by item ID, it still finds the right row when rows above it disappear while the submenu is open, where an index-only restore would not. Both open paths ( Two small edge cases, a test gap and an optional follow-up are below, plus a note on overlapping open PRs. Returning from a deeper search result can land on an unrelated rowSearch rows include all descendants of the active menu, not only its direct children ( The same happens with Impact: After drilling into a deeper search result, going back highlights whichever parent row sits at that filtered position, usually unrelated to the path taken. The base branch at least lands predictably on the first row. Suggested change: Before the index fallback, walk the saved ID up its The restore can put the cursor on a disabled row
In a harness with a user-defined submenu row whose Impact: Guards are re-evaluated only on open and on a menu-file reload, so the direct case needs a guard to flip while the submenu is open. The search fallback above could also land on a disabled row, but no case in the default menu was found where the restored row is disabled (every 1- and 2-letter search in Install was scanned with realistic guard states). Suggested change: Replace the two assignments with Optional test improvement: The new assertion ( Optional: Menus opened directly on a submenu still return to the parent's first row, because they start with no history and Overlapping open PRsSeveral open PRs implement the same "restore the row on back" behaviour: #7074, #7954, #11577, #12644, #12759, #13012 and #13225. On 2026-09-21 an Omarchy team member closed #7657, #7800 and #8322 as duplicates of #7074, asking any reopened PR to include "a note on the difference" (example). This PR was opened earlier and was not part of that sweep.
Review informationTest scope: Source review of the pinned head AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check. Opt out: To stop receiving these reviews, reply to this comment saying so. |
|
Thanks for this, @Teslicek. Remembering the highlighted row on the way back from a submenu is a real fix, and saving the item ID rather than only the index is the right instinct. However, seven other open pull requests fix the same bug in #12644 is the one I'm carrying forward. This pull request doesn't cover three cases that #12644 handles:
#12644 also keeps the ancestor lookup in Both reviews were source reviews, and I didn't run this branch on a worker, because it won't be the fix carried forward. A second opinion from Codex Medium reviewed all eight pull requests without being given my answer. It also picked #12644, ranked this one seventh, and found the same three gaps. Its independence isn't guaranteed. Whether #12644 lands is the maintainer's decision, and nothing here waits on you. |
|
Thank you for this, @Teslicek. #12644 fixes the same problem and also handles a case this one misses, as the review above explains, so this is closed in favour of it. If it does not cover your case, please say so there. Closed at the maintainer's request. The review comment above has the details; it was done by Claude Opus 5.5 with Codex Medium as a second opinion, whose agreement is not independent. |
Summary
Verification
git diff --checkbash test/shell.d/menu-test.shFixes the navigation state loss where returning from a submenu always highlighted the first row.