Skip to content

fix(macos): use 256x256 source for the dock icon#2563

Merged
IsmaelMartinez merged 2 commits into
mainfrom
fix/2560-macos-dock-icon-size
May 20, 2026
Merged

fix(macos): use 256x256 source for the dock icon#2563
IsmaelMartinez merged 2 commits into
mainfrom
fix/2560-macos-dock-icon-size

Conversation

@IsmaelMartinez
Copy link
Copy Markdown
Owner

Summary

The macOS dock-icon path in app/mainAppWindow/index.js hardcoded assets/icons/icon-96x96.png, below the platform's 128x128 minimum, so every launch logged:

Unable to set dock icon for macOS, icon size is less than 128x128, current size 96x96. Using resized icon.

and the dock displayed an upscaled blurry icon. The accompanying comment even claimed a "default 256x256 icon for dock" but no such asset existed under app/assets/icons/.

This PR copies build/icons/256x256.png to app/assets/icons/icon-256x256.png and points the macOS branch at it. The fallback resize path is left in place as defence-in-depth for users who set a custom appIcon.

Third of four fixes from #2560.

Test plan

  • npm run lint — clean
  • Confirmed app/assets/icons/icon-256x256.png is 256x256 RGBA
  • Manual on macOS: confirm the "less than 128x128" warning no longer fires and the dock icon is sharp

Refs #2560

The macOS dock-icon path hardcoded assets/icons/icon-96x96.png, below
the platform's 128x128 minimum, so every launch logged "Unable to set
dock icon for macOS … Using resized icon." and the dock displayed an
upscaled blurry icon. The accompanying comment claimed a 256x256
default but no such asset existed under app/assets/icons/.

Copy build/icons/256x256.png to app/assets/icons/icon-256x256.png and
point the macOS branch at it. The fallback resize path is left in
place as a defence-in-depth for custom appIcon overrides.

Refs #2560
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the default macOS dock icon from 96x96 to 256x256 to meet the platform's requirement of at least 128x128 pixels. Feedback suggests refactoring the hardcoded icon path into a constant to improve maintainability and align with existing coding patterns in the file.

Comment thread app/mainAppWindow/index.js Outdated
dockIconPath = config.appIcon;
} else {
dockIconPath = path.join(config.appPath, "assets/icons/icon-96x96.png");
dockIconPath = path.join(config.appPath, "assets/icons/icon-256x256.png");
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.

medium

To improve maintainability and avoid magic strings, consider defining the icon path as a constant at a higher scope (e.g., at the top of the if (isMac) block). This is consistent with the coding style of using constants for such values elsewhere in this file.

For example:

const DEFAULT_MACOS_DOCK_ICON_PATH = 'assets/icons/icon-256x256.png';
// ...
dockIconPath = path.join(config.appPath, DEFAULT_MACOS_DOCK_ICON_PATH);

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Applied in 795b793. Extracted DEFAULT_MACOS_DOCK_ICON and collapsed the let/if into a ternary.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

📦 PR Snap Build Artifacts

Snap builds successful! Download artifacts:

🐧 Linux Snap Packages

x86_64 (110.67 MB)

arm64 (107.50 MB)

armv7l (101.55 MB)


📝 Note: Other package formats (.deb, .rpm, .AppImage, .dmg, .exe) are built in the main workflow

View workflow run

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

📦 PR Build Artifacts

Build successful! Download artifacts:

🐧 Linux

x86_64 (447.83 MB) - Contains: .deb, .rpm, .tar.gz, .AppImage

arm64 (438.08 MB) - Contains: .deb, .rpm, .tar.gz, .AppImage

armv7l (415.92 MB) - Contains: .deb, .rpm, .tar.gz, .AppImage

🍎 macOS

x86_64 (129.22 MB) - Contains: .dmg

🪟 Windows

x86_64 (109.58 MB) - Contains: .exe installer


📝 Note: Snap packages (.snap) are built in a separate workflow

View workflow run

🕐 Last updated: 2026-05-20 11:22 UTC

Address Gemini Code Assist suggestion on PR #2563: pull the default
dock-icon path into a DEFAULT_MACOS_DOCK_ICON constant and collapse the
let/if into a ternary so the intent reads from one line. No behaviour
change.

Refs #2560
@sonarqubecloud
Copy link
Copy Markdown

@IsmaelMartinez IsmaelMartinez merged commit 8f96c66 into main May 20, 2026
16 checks passed
@IsmaelMartinez IsmaelMartinez deleted the fix/2560-macos-dock-icon-size branch May 20, 2026 12:36
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