Skip to content

feat(ui): searchable model picker with provider group headers (PR #659 by @mmartial) - #675

Merged
nesquena-hermes merged 1 commit into
masterfrom
pr659-review
Apr 18, 2026
Merged

nesquena-hermes merged 1 commit into
masterfrom
pr659-review

Conversation

@nesquena-hermes

Copy link
Copy Markdown
Collaborator

Searchable model picker (rebase-on-behalf of PR #659 by @mmartial)

This is a clean rebase of @mmartial's #659 onto current master, plus two correctness fixes that were found and addressed during review.

What this adds

  • Live search input at the top of the model dropdown — type any part of a model name or ID to filter the list instantly
  • Provider group headers preserved in filtered results (Anthropic, GitHub Copilot, OpenAI Codex, OpenRouter headers remain visible while filtering)
  • Clear button (✕) resets search and restores full list
  • Escape key closes the dropdown (tested and confirmed by @mmartial)
  • "No models found" empty state shown when nothing matches
  • i18n — EN, ES, and zh-CN strings for the two new keys

Fixes applied during review

  1. zh-CN double-escape bug (commit baab684 on the original PR, reviewed by @nesquena): four zh-CN strings in i18n.js were double-escaped (\\u81ea instead of \u81ea), causing raw \u... text to render in the Chinese UI. Fixed.

  2. Provider group headers regression (identified during integration QA): the initial implementation flattened all models into a _modelData array without storing the group label, so _filterModels() rendered a flat unlabeled list. Fixed by storing group on each entry and emitting .model-group headings in _filterModels() when the group changes.

  3. CSS theme compatibility: the original PR used rgba(124,185,255,.5) for focus border color. Current master uses var(--accent) throughout (from the theme system in PR Replace color scheme system with light/dark theme + accent skins #627). Updated to match.

Test results

  • 1423 tests pass, 0 failures
  • node --check passes for static/ui.js and static/i18n.js
  • Browser QA: search filters correctly, group headers visible, clear button works, Escape closes, no-results state shown

Closes #659
Co-authored-by: mmartial mmartial@users.noreply.github.com

… by @mmartial

- Search input at top of model dropdown filters by model name or ID
- Provider group headers (Anthropic, OpenAI Codex, OpenRouter, etc.) preserved in filtered view
- Clear button resets search; Escape closes dropdown
- 'No models found' empty state when nothing matches
- i18n: EN, ES, zh-CN strings for search placeholder and no-results
- CSS uses var(--accent) consistent with current theme system

Also fixes zh-CN double-escaped unicode strings (baab684), and restores
provider group headers that were dropped in initial implementation (633e3db).

Rebased cleanly onto master; 1423 tests pass.
@nesquena-hermes
nesquena-hermes merged commit 5266ee2 into master Apr 18, 2026
3 checks passed
@nesquena-hermes
nesquena-hermes deleted the pr659-review branch April 18, 2026 16:28
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.

1 participant