Repository navigation
fix(site/src/components): show the dropdown highlight ring only for keyboard navigation - #30682
Merged
Merged
Conversation
…eyboard navigation cmdk highlights a row on both arrow keys and pointer hover without recording which caused it. Track the last input source on the cmdk root and apply the content-link ring only when the keyboard moved the highlight.
…outside the cmdk root The Agents slash menu takes its arrow keys from the composer editor, so the root never saw them and the ring stayed hidden after a hover. Track key presses on the document while a menu is mounted.
chrifro
marked this pull request as ready for review
October 13, 2026 11:43
tracyjohnsonux
added a commit
that referenced
this pull request
Nov 6, 2026
… options and space flyouts 4px from the menu (#31814) Fixes DES-22264 Two fixes for the filter menu on `/workspaces`: - **Muted option text.** Options without an icon ("Workspace is..." Outdated, Dormant) always rendered in `content-primary`. They now use `content-secondary` until hovered, highlighted, or selected, like the status options. - **4px flyout gap.** Owner/Template/Organization flyouts now sit 4px from the main menu (`sideOffset={4}`). The gap made the flyout close while the pointer crossed it, because the wrapper's `onMouseLeave` fired. Invisible 4px strips on both sides of the wrapper bridge the gap, so the flyout stays open whether it opens right or left. The hover focus ring is out of scope; #30682 handles it. > Generated by Coder Agents on behalf of @tracyjohnsonux.
aqandrew
requested changes
Nov 10, 2026
…mpose Command event handlers
…d-only-ring # Conflicts: # site/src/components/Command/Command.tsx
jakehwll
approved these changes
Nov 12, 2026
aqandrew
approved these changes
Nov 12, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR was generated by Coder Agents on behalf of @chrifro.
Follow-up to #30472. The blue ring on highlighted dropdown options also showed on mouse hover, which made the menus feel heavy without helping pointer users. It now shows only when the keyboard moved the highlight.
cmdk uses one highlight (
data-selected) for both arrow keys and hover and doesn't record which one moved it. A smalluseHighlightSourcehook on the cmdk root tracks this: a documentkeydownsetsdata-highlight-source="keyboard",pointermoveon the root sets"pointer", and focus starts from the last input on the page, so a menu reached with Tab shows the ring right away. Keys are tracked on the document because the Agents slash menu gets its arrow keys from the composer editor, outside the cmdk root. Items apply the ring only underin-data-[highlight-source=keyboard]. It's wired into the sharedCommand/CommandItem(which covers the Agents slash menu andMultiSelectCombobox) andFilterComboboxRoot/FilterComboboxItem. The hover background and thefocus-visiblerings on chip and flyout buttons are unchanged.WCAG 2.2 still passes: 2.4.7 Focus Visible and 1.4.11 Non-text Contrast apply to the keyboard indicator, which is unchanged (7.0:1 dark, 4.7:1 light). Neither criterion requires a pointer hover indicator.
/workspacesfilter menu:Agents composer slash menu (
/agents, type/):Verification
/workspaces: hovering a row leavesbox-shadow: none; ArrowDown adds the 2px insetcontent-linkring; hovering again removes it./agentsslash menu: the ring shows after typing/and on ArrowDown, hides on hover, and returns on the next ArrowDown from the composer.Command.test.tsxcovers keyboard/pointer switching, keys pressed outside the root, and the initial state on focus.make pre-commitpasses.