fix(macos): use 256x256 source for the dock icon#2563
Conversation
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
There was a problem hiding this comment.
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.
| dockIconPath = config.appIcon; | ||
| } else { | ||
| dockIconPath = path.join(config.appPath, "assets/icons/icon-96x96.png"); | ||
| dockIconPath = path.join(config.appPath, "assets/icons/icon-256x256.png"); |
There was a problem hiding this comment.
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);There was a problem hiding this comment.
Applied in 795b793. Extracted DEFAULT_MACOS_DOCK_ICON and collapsed the let/if into a ternary.
📦 PR Snap Build Artifacts✅ Snap builds successful! Download artifacts: 🐧 Linux Snap Packagesx86_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 |
📦 PR Build Artifacts✅ Build successful! Download artifacts: 🐧 Linuxx86_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 🍎 macOSx86_64 (129.22 MB) - Contains: .dmg 🪟 Windowsx86_64 (109.58 MB) - Contains: .exe installer 📝 Note: Snap packages (.snap) are built in a separate workflow 🕐 Last updated: 2026-05-20 11:22 UTC |
|



Summary
The macOS dock-icon path in
app/mainAppWindow/index.jshardcodedassets/icons/icon-96x96.png, below the platform's 128x128 minimum, so every launch logged: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.pngtoapp/assets/icons/icon-256x256.pngand points the macOS branch at it. The fallback resize path is left in place as defence-in-depth for users who set a customappIcon.Third of four fixes from #2560.
Test plan
npm run lint— cleanapp/assets/icons/icon-256x256.pngis 256x256 RGBARefs #2560