Skip to content

fix: Resize macOS app icon to 1024×1024 with proper safe area#1771

Open
xxiaoxiong wants to merge 2 commits into
nexu-io:mainfrom
xxiaoxiong:fix/macos-icon-size-1751
Open

fix: Resize macOS app icon to 1024×1024 with proper safe area#1771
xxiaoxiong wants to merge 2 commits into
nexu-io:mainfrom
xxiaoxiong:fix/macos-icon-size-1751

Conversation

@xxiaoxiong
Copy link
Copy Markdown
Contributor

Why

Fixes #1751

The Open Design app icon appears oversized in macOS Launchpad and Dock compared to other apps. This is caused by:

  1. Non-standard canvas size (533×533 instead of Apple's recommended 1024×1024)
  2. Insufficient safe area margin (~2.4% instead of the recommended ~10%)

What changed

Icon Assets

  • app-icon.svg: Resized from 533×533 to 1024×1024 with proper 10% safe area (~102px margin)
  • icon.png: Regenerated at 1024×1024 resolution from the updated SVG

Conversion Scripts (for future updates)

  • scripts/convert-svg-to-png.py: Playwright-based converter (used for this PR)
  • scripts/convert-icon.mjs: Node.js with sharp
  • scripts/convert-icon-canvas.mjs: Node.js with canvas
  • scripts/convert-icon.html: Browser-based converter (zero dependencies)
  • scripts/ICON_CONVERSION.md: Complete guide with 6 different conversion methods

What users will see

  • App icon will appear at the correct size in macOS Launchpad and Dock
  • Icon will match the optical size of other macOS apps
  • In-app brand mark (top-left corner) will also be properly sized

Surface area

  • Icon assets — SVG and PNG updated with proper dimensions and safe area
  • None of the other categories apply

Validation

  • Verified SVG is 1024×1024 with proper transform and scale
  • Verified PNG is 1024×1024: file tools/pack/resources/mac/icon.png
  • Visual inspection: icon content is centered with ~10% margin on all sides
  • Conversion scripts tested and documented for future icon updates

…o#1751)

- Resize app-icon.svg from 533×533 to 1024×1024
- Add ~10% safe area margin (102px) instead of 2.4%
- Regenerate icon.png at 1024×1024 resolution
- Add conversion scripts for future icon updates

Fixes the oversized icon appearance in macOS Launchpad and Dock.
The icon now matches Apple's recommended sizing and padding guidelines.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f2c69f5247

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -1,4 +1,5 @@
<svg width="533" height="533" viewBox="0 0 533 533" fill="none" xmlns="http://www.w3.org/2000/svg">
<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(102, 102) scale(1.5385)">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep macOS safe area out of shared web icon

This padding is being added to the shared /app-icon.svg, not just the packaged macOS PNG. The same SVG is rendered directly in the app chrome at apps/web/src/components/AppChromeHeader.tsx:23 and constrained to 28px in apps/web/src/index.css:352-366, and it is also the web favicon in apps/web/app/layout.tsx:8-14; after this transform those surfaces render the mark at only ~80% of their allocated size with transparent padding. If the intent is to fix Dock/Launchpad sizing, generate the padded asset only for tools/pack/resources/mac/icon.png (or use a separate mac icon source) and leave the web/UI SVG full-bleed.

Useful? React with 👍 / 👎.

@lefarcen lefarcen added size/L PR changes 300-700 lines risk/medium Medium risk: regular code changes type/bugfix Bug fix labels May 15, 2026
Copy link
Copy Markdown
Contributor

@lefarcen lefarcen left a comment

Choose a reason for hiding this comment

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

Hey @xxiaoxiong! 👋 The PR description is solid — the root cause diagnosis (533×533 canvas + 2.4% margin vs. Apple's 1024×1024 + 10% safe area) is crystal clear, and documenting six conversion methods in ICON_CONVERSION.md is a great touch for future maintainers.

One quick template item: the ## Surface area section currently uses custom checkboxes ("Icon assets" / "None of the other categories apply"). Could you swap those for the standard 9-box checklist from the template? For this PR, None would be the right pick since the change is purely to static icon assets with no runtime/UI/API surface changes. That lets pool reviewers quickly confirm the blast radius at a glance.

Everything else looks complete — once that's updated this should be ready for review! ✨

@lefarcen
Copy link
Copy Markdown
Contributor

Hey @xxiaoxiong — great work picking this up and shipping it so quickly! The 1024×1024 resize with 10% safe area is exactly the right fix, and including the conversion scripts is a nice touch for maintainability.

One thing to double-check in the PR: the packaged macOS build references tools/pack/resources/mac/icon.icns directly (via electron-builder's icon config) — the .png update alone won't update what shows up in Launchpad and the Dock for installed builds. The .icns would need to be regenerated from the new 1024×1024 source and committed alongside the PNG. Your ICON_CONVERSION.md likely has the right tooling for this — iconutil can convert a properly structured .iconset folder into an .icns file.

Looking forward to seeing this land! 🙌

Copy link
Copy Markdown
Contributor

@nettee nettee left a comment

Choose a reason for hiding this comment

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

Thanks for tackling the macOS icon sizing bug. I found three blocking issues that still prevent this PR from delivering the intended fix end-to-end: the padded SVG now changes shared web/UI surfaces, packaged mac builds still consume icon.icns, and the new .mjs helpers fail the workspace guard.

🔁 Powered by Looper · runner=reviewer · agent=opencode · model=openai/gpt-5.4 · An autonomous AI dev team for your GitHub repos.

@@ -1,4 +1,5 @@
<svg width="533" height="533" viewBox="0 0 533 533" fill="none" xmlns="http://www.w3.org/2000/svg">
<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(102, 102) scale(1.5385)">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This moves the macOS safe-area padding into the shared web asset instead of keeping it in a packaging-only source. apps/web/app/layout.tsx:10-14 uses /app-icon.svg for the site icon and mask icon, and apps/web/src/components/AppChromeHeader.tsx:23 renders the same file in the app header, so the new outer transform shrinks those surfaces by roughly 20% inside the same box. That means the PR fixes Dock/Launchpad sizing by regressing the in-app brand mark and web icon sizing. Please keep apps/web/public/app-icon.svg full-bleed and generate a separate padded asset only for the mac packaging resources.

🔁 Powered by Looper · runner=reviewer · agent=opencode · model=openai/gpt-5.4 · An autonomous AI dev team for your GitHub repos.

## Current Status

✅ **SVG Updated**: `apps/web/public/app-icon.svg` is now 1024×1024 with 10% safe area
❌ **PNG Needs Update**: `tools/pack/resources/mac/icon.png` is still 533×533
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The instructions and helper scripts only regenerate tools/pack/resources/mac/icon.png, but packaged mac builds still read tools/pack/resources/mac/icon.icns (tools/pack/src/resources.ts:35). As a result, the installed app will continue shipping the old icon and Launchpad/Dock will not reflect this fix even if the PNG is updated. Please regenerate and commit icon.icns from the 1024×1024 source (or change the packaging config to consume the updated asset you are actually maintaining) as part of this PR.

🔁 Powered by Looper · runner=reviewer · agent=opencode · model=openai/gpt-5.4 · An autonomous AI dev team for your GitHub repos.

Comment thread scripts/convert-icon.mjs
@@ -0,0 +1,38 @@
#!/usr/bin/env node
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These new project-owned .mjs helpers already fail CI. The Validate workspace job's pnpm guard step reports scripts/convert-icon.mjs and scripts/convert-icon-canvas.mjs as forbidden residual JavaScript files, which matches the repo rule in the root AGENTS.md that new project-owned scripts should default to TypeScript unless there is a documented compatibility exception. Because of that, this PR cannot merge green as written. Please convert these helpers to TypeScript (or add the documented allowlist entry if there is a real compatibility reason to keep JavaScript here) before landing them.

🔁 Powered by Looper · runner=reviewer · agent=opencode · model=openai/gpt-5.4 · An autonomous AI dev team for your GitHub repos.

The macOS packaged build uses icon.icns, not icon.png.
Regenerated with all required sizes (16px to 1024px) from the
updated 1024×1024 source with proper safe area.
@xxiaoxiong
Copy link
Copy Markdown
Contributor Author

Thanks for catching that, @lefarcen! You're absolutely right — I've now regenerated icon.icns from the updated 1024×1024 PNG with all required sizes (16px to 1024px). The new .icns file is committed and ready for macOS packaged builds. ✅

Copy link
Copy Markdown
Contributor

@lefarcen lefarcen left a comment

Choose a reason for hiding this comment

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

Good progress on the icon.icns front, @xxiaoxiong — committing it alongside the PNG is the right call.

Two quick PR body items still outstanding on this head:

  1. Surface area (from the earlier note) — just replace the custom checkboxes with the standard 9-box list and tick None. That one-liner unblocks pool reviewers from having to infer the blast radius.

  2. Bug fix verification — since this carries type/bugfix, the template asks for a before/after confirmation of the red→green state. A pair of screenshots of the icon in Launchpad (or Dock) before vs. after the fix would do it — doesn't need to be elaborate, just visual evidence the icon now sits at the right optical size relative to neighbors.

Addressing @nettee's three blocking findings (shared SVG path, .mjs → TypeScript, and the icon.icns gap) takes priority — these body items are a quick cleanup to fold in alongside those fixes.

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

Labels

risk/medium Medium risk: regular code changes size/L PR changes 300-700 lines type/bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS 15: Open Design icon appears oversized in Launchpad and Dock

3 participants