Skip to content

feat(desktop): draw the app icon and menu bar mark from the brand artwork - #5355

Merged
lidge-jun merged 1 commit into
devfrom
codex/260921-icon-and-runtime
Sep 20, 2026
Merged

lidge-jun merged 1 commit into
devfrom
codex/260921-icon-and-runtime

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

Summary

  • The macOS app icon was the Tauri template's empty rounded-square ring, and the vector source added for it in feat(desktop): generate every app icon from one SVG source #5329 reproduced that ring faithfully — the measurement was right, the subject was wrong. The artwork covered 21.4% of the 1024px canvas and had transparent corners, so macOS classified it as a uniquely shaped icon and scaled it down onto a default grey tile. Finder showed a grey square with a small black ring in it, and the menu bar carried the same ring.
  • The mark is now the product's actual mark, traced from the alpha channel of 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%).
  • The > 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.
  • The backdrop is a full-bleed opaque square rather than a pre-rounded tile. Apple's current app icon guidance asks for a square, unmasked, full-bleed source and applies the rounded-rectangle mask and material itself; a baked corner fights that, and the transparent margin is exactly what triggered the grey fallback. icon.png goes from 21.4% opaque to 100%.
  • desktop/src-tauri/icons/tray/icon.svg is 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.ts renders it to tray/icon.png at 44px (22pt at @2x) and covers it in --check, so the menu bar image stops being a hand-maintained raster. tray.rs already builds the tray with .icon_as_template(true) and is unchanged.
  • The two new tests require the generator to actually render and report the tray output, 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. 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.
  • Non-vacuous, five mutations applied and run one at a time: removing the generator's tray render, removing its produced.push, removing mask="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.
  • Measured on the committed artifacts: icon.png fully opaque; tray/icon.png 44x44 with 759 pixels above zero alpha, 498 of them fully opaque, and no pixel with alpha whose colour is anything but black.
  • Full suite, typecheck and a desktop build were NOT run here; hosted CI is the gate for those.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

…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.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 20, 2026 16:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-20T16:34:53.174573Z a5c636f PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the enhancement New feature or request label Sep 20, 2026
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 5cdc5619-5139-4ab8-88ef-148b8d6b5d78

📥 Commits

Reviewing files that changed from the base of the PR and between 07e2ac9 and a5c636f.

⛔ Files ignored due to path filters (19)
  • desktop/src-tauri/icons/128x128.png is excluded by !**/*.png
  • desktop/src-tauri/icons/128x128@2x.png is excluded by !**/*.png
  • desktop/src-tauri/icons/32x32.png is excluded by !**/*.png
  • desktop/src-tauri/icons/64x64.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square107x107Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square142x142Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square150x150Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square284x284Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square30x30Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square310x310Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square44x44Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square71x71Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square89x89Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/StoreLogo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/icon.ico is excluded by !**/*.ico
  • desktop/src-tauri/icons/icon.png is excluded by !**/*.png
  • desktop/src-tauri/icons/icon.svg is excluded by !**/*.svg
  • desktop/src-tauri/icons/tray/icon.png is excluded by !**/*.png
  • desktop/src-tauri/icons/tray/icon.svg is excluded by !**/*.svg
📒 Files selected for processing (4)
  • desktop/scripts/generate-icons.ts
  • desktop/src-tauri/icons/icon.icns
  • devlog/_plan/260921_brand_icon_and_menu_bar_mark/000_plan.md
  • tests/ci-workflows/build-desktop-icon-set.test.ts
 __________________________________________________________
< This abstraction leaks more than a sieve in a rainstorm. >
 ----------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

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

@lidge-jun
lidge-jun merged commit a2d35a6 into dev Sep 20, 2026
23 of 26 checks passed
@lidge-jun
lidge-jun deleted the codex/260921-icon-and-runtime branch September 20, 2026 16:31

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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"/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant