feat(brand): render the dashboard and documentation favicons from the app icon vector - #5361
Conversation
… app icon vector docs-site/public/favicon.png was the dark variant of the mark: white on transparency, 36225 of 36864 pixels carrying alpha but every one of them RGB (255,255,255), exactly one fully opaque pixel, corner alpha 3. Composited on white it is a white square, and a browser tab strip is light by default, so the documentation site effectively had no favicon in light mode. favicon.ico beside it carried the same artwork at 16, 32 and 48. gui/public/favicon.png looked right at 128 but was a bitmap no source could regenerate, and it was the shaded artwork whose engraved prompt all but disappears at 16 and 32. Both are now rendered from desktop/src-tauri/icons/icon.svg at the names, sizes and formats the two sites already reference, so neither page nor config changes. The renderer, the RGBA re-encode and the ICO packer move into scripts/lib/icon-render.ts so the two generators share them rather than keeping a second place for the alpha bug to come back. The test decodes pixels because an opaque corner alone is not enough: a plain white square has an opaque corner and is still invisible. It requires an opaque light corner and at least 10% of the image to be opaque pixels whose luminance differs from that corner by more than 64. Both ways of being invisible were applied and each turns it red. Starlight's logo-light.png and logo-dark.png stay as they are — they are the artwork the vector was traced from. og.png also stays, with its own pre-existing mismatch recorded: the config declares 1200x630 and the file is 1536x1024.
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 (4)
📒 Files selected for processing (8)
✨ 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 |
Summary
docs-site/public/favicon.pngwas the dark variant of the mark: white on transparency, 192px, 36225 of 36864 pixels carrying some alpha but every one of them RGB(255,255,255), exactly one fully opaque pixel, corner(255,255,255,3). Composited on white it is a white square, and a browser tab strip is light by default, so the documentation site effectively had no favicon in light mode.favicon.icobeside it carried the same artwork at 16, 32 and 48, also with no fully opaque pixel.desktop/src-tauri/icons/icon.svgat the names, sizes and formats the two sites already reference, so neither page nor config changes.scripts/lib/icon-render.tsso both generators share them. A second copy of the PNG re-encode would be a second place for the alpha bug in fix(desktop): keep the alpha channel every generated icon needs #5356 to come back.logo-light.pngandlogo-dark.pngstay as they are, since they are the artwork the vector was traced from rather than derived assets.og.pngalso stays, and carries its own pre-existing mismatch — the config declares 1200x630 and the file is 1536x1024.Rationale and measurements:
devlog/_plan/260921_brand_icon_and_menu_bar_mark/010_favicons.md.Verification
bun run faviconsthenbun run favicons:check— 3 favicons regenerated, 3 matching.cd desktop && bun run icons:check— 18 matching, so the extraction did not change the app icon bytes.bun test tests/ci-workflows/brand-favicons.test.ts tests/ci-workflows/build-desktop-icon-set.test.ts tests/test-layout.test.ts tests/test-layout-tooling.test.ts— 30 pass, 0 fail.#fcfcfcsquare gives 3 pass / 1 fail. The generated favicons give 4 pass / 0 fail.bun run privacy:scanandbun run structure:checkpass.Checklist