Skip to content

feat(packaging): add the macOS app icon built from the minimal mark - #2125

Merged
norrietaylor merged 2 commits into
mainfrom
feat/macos-app-icon
Oct 9, 2026
Merged

norrietaylor merged 2 commits into
mainfrom
feat/macos-app-icon

Conversation

@norrietaylor

@norrietaylor norrietaylor commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Fixes the asset half of gominimal/inbox#1039: the Background Items row for the answerer service min net setup installs shows no logo.

What this adds

  • packaging/macos/app-icon.svg: the mark from docs/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.sh and just app-icon: the one way the .icns is 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:

Layout Row name in Background Task Management
Developer ID signed minzoned inside an unsigned .app with Info.plist + AppIcon.icns minzoned, no bundle association
Same, bundle registered with LaunchServices (lsregister -f) minzoned
Same, plus AssociatedBundleIdentifiers in the launchd plist minzoned, the association ignored
Ad-hoc signed bundle minzoned, and the Developer ID attribution is lost

Every 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:

  1. The macOS release job signs and notarizes a minzoned.app bundle (this .icns plus an Info.plist around the minzoned binary) instead of the bare minzoned-macos-arm64. That is release.yml, frozen and CODEOWNER-gated, so it is not in this PR.
  2. The installer lays the bundle down beside min; min net setup copies the bundle, verifies it with codesign --verify --strict -R on the bundle, points ProgramArguments at Contents/MacOS/minzoned, and removes the bundle on --undo. These are scripts/install.sh, crates/minimal/src/resolver.rs, scripts/zoned-macos-e2e.sh, and the session-e2e.sh teardowns. 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 setup has no identity to sign it with.

Not verified

The rendered Settings page itself. screencapture has no screen-recording grant for this terminal. The row name from sfltool dumpbtm is the proxy used above.

Summary by CodeRabbit

  • New Features
    • Added a macOS-only command to generate the application icon from its SVG source. You can specify custom source and output paths; otherwise, the command uses the default icon source and output locations. It creates the required icon size variants and platform icon file, reports an error if required tools or the source file are unavailable, and removes temporary files when generation finishes.

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.
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • packaging/macos/AppIcon.icns

⛔ Files ignored due to path filters (1)
  • packaging/macos/app-icon.svg is excluded by !**/*.svg

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 3a3a74a0-c1b6-45ff-8286-b4be0e9b7fc9

📥 Commits

Reviewing files that changed from the base of the PR and between 81c78f0 and ee52e6b.


⛔ Files ignored due to path filters (1)
  • packaging/macos/app-icon.svg is excluded by !**/*.svg

📒 Files selected for processing (1)
  • packaging/macos/AppIcon.icns

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 6552bb24-9c65-4595-817b-0c1163c27072

📥 Commits

Reviewing files that changed from the base of the PR and between 212f0d9 and 81c78f0.


⛔ Files ignored due to path filters (1)
  • packaging/macos/app-icon.svg is excluded by !**/*.svg

📒 Files selected for processing (3)
  • justfile
  • packaging/macos/AppIcon.icns
  • scripts/build-app-icon.sh

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.



📝 Walkthrough

Walkthrough

Adds a macOS-only app-icon recipe and a script that renders PNG icon sizes from an SVG source and packages them as an ICNS file.

Changes

macOS App Icon Build

Layer / File(s) Summary
Icon generation
justfile, scripts/build-app-icon.sh
The macOS-only app-icon recipe runs the script. The script checks for required tools and a source file, renders five icon sizes at 1x and 2x, packages them as ICNS, and removes its temporary directory on exit. It accepts optional source and output paths. Defaults point to packaging/macos/app-icon.svg and packaging/macos/AppIcon.icns.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: 0chroma


Merge Risk: ⚪ Minimal · up to 81c78

The icon asset and generation recipe are ready to merge on the supplied evidence; making the icon appear in Background Items remains separate work.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding a macOS app icon and its packaging implementation.
Description check Passed The description provides a detailed summary, explains the scope and limitations, and documents verification results. It does not use the required Summary, Testing, and Checklist headings, and it omits…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.


✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the SVG,
Then paints each size with care.
The iconset hops into its case,
And ICNS blooms from there.
The tools pack up; the temp files go,
While bunny ears salute the glow.

Comment @coderabbitai help to get the list of available commands.

@norrietaylor
norrietaylor marked this pull request as ready for review October 9, 2026 21:29
@norrietaylor
norrietaylor requested a review from a team as a code owner October 9, 2026 21:29
@minimal-foundry

minimal-foundry Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Reviewed: 1 finding, none blocking at ee52e6be25fb.

Address the comments on the diff.

Clobber: none: git log on both commits (81c78f00, ee52e6be) shows only additions; the second commit re-centres the mark (translate 232→235.4) and regenerates the icns to match, so the committed bytes are consistent with the current source.

@minimal-foundry minimal-foundry Bot left a comment

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.

minimal-review — approved

Verdict APPROVE — 1 finding, 1 inline.

Comment thread justfile Resolved
@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 9, 2026

@mitodrummer mitodrummer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 9, 2026
@norrietaylor
norrietaylor removed this pull request from the merge queue due to a manual request Oct 9, 2026
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.
@norrietaylor

Copy link
Copy Markdown
Member Author

Nit applied in ee52e6b: translate(235.4 372), the .icns re-rendered from it. Thanks for the throwaway-bundle check.

@norrietaylor
norrietaylor enabled auto-merge October 9, 2026 22:07

@minimal-foundry minimal-foundry Bot left a comment

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.

minimal-review — advisory review

Verdict COMMENT — 1 finding, 1 inline.

Comment thread scripts/build-app-icon.sh
Comment on lines +38 to +43
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"

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.

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.

@minimal-foundry minimal-foundry Bot removed the review:approved minimal-review approved the current head label Oct 9, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 9, 2026
Merged via the queue into main with commit d626cc6 Oct 9, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the feat/macos-app-icon branch October 9, 2026 23:09
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.

2 participants