feat(site): add provider icon to chat model selector - #28330
Conversation
Show the AI provider icon to the left of the selected model name in the Coder Agents chat composer, matching the workspace pill. Reuses the existing ProviderIcon mapping (configured icon URL wins, then the provider glyph, then a generic building icon). The img overrides undo Button's default-size rules so the icon renders at 12px like the workspace pill's icon.
41181b7 to
6e8573f
Compare
…ills The model selector trigger used px-1 + gap-1.5 while the workspace and MCP pills use px-2 + gap-1, making the provider icon's insets uneven with its neighbors. Match them.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: afffed7790
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Replace DOM selectors with semantic story queries
The three new play functions locate icons with querySelector/querySelectorAll, so the coverage is coupled to the trigger's internal tags and can break when the icon or chevron implementation changes without any user-visible regression. Query by a semantic role/name where possible, or add an explicit test ID for the otherwise presentational icon.
AGENTS.md reference: site/AGENTS.md:L26-L27
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in d66dd07. The presentational provider icon now carries a data-testid="model-selector-trigger-icon" and the stories query by testid instead of tag selectors, per FE10. The custom-icon story still asserts the rendered src via a querySelector scoped within that testid element, since the icon URL is the behavior under test.
Generated by Coder Agents on behalf of @DanielleMaywood
There was a problem hiding this comment.
Remove comments that repeat the story assertions
The comments introducing the custom-icon and placeholder stories, including the inline note about the chevron SVG, restate the story names or immediately following assertions rather than documenting non-obvious behavior. Remove these comments so they cannot drift from the executable story coverage.
AGENTS.md reference: site/AGENTS.md:L15-L15
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in d66dd07. Removed the comments that restated the story names and assertions, per FE4.
Generated by Coder Agents on behalf of @DanielleMaywood
…omments Address Codex review: query the presentational provider icon by a data-testid (the FE10-sanctioned hook for non-semantic elements) instead of tag selectors, and remove comments that restate the story assertions (FE4).

Adds the AI provider icon to the left of the selected model name in the Coder Agents chat composer, matching the workspace pill. The icon reuses the existing
ProviderIconmapping (configured icon URL wins, falling back to the provider glyph, then a generic building icon). The img overrides undoButton's default-size[&>img]rules (size-icon-lg, p-0.5) so the icon renders at 12px like the workspace pill's icon, and it only shows when a model is selected (never for the placeholder).Screenshots
Before
After
Generated by Coder Agents on behalf of @DanielleMaywood