feat(code): add useComboboxFilter hook to improve branch and repo picker performance#1588
Merged
VojtechBartos merged 4 commits intomainfrom Apr 9, 2026
Merged
feat(code): add useComboboxFilter hook to improve branch and repo picker performance#1588VojtechBartos merged 4 commits intomainfrom
VojtechBartos merged 4 commits intomainfrom
Conversation
adboio
reviewed
Apr 9, 2026
Comment on lines
+28
to
+30
| * `shouldFilter={false}` to `Combobox.Content` and wire `onSearchChange` | ||
| * to `Combobox.Input`'s `onValueChange`. Do not pass a controlled `value` | ||
| * to the input -- let cmdk manage the input display natively. |
Contributor
There was a problem hiding this comment.
can we build this as a wrapper on ComboBox.Content so future devs don't have to remember (or be aware of) these requirements?
Member
Author
There was a problem hiding this comment.
yeah, sure :) you would like to see it as part of the ComboBox.Content or just new component like ComboBox.FilteredContent?
Contributor
There was a problem hiding this comment.
thank you!!
i think either way is fine by me :) just something to make it a little smoother and less likely that someone forgets to do this, since it seems to be a nice perf improvement all around
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.
Problem
The branch selector combobox was slow to open on repos with many branches. cmdk renders every item as a DOM node (no virtualization), and each
ComboboxItemcarries significant per-instance overhead (Tooltip, refs, effects). With hundreds of branches, opening the picker caused a noticeable lag.Solution
Instead of rendering all items and letting cmdk filter via
display: none, we:shouldFilter={false})onValueChangeand debounce themdefaultFilter(fuzzy matching), filter out noise below a 0.1 threshold, and cap rendered results at 50Applying it to branch combobox and also to github repo combobox
Showcase
code-filtering.mov