Repository navigation
feat(desktop): Icon Composer app icon for macOS 26 (closes #11326) - #11487
Conversation
…t#11326) macOS 26 restyles app icons for its Dark, Clear and Tinted icon styles from the layers of an Icon Composer `.icon` document. An `.icns` is a flat bitmap, so with only `icon.icns` in the bundle Trilium keeps its white tile in the Dark style. `icon.icon` and `icon-dev.icon` sit next to the `.icns` files and share their base name, so `packagerConfig.icon` picks them up with no config change: @electron/packager 18.4 compiles a matching `.icon` with `actool` into `Contents/Resources/Assets.car` and sets `CFBundleIconName`, and it still copies the `.icns` for macOS versions before 26. Each leaf is its own glass layer. The SVGs are the three path groups of `icon-color.svg` and `icon-purple.svg`, copied unchanged. The background is white, as in the current `.icns`, and `system-dark` in the Dark style. The group is scaled to 0.8, which matches the logo-to-tile ratio of the current icon. Translucency is off so the leaves keep the logo colors in the Default style.
Greptile SummaryAdds macOS 26 Icon Composer documents for release and nightly desktop icons while preserving the existing
Confidence Score: 5/5The PR appears safe to merge; no actionable findings remain. All previous threads are resolved, including the conceded formatting finding and the addressed packaging-documentation and maintenance-note findings. No changes were made after the previous review, and the full-PR rule re-check produced no distinct actionable violation.
|
| Filename | Overview |
|---|---|
| apps/desktop/electron-forge/app-icon/icon.icon/icon.json | Defines the release Icon Composer document with layered leaf artwork and appearance-aware background settings. |
| apps/desktop/electron-forge/app-icon/icon-dev.icon/icon.json | Defines the equivalent nightly Icon Composer document using development-brand artwork. |
| docs/Developer Guide/Developer Guide/Building/Build deliveries locally.md | Documents the macOS and Xcode versions required to compile Icon Composer assets during packaging. |
| scripts/icons/create-icons.sh | Documents the enduring manual synchronization requirement for Composer leaf assets. |
Reviews (4): Last reviewed commit: "docs(desktop): shorten Icon Composer lea..." | Re-trigger Greptile
…pkeep Packaging the macOS app now compiles `icon.icon` with `actool`, which @electron/packager only allows on macOS 26 with Xcode 26; older setups fail rather than falling back to the `.icns`. Say so in the local build guide. `create-icons.sh` does not regenerate the Icon Composer leaf SVGs, so note next to the `.icns` step how they derive from the source SVGs.
icon-purple.svg already uses fill attributes; only icon-color.svg has CSS classes to inline.
735b176 to
54c0bef
Compare
Bundle ReportChanges will decrease total bundle size by 335.86kB (-0.38%) ⬇️. This is within the configured threshold ✅ Detailed changes
ℹ️ *Bundle size includes cached data from a previous commit Affected Assets, Files, and Routes:view changes for bundle: client-esmAssets Changed:
view changes for bundle: standalone-esmAssets Changed:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
What
macOS 26 builds the Dark, Clear and Tinted app icon styles from the layers of an Icon Composer
.icondocument. An.icnsis a flat bitmap, so with onlyicon.icnsin the bundle Trilium keeps its white tile when the Dock is set to Dark. This is the behavior asked for in #11326, and it's what Chrome does in the screenshots there.This PR adds
app-icon/icon.iconandapp-icon/icon-dev.icon(nightly) next to the existing.icnsfiles.forge.config.tsdoesn't change.How it's wired
packagerConfig.iconisapp-icon/iconwith no extension. @electron/packager 18.4.4 (the version in the lockfile) looks for<name>.iconon macOS. When it finds one, it compiles it withactoolintoContents/Resources/Assets.carand setsCFBundleIconName. It still copies<name>.icnsasCFBundleIconFile, so macOS versions before 26 keep using the current icon.Artwork
I didn't draw anything new. Each leaf is its own glass layer, and its SVG is one of the three path groups from
apps/server/src/assets/images/icon-color.svg(oricon-purple.svgfor nightly), copied as-is..icns. In Dark it usessystem-dark.All of these are easy to change if you'd like something different (for example a tinted background, more glass, or a different scale). You can open the
.iconfiles in Icon Composer, or I can make the changes.Verification (macOS 26.6, Xcode 26.6, Apple Silicon)
DEBUG=electron-packager pnpm --filter desktop electron-forge:package --arch=arm64 --platform=darwinsucceeded. The log showsGenerating asset catalog for icon composer ".../app-icon/icon.icon" file, followed by the usual.icnscopy.Trilium Notes.app:Contents/Resourcescontains bothAssets.carandelectron.icns.Info.plisthasCFBundleIconName = Icon.assetutil --info Assets.carlists the three leaf vectors for theNSAppearanceNameAqua,NSAppearanceNameDarkAquaandISAppearanceTintableappearances.icon-dev.iconcompiles withactoolusing the same arguments packager uses, with no warnings. I didn't do a full nightly package..iconfiles with Icon Composer'sictool. I didn't take them from the Dock.Build requirement
On macOS, packaging a
.iconrequires macOS 26 and Xcode 26. If either is missing, packager fails instead of skipping the.icon. The release and nightly macOS jobs run onmacos-latest, which is currently themacos-26-arm64image, so CI already meets this. Anyone packaging locally on an older macOS would need to update. Linux and Windows builds don't use the.icon.scripts/icons/create-icons.shdoesn't regenerate the.iconfiles. If the logo SVGs change, the leaf SVGs need to be copied again. I can add that step to the script if you'd prefer it that way.