fix(site): allow search by label in MultiSelectComboBox#24421
Merged
Conversation
cmdk's default filter was matching search input against the CommandItem
value prop (a UUID), not the visible label text. Users type display names
but the filter searched UUIDs, so nothing ever matched.
Add keywords={[option.label]} to CommandItem so cmdk's built-in filter
also matches against the human-readable label. This fixes the allowed
templates search and also benefits IdpGroupSync, IdpOrgSync, and
IdpRoleSync pages that had the same latent bug.
DanielleMaywood
approved these changes
Apr 16, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes cmdk filtering in MultiSelectCombobox so type-to-search matches the user-visible label (e.g., “Docker Development”) instead of only the underlying value (UUID/ID), and adds Storybook play assertions to prevent regressions.
Changes:
- Add
keywords={[option.label]}to eachCommandIteminMultiSelectComboboxso cmdk’s default filter searches the display label. - Extend the
OpenComboboxStorybook play test with type-to-filter assertions. - Add a “search filters by display name” step to the
TemplateAllowliststory.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| site/src/components/MultiSelectCombobox/MultiSelectCombobox.tsx | Adds cmdk keywords to ensure filtering matches display labels. |
| site/src/components/MultiSelectCombobox/MultiSelectCombobox.stories.tsx | Adds play-test assertions for filtering by display name. |
| site/src/pages/AgentsPage/AgentSettingsTemplatesPageView.stories.tsx | Adds story step covering template search/filter behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Fixes https://linear.app/codercom/issue/CODAGT-103
keywords={[option.label]}toCommandIteminMultiSelectComboboxso cmdk's default filter matches against the visible label text, not just the value (UUID)OpenComboboxstory with type-to-filter assertionsTemplateAllowliststoryRoot cause & decision log
cmdk's default filter matchesCommandItem'svalueprop.MultiSelectComboboxwas passingoption.value(a UUID/ID) asvaluewhile renderingoption.label(the display name) as children. Users type display names but the filter searched UUIDs — nothing ever matched.cmdksupports akeywordsprop onCommandItemthat the built-in filter also searches. Addingkeywords={[option.label]}is the minimal fix: it doesn't change thevalueidentity semantics (used byonSelect), requires zero consumer changes, and fixes the same latent bug inIdpGroupSyncForm,IdpOrgSyncPageView, andIdpRoleSyncForm.