Skip to content

Draw provider logos from the package, and fix main - #395

Merged
sivert-io merged 1 commit into
mainfrom
claude/client-provider-logos-from-core
Sep 4, 2026
Merged

Draw provider logos from the package, and fix main#395
sivert-io merged 1 commit into
mainfrom
claude/client-provider-logos-from-core

Conversation

@sivert-io

Copy link
Copy Markdown
Member

main is red. #394 moved the client to @gryt/core 0.6.0, which brought three
new providers — makerworld, printables, thingiverse — and
check-embed-icons correctly failed because this app had no artwork for them.

Adding them to the old table would not have worked for all three: react-icons
has SiPrintables and SiThingiverse but no SiMakerworld. The package has
all 76 marks, so the artwork comes from there now — which is where it was headed
anyway.

What changed

LinkPreviewCard renders the path instead of a component:

const logo = provider ? getProviderLogo(provider.id) : undefined;
...
<svg className="link-embed-card-brand" viewBox={LOGO_VIEW_BOX} fill="currentColor" aria-hidden>
  <path d={logo} />
</svg>

.link-embed-card-brand already sets width: 15px, height: 15px and color,
so this draws exactly what react-icons drew — same 15px against the same 24×24
viewBox, same currentColor.

Two deletions worth arguing with

embedProviderIcons.ts — 108 lines and 73 react-icons/si imports, all now
in the package.

scripts/check-embed-icons.mjs — this guarded a seam its own comment
described: "the package owns the provider list, this app owns the artwork, and
the two can drift apart"
. That seam is what closed. Both sides live in the
package now, so they cannot drift, and core's logos.test.ts already asserts
every mark names a real provider. Keeping the check would mean keeping a file
whose only job is to compare the package against itself.

I checked the coverage it was protecting before deleting it: 76 providers, 76
logos, none missing
, including the three that broke the build.

Not the whole icon story

react-icons stays installed. The 129 phosphor icons still come from
react-icons/pi, and SiKofi and FaGithub are in settings. Dropping the
dependency entirely is the follow-up, and it is worth 82 MB of every checkout
and nothing at all off the installer, since it is already a devDependency and
out of the asar.

Lint, typecheck and build pass.

🤖 Generated with Claude Code

main is red. #394 moved the client to @gryt/core 0.6.0, which brought three new
providers — makerworld, printables, thingiverse — and check-embed-icons caught
that this app had no artwork for them. It was right to.

Adding them to the old table was not possible for all three: react-icons has
SiPrintables and SiThingiverse but no SiMakerworld, while the package has all
76 marks. So the artwork comes from the package now, which is where it was
always headed.

The card renders the path rather than a component. The class already sets size
and colour, so currentColor is all the svg has to say, and 15px against a 24x24
viewBox is what it drew before.

embedProviderIcons.ts is gone, and check-embed-icons with it. That check guarded
a seam — the package owning the list while this app owned the artwork — and the
seam is what closed. Both sides live in the package, so they cannot drift, and
core's own logos.test.ts already asserts every mark names a real provider.

react-icons/si is out of this app. react-icons stays for now: the 129 phosphor
icons and SiKofi and FaGithub in settings still come from it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sivert-io
sivert-io merged commit 7df8e93 into main Sep 4, 2026
3 checks passed
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.

1 participant