Skip to content

fix(auto-icons): dedupe merged icon sizes to prevent generating the same size multiple times - #2493

Merged
aklinker1 merged 1 commit into
wxt-dev:mainfrom
YashNayakk:fix/auto-icons-duplicate-sizes-v2
Aug 1, 2026
Merged

aklinker1 merged 1 commit into
wxt-dev:mainfrom
YashNayakk:fix/auto-icons-duplicate-sizes-v2

Conversation

@YashNayakk

Copy link
Copy Markdown
Contributor

Overview

defu merges user-provided sizes with the default array via concatenation rather than union, so sizes overlapping a default (128, 48, 32, 16) were processed and written twice — duplicate icons generated and duplicate manifest entries. This dedupes the merged array once via Set before it's consumed by the manifest, build, and public-paths hooks. Additive behavior is preserved (custom sizes still extend defaults) — no breaking change.

Manual Testing

  • bun run --filter @wxt-dev/auto-icons test — 21/21 passing, including new regression tests for overlapping size configs
  • Verified in a real WXT extension build (wxt dev and production build) that icons/ output contains exactly one file per unique size, and manifest.json has no duplicate icon keys

Related Issue

This PR closes #2491

…tion

Fixes wxt-dev#2491. defu merges user-provided sizes with the default array
via concatenation rather than union, so sizes overlapping a default
(128, 48, 32, 16) were processed and written twice. This deduplicates
the merged array once via Set before it's consumed by the manifest,
build, and public-paths hooks. Additive behavior is preserved
(custom sizes still extend defaults) - no breaking change.
@YashNayakk
YashNayakk requested a review from Timeraa as a code owner July 12, 2026 19:57
@netlify

netlify Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 1822343
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6a53f1a68440bc0008255e26
😎 Deploy Preview https://deploy-preview-2493--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the pkg/auto-icons Includes changes to the `packages/auto-icons` directory label Jul 12, 2026

@aklinker1 aklinker1 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.

Awesome, thanks for the fix! I'll publish later today.

@aklinker1
aklinker1 enabled auto-merge (squash) August 1, 2026 15:56
@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.40%. Comparing base (d92d5a4) to head (1822343).
⚠️ Report is 80 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2493      +/-   ##
==========================================
+ Coverage   79.35%   79.40%   +0.05%     
==========================================
  Files         134      134              
  Lines        4005     4006       +1     
  Branches      910      910              
==========================================
+ Hits         3178     3181       +3     
+ Misses        736      734       -2     
  Partials       91       91              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new

pkg-pr-new Bot commented Aug 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

@wxt-dev/analytics

npm i https://pkg.pr.new/@wxt-dev/analytics@2493

@wxt-dev/auto-icons

npm i https://pkg.pr.new/@wxt-dev/auto-icons@2493

@wxt-dev/browser

npm i https://pkg.pr.new/@wxt-dev/browser@2493

@wxt-dev/i18n

npm i https://pkg.pr.new/@wxt-dev/i18n@2493

@wxt-dev/is-background

npm i https://pkg.pr.new/@wxt-dev/is-background@2493

@wxt-dev/module-react

npm i https://pkg.pr.new/@wxt-dev/module-react@2493

@wxt-dev/module-solid

npm i https://pkg.pr.new/@wxt-dev/module-solid@2493

@wxt-dev/module-svelte

npm i https://pkg.pr.new/@wxt-dev/module-svelte@2493

@wxt-dev/module-vue

npm i https://pkg.pr.new/@wxt-dev/module-vue@2493

@wxt-dev/runner

npm i https://pkg.pr.new/@wxt-dev/runner@2493

@wxt-dev/storage

npm i https://pkg.pr.new/@wxt-dev/storage@2493

@wxt-dev/unocss

npm i https://pkg.pr.new/@wxt-dev/unocss@2493

@wxt-dev/webextension-polyfill

npm i https://pkg.pr.new/@wxt-dev/webextension-polyfill@2493

wxt

npm i https://pkg.pr.new/wxt@2493

commit: 1822343

@aklinker1
aklinker1 disabled auto-merge August 1, 2026 15:59
@aklinker1 aklinker1 changed the title fix(auto-icons): dedupe merged icon sizes to prevent duplicate genera… fix(auto-icons): dedupe merged icon sizes to prevent generating the same size multiple times Aug 1, 2026
@aklinker1
aklinker1 merged commit 9afcad1 into wxt-dev:main Aug 1, 2026
19 checks passed
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for helping make WXT better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg/auto-icons Includes changes to the `packages/auto-icons` directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@wxt-dev/auto-icons generates duplicate icons when custom sizes overlap defaults

2 participants