Skip to content

Generate the tray icons from phosphor, not the package that was removed - #398

Merged
sivert-io merged 1 commit into
mainfrom
claude/fix-tray-icon-react-icons
Sep 4, 2026
Merged

Generate the tray icons from phosphor, not the package that was removed#398
sivert-io merged 1 commit into
mainfrom
claude/fix-tray-icon-react-icons

Conversation

@sivert-io

Copy link
Copy Markdown
Member

This unblocks the v1.9.15 release, which is failing right now.

scripts/generate-tray-icon.mjs imports three icons to render the tray glyphs,
and imported them from react-icons — which #397 removed. Every build leg dies
at Generate app icons:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'react-icons'
imported from packages/client/scripts/generate-tray-icon.mjs

My mistake: when removing the dependency I grepped src/ for remaining imports
and never checked scripts/. Nothing else would have caught it either — lint and
tsc do not cover scripts/*.mjs, and no local build runs icons:generate,
because it is a release-only step.

The fix

Import from @phosphor-icons/react instead. Two differences from react-icons:
the weight is a prop rather than part of the name, and the components are
forwardRef objects, so calling one directly throws — createElement instead.

Verified

yarn icons:generate runs, and the PNGs come out byte-identicalgit status on build/ is empty afterwards. Same artwork either way, which is the
check that actually matters here.

I also swept every script in scripts/ for imports of packages that are not
declared. Nothing else referenced react-icons. (It does surface
app-builder-lib, @develar/schema-utils and @electron/notarize as
transitive-only, but that predates this and they resolve fine.)

🤖 Generated with Claude Code

generate-tray-icon.mjs imports three icons to render the tray glyphs, and it
imported them from react-icons, which #397 deleted. The release died on
"Generate app icons" before it built anything.

I checked src/ for react-icons imports when removing it and did not check
scripts/. Nothing else would have: lint and tsc do not cover scripts/*.mjs, and
no local build runs icons:generate — it is a release step.

Phosphor puts the weight in a prop rather than the name, and its components are
forwardRef objects, so calling one the way react-icons' could be called throws.
createElement instead.

The rendered PNGs come out byte-identical, which is the check that matters: it
is the same artwork either way.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sivert-io
sivert-io merged commit 1db10f7 into main Sep 4, 2026
3 checks passed
@sivert-io
sivert-io deleted the claude/fix-tray-icon-react-icons branch September 4, 2026 20:38
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