🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

feat(site): add searchable agent model picker - #26927

Merged
DanielleMaywood merged 5 commits into
mainfrom
feat/model-picker-combobox
Jul 1, 2026
Merged

feat(site): add searchable agent model picker#26927
DanielleMaywood merged 5 commits into
mainfrom
feat/model-picker-combobox

Conversation

@DanielleMaywood

@DanielleMaywood DanielleMaywood commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Updates the AgentsPage model picker to use the searchable popover command pattern from AI Settings while preserving the existing ModelSelector API.

The picker now groups results by provider, filters by provider, model name, model ID, and context size, and uses compact AgentsPage-specific typography and spacing for the chat composer.

image

@DanielleMaywood

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review

coder-agents-review Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Chat: Review posted | View chat
Requested: 2026-07-01 20:05 UTC by @DanielleMaywood
Spend: $31.26 / $100.00

Review history
  • R1 (2026-07-01): 13 reviewers, 2 Nit, 4 Note, 3 P3, COMMENT. Review
  • R2 (2026-07-01): 6 reviewers, 3 Nit, 4 Note, 3 P3, COMMENT. Review

deep-review v0.9.0 | Round 2 | 88329db..0435afb

Last posted: Round 2, 10 findings (3 P3, 3 Nit, 4 Note), COMMENT. Review

Finding inventory

Findings

# Sev Status Location Summary Round Reviewer Posted
CRF-1 Note Author fixed (0435afb) ModelSelector.tsx:220 keywords prop is inert when shouldFilter={false} R1 Netero, Meruem Yes
CRF-2 P3 Author fixed (0435afb) ModelSelector.test.tsx:53 Search test only exercises displayName; four other dimensions untested R1 Bisky Yes
CRF-3 Nit Author fixed (0435afb) ModelSelector.test.tsx:41 Interaction test belongs in a Storybook story per project convention R1 Mafu-san, Meruem Yes
CRF-4 P3 Author contested; panel closed R2 (3/3 accept) ModelSelector.tsx:1 Hand-assembles Popover+Command pattern that Combobox.tsx already wraps R1 Robin Yes
CRF-5 Nit Author contested; panel closed R2 (3/3 accept) ModelSelector.tsx:159 Search placeholder says "Search..." without specifying scope R1 Leorio Yes
CRF-6 P3 Author fixed (0435afb) ModelSelector.tsx:217 role="option" and aria-selected silently overwritten by cmdk R1 Meruem Yes
CRF-7 Note Author contested; panel closed R2 (3/3 accept) ModelSelector.tsx:50 Context limit display lost its "context window" label R1 Leorio Yes
CRF-8 Note Author fixed (0435afb) ModelSelector.tsx:88 Search state clears on close but no test verifies the reset R1 Bisky Yes
CRF-9 Note Author accepted R2 (K-range display intentionally differs from analytics formatting) ModelSelector.tsx:49 formatContextLimit M-range near-identical to formatTokenCount in analytics.ts R1 Robin Yes
CRF-10 Nit Open ContextUsageIndicator.tsx:589 Comment references ModelSelector tooltip pattern which this PR removed R2 Netero Yes

Contested and acknowledged

CRF-4 (P3, ModelSelector.tsx:1) - Hand-assembles Popover+Command pattern that Combobox.tsx wraps

  • Finding: Reviewer proposed using the shared Combobox component instead of assembling raw primitives in parallel.
  • Author defense: Shared Combobox lacks grouped provider headings and required single-select behavior. Extending it would change the API for 10+ existing consumers. The PR matches the AI Settings Command pattern. Author says extending Combobox is "worth a follow-up" but filed no ticket.
  • Panel closure (R2, 3/3): Mafuuu verified the structural gaps (no CommandGroup, toggle behavior). Pariston found three other components in the codebase already hand-assemble Popover+Command for the same reasons. Meruem confirmed the defense is valid for this PR's scope. All three recommend closing. Design debt is real but bounded; consolidation is a human prioritization call.

CRF-5 (Nit, ModelSelector.tsx:159) - Search placeholder "Search..."

  • Finding: Proposed "Search models..." instead of generic "Search...".
  • Author defense: Figma design uses generic placeholder. aria-label="Search models" already provides the accessible name.
  • Panel closure (R2, 3/3): Mafuuu noted surrounding context (model names, provider headings) clarifies scope. Pariston verified AI Settings uses the identical pattern. Meruem confirmed no new evidence.

CRF-7 (Note, ModelSelector.tsx:50) - Context limit label

  • Finding: formatContextLimit dropped "context window" suffix. Bare "128K" may be unclear.
  • Author defense: Figma calls for short inline token count. "context window" text would add visual weight the design avoids.
  • Panel closure (R2, 3/3): Mafuuu noted format is self-explanatory in context. Pariston confirmed Figma authority. Meruem confirmed placement provides sufficient context.

CRF-9 (Note, ModelSelector.tsx:49) - formatContextLimit duplication

  • Finding: M-range logic near-identical to formatTokenCount in analytics.ts.
  • Author defense: K-range display intentionally differs from analytics formatting. Duplication is local and accepted.
  • Status: Author accepted R2.

Round log

Round 1

Panel. 3 P3, 2 Nit, 4 Note. 13 reviewers (Bisky, Hisoka, Mafu-san, Mafuuu, Pariston, Ging-TS, Ging-React, Nami, Robin, Gon, Leorio, Komugi, Meruem). Reviewed against 88329db..bbd4f8c.

