feat(compactSelect): Use fzf for default search matching#109252
feat(compactSelect): Use fzf for default search matching#109252
Conversation
Replace the case-insensitive substring filter with the fzf v1 algorithm (already used by ProjectPageFilter) as the default search matcher when `search` is enabled. Results are now sorted by relevance score rather than maintaining their original order. Co-Authored-By: Claude <noreply@anthropic.com>
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.
| if (result.end === -1) { | ||
| return {score: 0}; | ||
| } | ||
| return {score: Math.max(1, result.score)}; |
There was a problem hiding this comment.
HybridFilter shift+click uses wrong filter logic
Medium Severity
shiftToggleRange in HybridFilter filters options with includes() to determine which options are "visible" for range selection, but CompactSelect now uses fzf by default. After a fuzzy search (e.g. "ption On" for "Option One"), the displayed options and the options used for shift+click range selection differ, so range selection can fall back to single toggle or use the wrong set of options.
There was a problem hiding this comment.
I'll investigate this, but this must have existed before already given that we used fzf already


Make fuzzy search the default mode for CompactSelect search