feat(desktop): draw the app icon and menu bar mark from the brand artwork - #5355
Conversation
…work The shipped icon was the Tauri template's empty rounded-square ring, and the vector source added for it reproduced that ring faithfully. The artwork covered 21.4% of the 1024px canvas with transparent corners, so macOS treated it as a uniquely shaped icon: Finder scaled it down onto a default grey tile. The menu bar carried the same ring. The mark is now traced from the alpha channel of the brand artwork — cloud, braces, orbit arcs and dots, nine subpaths, disagreeing with the source by 188 of 262144 pixels at 512px. The chevron and underscore are drawn rather than traced because the artwork engraves them (alpha 217+ against a 206 body), which reads as depth at 512px and as nothing at 32px; they are cut out of the mark by a mask, so the backdrop shows through and the menu bar template gets real holes instead of a black blob. The backdrop is a full-bleed opaque square. Apple asks for a square, unmasked source and applies its own mask and material; the transparent margin is what triggered the grey fallback. tray/icon.svg is the same curves with no backdrop and the orbit dropped, since a dashed circle resolves into grey specks at 22pt. generate-icons.ts renders it to tray/icon.png at 44px and covers it in --check, so the menu bar image stops being a hand-maintained raster. The tests require the generator to actually render and report it, and require the tray source to carry the app icon's mask verbatim, wire it onto the mark, and draw distinct curves that all appear in icon.svg.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✅ Deterministic PR hygiene checks passed. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (19)
📒 Files selected for processing (4)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5c636f17a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| </g> | ||
| </mask> | ||
| </defs> | ||
| <rect id="backdrop" x="0" y="0" width="1024" height="1024" fill="#fcfcfc"/> |
There was a problem hiding this comment.
Preserve rounded legacy icons for pre-Tahoe macOS
On macOS 13–15, the system displays the bundled ICNS artwork rather than applying the new macOS 26 full-bleed mask/material treatment, so this opaque edge-to-edge rectangle makes the Dock and Finder icon appear as a sharp white square. Those releases remain supported by desktop/src-tauri/tauri.conf.json (minimumSystemVersion: "13.0"). Keep a rounded, transparent legacy ICNS fallback while supplying the full-bleed artwork through a macOS 26-compatible icon mechanism, or otherwise generate platform/version-appropriate assets.
Useful? React with 👍 / 👎.
Summary
assets/logo-light.png: the six-lobed cloud, both braces, four orbit arcs and two dots, nine subpaths. Re-rendered at 512px the trace disagrees with the thresholded source in 188 of 262144 pixels (0.072%).>and_are drawn rather than traced. The artwork engraves them — alpha 217+ against a 206 body, with a lit rim on one edge — which reads as depth at 512px and as nothing at 32px, and thresholding the emboss gives a ragged chevron. They are redrawn as flat geometry on the measured centreline and cut out of the mark by a mask, so the backdrop shows through them and the menu bar template gets real holes instead of a black blob.icon.pnggoes from 21.4% opaque to 100%.desktop/src-tauri/icons/tray/icon.svgis new: the same curves, no backdrop, black and clear only, with the orbit and dots dropped because at 22pt a dashed circle resolves into grey specks.generate-icons.tsrenders it totray/icon.pngat 44px (22pt at @2x) and covers it in--check, so the menu bar image stops being a hand-maintained raster.tray.rsalready builds the tray with.icon_as_template(true)and is unchanged.icon.svg. Subset alone was too weak: every interesting way of breaking the tray removes something, so it stays a subset.Rationale and measurements:
devlog/_plan/260921_brand_icon_and_menu_bar_mark/000_plan.md.Verification
cd desktop && bun run icons— regenerated 18 artifacts from the two sources.cd desktop && bun run icons:check— 18 generated icons match the source, tray included.bun test tests/ci-workflows/build-desktop-icon-set.test.ts— 7 pass, 0 fail, 174 assertions.produced.push, removingmask="url(#prompt)"from the tray mark, deleting the underscore from the tray mask, and repeating a brace in place of the cloud. Each turns the suite red at 6 pass / 1 fail; the restored tree is 7 pass / 0 fail.icon.pngfully opaque;tray/icon.png44x44 with 759 pixels above zero alpha, 498 of them fully opaque, and no pixel with alpha whose colour is anything but black.Checklist