Round 2

Panel. 5 fixed (verified), 3 contested (panel closed 3/3), 1 acknowledged. 1 new Nit. 6 reviewers (Bisky, Hisoka, Mafu-san, Mafuuu, Pariston, Meruem). Reviewed against 88329db..0435afb.

About deep-review

CRF = Coder Review Finding (P0-P4, Nit, Note)

Reviewer Focus
Bisky tests
Chopper ops/errors
Churn-guard change verification
Ging language modernization
Gon naming
Hisoka edge cases
Killua perf
Kite change integrity
Knov contracts
Knuckle SQL
Komugi flake/determinism
Kurapika security
Law decomposition
Leorio docs
Luffy product
Mafu-san process
Mafuuu contracts
Melody dispatch/pairing
Meruem structural
Nami frontend
Netero mechanical checks
Pariston premise testing
Pen-botter product gaps
Razor verification
Robin duplication
Ryosuke Go arch
Takumi concurrency
Zoro shape

🤖 Managed by Coder Agents.

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean pattern adoption. The migration from Radix Select to Popover+Command is well-scoped, proportional, and follows the established codebase pattern from AI Settings. The API surface is preserved, existing Storybook stories remain compatible (ARIA roles match), and the new search behavior works correctly. Hisoka traced the controlled/uncontrolled state, CSS specificity, re-selection behavior, and mobile keyboard implications without finding issues.

Severity count: 3 P3, 2 Nit, 4 Note.

Pariston on the approach: "I tried to build a case for [alternative framings] and could not."

Commit bodies are empty for a 172-line component swap. The subject is good, but git blame readers won't know why Select was replaced or that this adopts the AI Settings Command pattern.

🤖 This review was automatically generated with Coder Agents.

Comment thread site/src/pages/AgentsPage/components/ChatElements/ModelSelector.test.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/ChatElements/ModelSelector.test.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/ChatElements/ModelSelector.tsx
Comment thread site/src/pages/AgentsPage/components/ChatElements/ModelSelector.tsx
Comment thread site/src/pages/AgentsPage/components/ChatElements/ModelSelector.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/ChatElements/ModelSelector.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/ChatElements/ModelSelector.tsx
Comment thread site/src/pages/AgentsPage/components/ChatElements/ModelSelector.tsx
Comment thread site/src/pages/AgentsPage/components/ChatElements/ModelSelector.tsx

Copy link
Copy Markdown
Contributor Author

🤖 This comment was written by Coder Agent on behalf of Danielle Maywood 🤖

I am not going to rewrite the pushed draft-PR history just to add bodies to existing commits. The PR body already captures the rationale for replacing Select with the AI Settings Command pattern; if you want a history rewrite before merge, I can do that separately with explicit force-push approval.

@DanielleMaywood

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R1 fixes all verified correct. Panel unanimously closes all three contested findings (CRF-4, CRF-5, CRF-7).

CRF-4 (Combobox reuse): Pariston found three other components in the codebase already hand-assemble Popover+Command for the same reason (grouped headings, non-toggle select). Mafuuu and Meruem confirmed the structural gaps in Combobox are real. The Combobox consolidation is future work, not a defect in this PR. This needs a human decision: file a ticket for the consolidation or accept the parallel implementations.

CRF-5 (placeholder) and CRF-7 (context limit label): Figma design is the authority on visual copy. The accessible name and contextual placement are adequate.

One new Nit from Netero on a stale comment in a non-diff file.

Mafu-san: "Contested defenses cite concrete, verifiable sources: Figma spec, existing AI Settings Command pattern, 10+ Combobox consumers. Each defense engages with the substance of the finding rather than dismissing it."


site/src/pages/AgentsPage/components/ContextUsageIndicator.tsx:589

Nit [CRF-10] Comment references ModelSelector's tooltip pattern, which this PR removed.

// nested tooltips to the right (same pattern as ModelSelector).

ModelSelector no longer uses tooltips; it was rewritten to use a Popover+Command combobox. The parenthetical "(same pattern as ModelSelector)" is now factually incorrect. Remove the parenthetical or update the reference.

(Netero)

🤖

🤖 This review was automatically generated with Coder Agents.

Copy link
Copy Markdown
Contributor Author

🤖 This comment was written by Coder Agent on behalf of Danielle Maywood 🤖

For this PR, I am accepting the parallel implementation. Combobox consolidation is broader than this Figma-driven picker change because the shared component does not currently support grouped headings plus required non-toggle selection. If we want to consolidate the existing Popover+Command variants, that should be scoped as a separate follow-up.

Copy link
Copy Markdown
Contributor Author

🤖 This comment was written by Coder Agent on behalf of Danielle Maywood 🤖

Good catch. I removed the stale ModelSelector reference from the ContextUsageIndicator comment. Fixed in ad58142c3b27. Fixed in ad58142c3b27.

@DanielleMaywood
DanielleMaywood marked this pull request as ready for review July 1, 2026 20:56
@DanielleMaywood
DanielleMaywood enabled auto-merge (squash) July 1, 2026 21:13
@DanielleMaywood
DanielleMaywood merged commit 0c006a4 into main Jul 1, 2026
26 of 27 checks passed
@DanielleMaywood
DanielleMaywood deleted the feat/model-picker-combobox branch July 1, 2026 21:15
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants