feat: add search filter to Introduction page#787
Conversation
Allows filtering components by name on the homepage. Uses Input with search icon prefix, grid-aligned to span 2 card columns. Shows Empty component when no results match. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR SummaryLow Risk Overview Refactors category computation into memoized Updates Reviewed by Cursor Bugbot for commit c6b903c. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Reminds contributors to always update documentation when adding icons, components, or promoting component status. Co-Authored-By: Claude Opus 4.6 (1M context) <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, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c6b903c. Configure here.
|
|
||
| const categories = useMemo(() => { | ||
| if (!searchQuery.trim()) return allCategories | ||
| const query = searchQuery.toLowerCase() |
There was a problem hiding this comment.
Search query not trimmed before filtering components
Low Severity
The empty-guard on line 214 uses searchQuery.trim() to decide whether to filter, but the actual filtering query on line 215 uses searchQuery.toLowerCase() without trimming. A search like " radio " (with accidental leading/trailing whitespace) passes the guard but fails to match any component name because the spaces are included in the .includes() check. The query variable needs to also be trimmed.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c6b903c. Configure here.


Summary
Emptycomponent when no results matchTest plan
🤖 Generated with Claude Code