Repository navigation
feat(packaging): add the macOS app icon built from the minimal mark - #2125
Conversation
The Background Items row for the answerer service `min net setup` installs carries no icon, because macOS takes that icon from an app bundle and the service is a bare program (gominimal/inbox#1039). This adds the asset that bundle will carry: the mark composed on the macOS icon grid as an SVG source, the .icns rendered from it, the script that renders it, and a `just app-icon` recipe.
|
Reviewed: 1 finding, none blocking at Address the comments on the diff. Clobber: none: |
mitodrummer
left a comment
There was a problem hiding this comment.
Checked the asset: all ten iconset slots are present at the right pixel sizes (16 to 1024, RGBA, transparent margin), the SVG matches Apple's macOS grid (1024 canvas, 824 rounded square at 100, r=185.4), and scripts/build-app-icon.sh reproduces the committed .icns byte-for-byte here (librsvg 2.62.1). Previewed it in a throwaway bundle on macOS 26.6.2: Finder, Quick Look and Dock look right.
Optional nit: the mark is centred on its 48-unit viewBox, but the glyph ends at 47.42, so it sits ~3px left of centre at 1024. translate(235.4 372) centres it exactly.
The glyph spans 47.42 of the source's 48 units, so centring the viewBox left it 3 px off centre at 1024. Centre the glyph instead.
|
Nit applied in ee52e6b: |
| for size in 16 32 128 256 512; do | ||
| double=$((size * 2)) | ||
| rsvg-convert -w "$size" -h "$size" "$source_svg" -o "$iconset/icon_${size}x${size}.png" | ||
| rsvg-convert -w "$double" -h "$double" "$source_svg" -o "$iconset/icon_${size}x${size}@2x.png" | ||
| done | ||
| iconutil -c icns "$iconset" -o "$out_icns" |
There was a problem hiding this comment.
LOW · tests · confidence 0.55 · in build-app-icon.sh
The committed packaging/macos/AppIcon.icns is generated from app-icon.svg by this script, but nothing verifies the committed binary stays in sync with its source. The script's own header ("a change to the source is re-rendered here, never edited by hand") is the only guard; if a future edit to app-icon.svg forgets to run just app-icon, the committed icns silently drifts and the Background Items row shows a stale mark — exactly the missing-logo failure this PR exists to fix (inbox#1039). A cheap guard would be a shell test that regenerates to a temp path and cmps against the committed file, wired into lint-shell or a convention-discovered workspace test.
What the reviewer checked
build-app-icon.sh:43 iconutil -c icns "$iconset" -o "$out_icns" — only this script writes the .icns; nothing in CI or the justfile diffs a regenerated file against the committed bytes.
Hand this to an agent
Act on a code-review finding.
File: scripts/build-app-icon.sh
Lines: 38-43
Category: tests
Severity: low (reviewer confidence 0.55)
Finding:
The committed `packaging/macos/AppIcon.icns` is generated from `app-icon.svg` by this script, but nothing verifies the committed binary stays in sync with its source. The script's own header ("a change to the source is re-rendered here, never edited by hand") is the only guard; if a future edit to `app-icon.svg` forgets to run `just app-icon`, the committed icns silently drifts and the Background Items row shows a stale mark — exactly the missing-logo failure this PR exists to fix (inbox#1039). A cheap guard would be a shell test that regenerates to a temp path and `cmp`s against the committed file, wired into `lint-shell` or a convention-discovered workspace test.
First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.
👍 useful · 👎 noise — react to tell the reviewer. Replying works too, and says more.
Fixes the asset half of gominimal/inbox#1039: the Background Items row for the answerer service
min net setupinstalls shows no logo.What this adds
packaging/macos/app-icon.svg: the mark fromdocs/public/minimal-mark-light.svg, composed on Apple's macOS icon grid (1024 canvas, 824-point rounded square, corner radius 185.4), light mark on the brand's dark ground. Monochrome, per the brand.packaging/macos/AppIcon.icns: rendered from that source, all ten iconset sizes (16 to 512, 1x and 2x). 94 KB.scripts/build-app-icon.shandjust app-icon: the one way the.icnsis made (rsvg-convert, then iconutil). Re-running it reproduces the committed bytes exactly.Why this PR stops at the asset
The attachment mechanism needs a change this PR cannot carry. Verified on this host (macOS 26.7) with a user-scope LaunchAgent and
sfltool dumpbtm:minzonedinside an unsigned.appwithInfo.plist+AppIcon.icnsminzoned, no bundle associationlsregister -f)minzonedAssociatedBundleIdentifiersin the launchd plistminzoned, the association ignoredminzoned, and the Developer ID attribution is lostEvery item on this host that does carry a name and icon (Zoom, OrbStack, Docker, iStat Menus, Unpeel) is backed by a bundle signed under the vendor's Team ID, either as the executable's containing bundle or through
AssociatedBundleIdentifiers. Apple DTS says the same: a product with no app should ship a small signed management app that owns the launchd jobs (forum thread).So the fix that lands the logo is:
minzoned.appbundle (this.icnsplus anInfo.plistaround theminzonedbinary) instead of the bareminzoned-macos-arm64. That isrelease.yml, frozen and CODEOWNER-gated, so it is not in this PR.min;min net setupcopies the bundle, verifies it withcodesign --verify --strict -Ron the bundle, pointsProgramArgumentsatContents/MacOS/minzoned, and removes the bundle on--undo. These arescripts/install.sh,crates/minimal/src/resolver.rs,scripts/zoned-macos-e2e.sh, and thesession-e2e.shteardowns. Straightforward, but pointless before step 1, and unprovable in CI until it ships.Writing the bundle at install time was tried and rejected: an unsigned bundle is ignored, and
min net setuphas no identity to sign it with.Not verified
The rendered Settings page itself.
screencapturehas no screen-recording grant for this terminal. The row name fromsfltool dumpbtmis the proxy used above.Summary by CodeRabbit