Skip to content

feat(brand): render the dashboard and documentation favicons from the app icon vector - #5361

Merged
lidge-jun merged 2 commits into
devfrom
codex/260921-brand-favicons
Sep 20, 2026
Merged

lidge-jun merged 2 commits into
devfrom
codex/260921-brand-favicons

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

Summary

  • docs-site/public/favicon.png was 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.ico beside it carried the same artwork at 16, 32 and 48, also with no fully opaque pixel.

docs-site favicon before and after on a light tab strip

  • The dashboard favicon 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. Rendering the vector at 128 differs from it in 68% of pixels — a visible simplification, the same trade the app icon made in feat(desktop): draw the app icon and menu bar mark from the brand artwork #5355.
  • 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 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.
  • 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.
  • Out of scope, recorded rather than fixed: Starlight's logo-light.png and logo-dark.png stay as they are, since they are the artwork the vector was traced from rather than derived assets. og.png also 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 favicons then bun 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.
  • Non-vacuous, both ways of being invisible applied one at a time: the white-on-transparent artwork this replaces gives 3 pass / 1 fail, and a solid #fcfcfc square gives 3 pass / 1 fail. The generated favicons give 4 pass / 0 fail.
  • bun run privacy:scan and bun run structure:check pass.
  • Full suite and typecheck 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.

… 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.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 20, 2026 17:07
@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-20T17:10:02.586564Z 3fa1729 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: 681c717a-c4a5-414f-957a-bb8a472cdb4b

📥 Commits

Reviewing files that changed from the base of the PR and between 480c1c7 and 3fa1729.

⛔ Files ignored due to path filters (4)
  • assets/pr-screenshots/favicon-light-tab.png is excluded by !**/*.png
  • docs-site/public/favicon.ico is excluded by !**/*.ico
  • docs-site/public/favicon.png is excluded by !**/*.png
  • gui/public/favicon.png is excluded by !**/*.png
📒 Files selected for processing (8)
  • desktop/scripts/generate-icons.ts
  • devlog/_plan/260921_brand_icon_and_menu_bar_mark/010_favicons.md
  • package.json
  • scripts/brand-favicons.ts
  • scripts/lib/icon-render.ts
  • scripts/test-layout/layout.json
  • tests/ci-workflows/brand-favicons.test.ts
  • tests/fixtures/test-layout-expected.json
 __________________________________________________________________________________________________________________________________________________
< I've got a very particular set of skills. Skills I have acquired over a very long career. Skills that make me a nightmare for bugs in your code. >
 --------------------------------------------------------------------------------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( 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 917d690 into dev Sep 20, 2026
33 of 34 checks passed
@lidge-jun
lidge-jun deleted the codex/260921-brand-favicons branch September 20, 2026 17:08
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