Repository navigation
💍 fix: Unclip and Recolor the Keyboard Highlight Ring in Select Popovers - #195
Merged
Merged
Conversation
The keyboard-highlighted option in a click-ui Select popover showed its ring on three sides only. The popover is as wide as the trigger and clips its content (overflow: hidden) inside 1px borders, but the option list is also as wide as the trigger, so options overhang the clip box by 2px on the right. click-ui draws a 2px ring at a -2px offset, in the option's outer 2px, so the right side fell entirely in the overhang. The ring also used click-ui's accent, near-black in the light theme, instead of the app's focus color. A scoped rule in styles.css, next to the other focus-ring overrides, draws the ring of a keyboard-highlighted option in --focus-ring-color, 4px inside the option. data-input-modality is only set on click-ui menu panels, so the rule reaches click-ui Select, Dropdown and ContextMenu options only, and only while the keyboard drives them. Dropdown menus (the sidebar user menu, the row action menus) already showed a whole ring; they now draw the same ring as the Selects. e2e/a11y/menus.spec.ts (live backend) measures the highlighted option's ring in two Selects and the user menu, in light and dark mode: solid, in the focus color, and inside every clipping ancestor up to the menu. Supersedes #125 by @dustinhealy, whose root-cause analysis and inset ring this reuses.
Contributor
Author
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
7 tasks done
This was referenced Oct 28, 2026
⬆️ chore: Upgrade Click UI, i18next, TypeScript, Vitest and the Dev Tooling to Their New Majors
#194
Merged
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull Request Template
Summary
In every click-ui Select popover, the keyboard-highlighted option's ring is missing its right side. In the light theme it is also drawn in click-ui's near-black accent instead of the app's focus color. This PR supersedes #125 by @dustinhealy and redoes it on current
main. It reuses #125's root-cause measurement and its fix, a scoped override that insets the ring by 4px, along with its later recolor commit.Root cause (from #125). click-ui's Select popover content is
overflow: hiddenwith 1px borders and is as wide as the trigger (--radix-popover-trigger-width). Its option list inherits that same width, so the options overhang the popover's clip box by 2px on the right. click-ui's keyboard rule draws a 2px ring at a -2px offset ([data-input-modality='keyboard'] .generic-menu-item[data-highlighted]), in the option's outer 2px, so the whole right side falls in the clipped overhang. Onmainat 1280px, with Grants > Audit log > Target type open: the popover spans x 674–961, its clip box 675–960, and the highlighted option 675–962, so the ring's right side (960–962) is clipped away.Color. Options aren't buttons, so the app's global
:focus-visiblering never reaches them. click-ui paints the ring with--click-global-color-accent-default, which is rgb(21, 21, 21) in the light theme, while the app's focus rings use--focus-ring-color(rgb(67, 126, 239)). In dark mode the app already maps click-ui's accent to its dark blue (#6f9cf5), the same as the dark focus color, so only the light theme was wrong.Fix. One rule in
src/styles.css, next to the other scoped focus-ring overrides:data-input-modalityis only set on click-ui's menu panels (Select popover, Dropdown, ContextMenu). So the rule only reaches their options, and only while the keyboard drives them. Hovering with the mouse still shows no ring.!importantbecause click-ui's own rule is more specific.Not carried over from #125
.claude/**exclude, inlining click-ui).mainhas both since ⬆️ chore: Bump click-ui to 0.9.1 #119.--cui-color-outlineas the ring color. This uses--focus-ring-color, the token the app's other focus rings read. It resolves to--cui-color-outline, so the color is the same.mainnow. The click-ui Selects left are the audit log's Target type filter, the configuration Jump to list, the "Add field" picker inrenderer/InlineFieldand the Langfuse destination insections/LangfuseRenderer.Change Type
Testing
e2e/a11y/menus.spec.tsis new. Like the rest ofe2e/a11y, it needs a live backend (E2E_LIVE=1,E2E_BASE_URL). It covers the audit log's Target type Select, the configuration Jump to list (at 1024px, where it shows) and the sidebar user menu (a click-ui Dropdown), each in light and dark mode. Each test opens the menu with Enter, presses ArrowDown and waits until the second option is highlighted. It then reads that option's computed outline in Chromium and checks three things: the ring is solid, its color equals the resolved--focus-ring-color, and no side of it lies outside the padding box of any clipping ancestor up to the menu panel. jsdom does no layout, so a unit test can't see this.mainoutline-coloroutline-offsetThe dark user-menu test also passes on
main, where that ring was already whole and blue. It guards that the inset keeps Dropdown rings whole.Without
E2E_LIVEthe spec is skipped. Since #185 the mock backend doesn't answer the capabilities request, so the panel stops at "Could not verify permissions" there and even the user-menu test can't run.Live check with a production build against a LibreChat backend:
The Langfuse destination Select and the "Add field" picker didn't show up on the test stack: its Features tab has no Langfuse section, and no "Add field" picker appeared on any configuration tab or in the custom endpoint editor. Both render the same click-ui Select popover, so the same rule applies to them.
Test Configuration:
dev, MongoDB replica set.bun run build+bun server.ts), Chromium via Playwright 1.61.npx tsc --noEmit,npx eslint src/ e2e/ --max-warnings 0,npx prettier --checkon the changed files,bun run test:lint-rules,npx vitest run(3338 tests),bun run build, andE2E_LIVE=1 npx playwright test e2e/a11y/menus.spec.tsagainst the live stack.Follow-up
width: inherit(the trigger width) inside a popover with borders andoverflow: hidden. This override keeps the ring whole either way.Checklist