Add keyboard access to sidebar action menus - WIP#1558
Add keyboard access to sidebar action menus - WIP#1558shivamhwp wants to merge 1 commit intopingdotgg:mainfrom
Conversation
- Support context-menu key and Shift+F10 on threads and projects - Expose thread and project action menus in the sidebar UI - Factor shared sidebar action handlers into reusable helpers
|
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 Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| Remove project | ||
| </MenuItem> | ||
| </MenuPopup> | ||
| </Menu> |
There was a problem hiding this comment.
Project action trigger uses wrong data attribute for visibility
Medium Severity
The project action menu trigger uses SidebarMenuAction with showOnHover, which applies md:opacity-0 and relies on data-[state=open]:opacity-100 to stay visible while the menu is open. However, Base UI's MenuTrigger sets data-popup-open (not data-state=open) when the popup is open. Since the menu popup renders in a portal (removing group-focus-within/menu-item too), the trigger button disappears on desktop when the menu opens. The thread action button avoids this by using data-[popup-open]:opacity-100 directly in its className.
There was a problem hiding this comment.
@shivamhwp these keyboard shortcuts are built into Windows. I just tried Shift+F10 in Windoes Parallels and it worked perfectly. I'm not sure what the consequences are of adding this on top. The issue author may have some other issue on their end if Shift+F10.
|
@nmggithub one issue that i found is that user is unable to load context menu using tab. which i am seeing in mac. so that fix. in case there is some other issue i'll close the pr. wdyt ? |
Not sure what you're saying here. |




fixed #1399
What Changed
This fixes the sidebar context-menu accessibility bug for projects and threads.
Shift+F10and theContextMenukey on focused sidebar rows to open the same action menu.Why
Sidebar-only actions like rename, remove project, copy path, and delete were effectively inaccessible to users who cannot use a mouse.
The old behavior depended on native context-menu gestures, which are not a sufficient accessible entry point for keyboard-only users or screen reader users. This change fixes that by giving each sidebar item a proper focusable actions control and by supporting the standard keyboard context-menu shortcuts on the focused row.
This keeps the fix small and focused while solving the actual accessibility issue instead of only patching one interaction path.
UI Changes
Checklist
Note
Medium Risk
Moderate UI/interaction change in the sidebar that alters how thread/project actions (including delete/remove) are triggered, which could introduce regressions in selection state or action routing.
Overview
Adds keyboard-accessible action menus to sidebar thread rows and project headers via new ellipsis
Menutriggers, making rename/copy/delete/remove actions reachable without right-click and providing screen-readeraria-labels.Implements support for the
ContextMenukey andShift+F10to open the appropriate action menu on focused rows using sharedisKeyboardContextMenuKey, and refactors existing context-menu handlers into reusable helpers for single vs multi-select thread actions and project actions.Includes new unit coverage for
isKeyboardContextMenuKeyinSidebar.logic.test.ts.Written by Cursor Bugbot for commit 9e9578e. This will update automatically on new commits. Configure here.
Note
Add keyboard access to sidebar action menus via Context Menu key and Shift+F10
EllipsisIcon) action menu buttons to thread rows and project headers in Sidebar.tsx, exposing actions (rename, mark unread, copy path, delete, etc.) previously only available via native context menus.isKeyboardContextMenuKeyutil in Sidebar.logic.ts.Macroscope summarized 9e9578e.