feat(site): add provider icon to chat model selector by DanielleMaywood · Pull Request #28330 · coder/coder · GitHub
Skip to content

feat(site): add provider icon to chat model selector - #28330

Merged
DanielleMaywood merged 4 commits into
mainfrom
feat/chat-model-selector-provider-icon
Aug 20, 2026
Merged

feat(site): add provider icon to chat model selector#28330
DanielleMaywood merged 4 commits into
mainfrom
feat/chat-model-selector-provider-icon

Conversation

@DanielleMaywood

@DanielleMaywood DanielleMaywood commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

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 ProviderIcon mapping (configured icon URL wins, falling back to the provider glyph, then a generic building icon). The img overrides undo Button'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

image

After

image

Generated by Coder Agents on behalf of @DanielleMaywood

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.
@DanielleMaywood
DanielleMaywood force-pushed the feat/chat-model-selector-provider-icon branch from 41181b7 to 6e8573f Compare August 20, 2026 12:56
@DanielleMaywood DanielleMaywood changed the title feat(site): add provider icon to chat model selector and unify pill overflow feat(site): add provider icon to chat model selector Aug 20, 2026
…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.
Comment thread site/src/pages/AgentsPage/components/ChatElements/ModelSelector.tsx Outdated
@DanielleMaywood
DanielleMaywood marked this pull request as ready for review August 20, 2026 13:10

@ethanndickson ethanndickson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks good!

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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).
@DanielleMaywood
DanielleMaywood enabled auto-merge (squash) August 20, 2026 13:28
@DanielleMaywood
DanielleMaywood merged commit 015d6a6 into main Aug 20, 2026
26 checks passed
@DanielleMaywood
DanielleMaywood deleted the feat/chat-model-selector-provider-icon branch August 20, 2026 13:35
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 20, 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.

2 participants