Skip to content

feat: Add search to model picker - #450

Merged
SawyerHood merged 3 commits into
get-bb:mainfrom
barelyhuman:feat/model-picker-search
Jul 6, 2026
Merged

SawyerHood merged 3 commits into
get-bb:mainfrom
barelyhuman:feat/model-picker-search

Conversation

@barelyhuman

@barelyhuman barelyhuman commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

Fixes: #496

Screen.Recording.2026-07-01.at.9.55.35.AM.mov

@SawyerHood

Copy link
Copy Markdown
Collaborator

Hey @barelyhuman this is a draft were you intending to actually have this reviewed or was this a mistake. In the future I would love if you could follow the CONTRIBUTING.md and open an issue for new features.

@barelyhuman

Copy link
Copy Markdown
Contributor Author

i plan to polish it, the keyboard focus needs some work, will remove the draft status post that

@barelyhuman

Copy link
Copy Markdown
Contributor Author

Hey @barelyhuman this is a draft were you intending to actually have this reviewed or was this a mistake. In the future I would love if you could follow the CONTRIBUTING.md and open an issue for new features.

Understood

@barelyhuman
barelyhuman force-pushed the feat/model-picker-search branch from b5dbf23 to cfb24dc Compare July 5, 2026 08:49
@barelyhuman
barelyhuman marked this pull request as ready for review July 5, 2026 08:49
SawyerHood and others added 2 commits July 6, 2026 06:12
Address review feedback on the model-picker search:

- Flatten "More models" into the search results so every match is
  keyboard-reachable on desktop (previously a dead-end: the search
  Enter opened the hover submenu, which immediately re-closed).
- Drive arrow/Enter/active-highlight from a single buildModelNavRows()
  model instead of hand-computed indices; derive+clamp the active
  index so opening or narrowing the list never auto-selects a row.
- Add combobox/listbox ARIA (role, aria-controls, aria-activedescendant,
  aria-selected) and unique per-instance option ids via useId so
  multiple pickers never collide.
- Match search against the rendered (brand-stripped) label plus the
  model id, so results reflect what the user sees.
- Only show the search box for longer model lists; tighten the search
  padding and align the search icon with the Fast mode icon.
- Remove unrelated formatting churn and the setState-in-effect passes.
- Add tests for buildModelNavRows/buildFuzzyRegex and the search +
  keyboard-selection flow (incl. reaching selected-only models).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@SawyerHood

Copy link
Copy Markdown
Collaborator

I went ahead and made some adjustments:

  • only show search if we have one of the providers with lots of options under more
  • made it so it flattens the more models options.
  • cleaned up the spacing a bit.

@SawyerHood
SawyerHood merged commit 6119ccc into get-bb:main Jul 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: a search in the model picker

2 participants