Skip to content

refactor: improve model selector search#35875

Merged
lyzno1 merged 4 commits into
mainfrom
codex/35867-model-selector-search
May 7, 2026
Merged

refactor: improve model selector search#35875
lyzno1 merged 4 commits into
mainfrom
codex/35867-model-selector-search

Conversation

@lyzno1
Copy link
Copy Markdown
Member

@lyzno1 lyzno1 commented May 7, 2026

Summary

  • refactor ModelSelector around controlled combobox state so only real provider/model options participate in the selection collection
  • keep marketplace, empty state, compatibility notice, and settings footer outside listbox option semantics
  • add Fuse-backed provider search and normalized model search for precise model ID matching
  • add regression coverage for provider fuzzy matching, namespaced provider keys, and model ID queries such as gpt5.4

Commits

  • 87a01a0 refactor: model selector
  • 8896c35 feat: improve model selector search

Part of #35867

Tests

  • pnpm --dir web test app/components/header/account-setting/model-provider-page/model-selector/tests/popup.spec.tsx
  • pnpm --dir web type-check
  • pnpm exec eslint web/app/components/header/account-setting/model-provider-page/model-selector/index.tsx web/app/components/header/account-setting/model-provider-page/model-selector/popup.tsx web/app/components/header/account-setting/model-provider-page/model-selector/popup-item.tsx web/app/components/header/account-setting/model-provider-page/model-selector/model-search.ts web/app/components/header/account-setting/model-provider-page/model-selector/tests/popup.spec.tsx

@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. javascript Pull requests that update javascript code refactor labels May 7, 2026
@github-actions github-actions Bot added the web This relates to changes on the web. label May 7, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

❌ Patch coverage is 94.93671% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.82%. Comparing base (1e2d309) to head (7ea4d6c).

Files with missing lines Patch % Lines
...tting/model-provider-page/model-selector/index.tsx 81.25% 6 Missing ⚠️
...model-provider-page/model-selector/model-search.ts 97.14% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #35875      +/-   ##
==========================================
- Coverage   85.82%   85.82%   -0.01%     
==========================================
  Files        4460     4462       +2     
  Lines      209092   209147      +55     
  Branches    39112    39126      +14     
==========================================
+ Hits       179461   179508      +47     
- Misses      26455    26463       +8     
  Partials     3176     3176              
Flag Coverage Δ
dify-ui 93.93% <ø> (ø)
web 86.77% <94.93%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lyzno1 lyzno1 requested a review from zxhlyh as a code owner May 7, 2026 06:48
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 7, 2026
@lyzno1 lyzno1 added this pull request to the merge queue May 7, 2026
Merged via the queue into main with commit bb3de5d May 7, 2026
35 checks passed
@lyzno1 lyzno1 deleted the codex/35867-model-selector-search branch May 7, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update javascript code lgtm This PR has been approved by a maintainer refactor size:XL This PR changes 500-999 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants