fix(ui): normalize model picker fuzzy search#16708
Conversation
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Refs #16710
Type of change
What does this PR do?
Model picker search in desktop/app was inconsistent when queries used punctuation or separators (for example
gpt_5,3).This PR adds normalized fuzzy-search helpers in
packages/ui/src/hooks/filter-search.ts, adds tests inpackages/ui/src/hooks/filter-search.test.ts, and updatesuseFilteredListto use normalized matching so desktop/app model picker flows behave consistently and prefer normalized prefix matches.TUI changes are intentionally deferred for a follow-up proposal to keep this PR desktop/app scoped.
How did you verify your code works?
bun test ./src/hooks/filter-search.test.ts(frompackages/ui)bun run typecheck(frompackages/ui)Screenshots / recordings
N/A (search behavior/ranking change only)
Checklist