Generate the tray icons from phosphor, not the package that was removed - #398
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This unblocks the v1.9.15 release, which is failing right now.
scripts/generate-tray-icon.mjsimports three icons to render the tray glyphs,and imported them from
react-icons— which #397 removed. Every build leg diesat
Generate app icons:My mistake: when removing the dependency I grepped
src/for remaining importsand never checked
scripts/. Nothing else would have caught it either — lint andtscdo not coverscripts/*.mjs, and no local build runsicons:generate,because it is a release-only step.
The fix
Import from
@phosphor-icons/reactinstead. Two differences from react-icons:the weight is a prop rather than part of the name, and the components are
forwardRefobjects, so calling one directly throws —createElementinstead.Verified
yarn icons:generateruns, and the PNGs come out byte-identical —git statusonbuild/is empty afterwards. Same artwork either way, which is thecheck that actually matters here.
I also swept every script in
scripts/for imports of packages that are notdeclared. Nothing else referenced react-icons. (It does surface
app-builder-lib,@develar/schema-utilsand@electron/notarizeastransitive-only, but that predates this and they resolve fine.)
🤖 Generated with Claude Code