Skip to content

feat(desktop): Add a generic sparkles icon to provider-icon#12517

Closed
ARLBR10 wants to merge 2 commits intoanomalyco:devfrom
ARLBR10:dev
Closed

feat(desktop): Add a generic sparkles icon to provider-icon#12517
ARLBR10 wants to merge 2 commits intoanomalyco:devfrom
ARLBR10:dev

Conversation

@ARLBR10
Copy link
Copy Markdown

@ARLBR10 ARLBR10 commented Feb 6, 2026

Vibecoded with Opus 4.6
100x times better than an blank space on Opencode Desktop

What does this PR do?

This PR just adds the generic sparkles to the packages/ui/src/components/provider-icons/sprite.svg so in case an custom provider is added by the user isn't just a blank space in the UI

Fixes #12518

image

How did you verify your code works?

Used bun dev in packages/app, also the code doesn't mess with critical code.

Vibecoded with Opus 4.6
100x times better than an blank space on Opencode Desktop
Copilot AI review requested due to automatic review settings February 6, 2026 18:27
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 6, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@ARLBR10 ARLBR10 changed the title feat: Add a generic sparkles icon to provider-icon feat(desktop): Add a generic sparkles icon to provider-icon Feb 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 6, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a “generic” provider icon (sparkles) and updates the ProviderIcon component to fall back to that icon when an unknown provider id is passed, avoiding blank icons for custom/unknown providers.

Changes:

  • Add a new "generic" icon name to the provider icon set.
  • Add a new generic symbol to the provider icon sprite.
  • Update ProviderIcon to accept string ids and resolve unknown ids to "generic".
  • Add src/assets/icons/provider/generic.svg.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/ui/src/components/provider-icons/types.ts Adds "generic" to the icon name list (but this file is generated output).
packages/ui/src/components/provider-icons/sprite.svg Adds a generic symbol to the sprite (also generated output).
packages/ui/src/components/provider-icon.tsx Adds runtime resolution to fall back to "generic" for unknown ids.
packages/ui/src/assets/icons/provider/generic.svg Adds the new SVG asset intended to become the generated generic symbol.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 7 to +23
export type ProviderIconProps = JSX.SVGElementTags["svg"] & {
id: IconName
id: IconName | string
}

export const ProviderIcon: Component<ProviderIconProps> = (props) => {
const [local, rest] = splitProps(props, ["id", "class", "classList"])
const resolved = () => ((iconNames as readonly string[]).includes(local.id) ? local.id : "generic")
return (
<svg
data-component="provider-icon"
{...rest}
classList={{
...(local.classList ?? {}),
[local.class ?? ""]: !!local.class,
}}
>
<use href={`${sprite}#${local.id}`} />
<use href={`${sprite}#${resolved()}`} />
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The new runtime fallback uses "generic", but generic.svg is identical to the existing synthetic.svg (same paths). Consider reusing "synthetic" as the fallback (or aliasing generic -> synthetic) to avoid adding another generated icon name/symbol and increasing the sprite/types surface area for no visual change.

Copilot uses AI. Check for mistakes.
Comment on lines 76 to 80
"alibaba-cn",
"aihubmix",
"abacus",
"generic",
] as const
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

types.ts is marked as generated, but this PR hand-edits the generated iconNames list (and appends "generic" out of the existing sort order). Since vite.config.ts generates src/components/provider-icons from src/assets/icons/provider, this change is likely to be overwritten the next time the spritesheet generator runs. Prefer adding generic.svg to the input dir and re-running the generator so types.ts stays fully generated/deterministic, or otherwise move generic to the true source of generation.

Copilot uses AI. Check for mistakes.
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.

No icon shown when a custom provider is created

2 participants