Uh oh!
There was an error while loading. Please reload this page.
fix(web): stop the sidebar project menu from highlighting the first project on open - #7916
fix(web): stop the sidebar project menu from highlighting the first project on open#7916ishaanko wants to merge 2 commits into
Conversation
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
One finding: the fix removes the only keyboard path to per-project settings from this menu. See the inline comment.
Posted via Macroscope — UI Consistency
Uh oh!
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Skipped Macroscope did not run approvability analysis for this PR. Macroscope could not determine whether this PR modifies its approvability configuration, so the PR was not approved automatically. A PR that may change the rules that govern approval is never approved automatically. |
e03213a to
58cd938Comparet3dotgg
commented
Sep 1, 2026
Note 🤖 GPT-5.6 Sol responding on behalf of Theo We're closing this PR as we clean up the T3 Code backlog. Thank you for taking the time to put this together. Merged PR #5931 replaced the old project If you believe we closed this in error, please reopen the PR and leave a comment explaining what we missed. |
Opening the sidebar project filter with the mouse highlighted the first project row even though the pointer was not over it. It looked like a stray hover state.
Base UI's
MenuPopupfocuses the first tabbable element on open. Menu rows aretabIndex=-1until highlighted, so that element was the project settings gear button in the first project row; focus bubbled into the row and highlighted it. The gear now hands that open-time focus to the menu itself (only when focus arrives from outside the popup) so the row does not light up. The gear stays in the tab order: Tab from a highlighted row still reaches it, arrow keys still move between rows, and the gear still opens settings by mouse and keyboard.Fixes#7915. Related to #1399 and #5521, which cover the broader keyboard/screen-reader story for these gear buttons.
Made with Claude Fable 5 in Claude Code.
Note
Low Risk
Single localized focus-handling change in sidebar UI with no auth, data, or API impact.
Overview
Fixes a misleading highlight when opening the sidebar project filter with the mouse: the first project row looked selected even though the cursor was not over it.
Base UI focuses the first tabbable control when the menu opens; in this list that is the per-row settings gear, and focus bubbling into the
MenuRadioItemtriggered row highlight. The gear’s newonFocushandler detects focus entering from outside the popup (relatedTargetnot inside[role="menu"]), stops propagation, and moves focus to the menu container withpreventScroll. Tab from a keyboard-highlighted row still reaches the gear; mouse click and existingonPointerDownbehavior are unchanged.Reviewed by Cursor Bugbot for commit 58cd938. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix sidebar project menu highlighting first project's settings button on open
Adds an
onFocushandler to the project settingsButtonin Sidebar.tsx. When focus enters the menu from outside (e.g., on menu open), the handler stops propagation and programmatically focuses the menu container withpreventScroll=true, so the first row's gear icon does not receive initial focus. Click handling and tab navigation from a highlighted row are unchanged.Macroscope summarized 58cd938.