Repository navigation
MUL-8701 chore(brand): commit the asset generator and check the wordmark copies stay in sync - #10056
Merged
Merged
Conversation
…ark copies stay in sync scripts/brand/generate.mjs (pnpm generate:brand) rebuilds every logo file from packages/ui/lib/multica-brand.ts: desktop PNG/ICO/ICNS, PWA, maskable and apple-touch icons, the mobile app icon, the OG card, and the README GIFs. On the current tree it reproduces all 20 committed bitmaps byte for byte. It uses the repo's Playwright with the full Chrome for Testing build; the default headless shell antialiases differently. scripts/brand/sync.mjs writes the text copies: favicons, the PWA icon source, the README SVGs, the mobile wordmark (between GENERATED markers) and the CLI login page's inline SVG. It has no dependencies, so the script-checks CI job runs it with --check, plus a test that moves a coordinate and expects the check to fail. Co-authored-by: multica-agent <github@multica.ai> Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…top GIF frames flickering between runs sync.mjs hard-coded rx=22.5 for the favicons and the rendered tiles, so changing ICON_TILE_RADIUS passed the check and left every icon at 22.5. Both now read the constant, and sync.test.mjs covers a radius change alongside the wordmark coordinate. The GIF capture now waits two animation frames after each seek: without it a few frames of the star spin kept pixels from the previous frame, differently on every run. The README now says what remains: GPU rasterisation occasionally moves one PNG pixel by one step, and the headless shell differs because it rasterises in software. Co-authored-by: multica-agent <github@multica.ai> Co-authored-by: Cursor <cursoragent@cursor.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The logo changed twice in a week (MUL-8444, then MUL-8687 / #10051). Both times, every icon, favicon, OG image and README logo was rebuilt by a script that never entered the repo. The wordmark also had two hand-maintained copies outside
@multica/ui: the mobileMulticaLogoand the inline SVG on themultica logincallback page. Nothing failed when either drifted.This PR commits the generator and adds a CI check on the copies.
pnpm generate:brand(scripts/brand/generate.mjs) rebuilds every brand asset frompackages/ui/lib/multica-brand.ts. On the current tree it reproduces all 20 committed bitmaps byte for byte: the desktop PNGs,.icoand.icns, the PWA, maskable and apple-touch icons, the mobile app icon, the OG card, and both README GIFs. The one exception is that GPU rasterisation occasionally moves a single PNG pixel by one step (see the README).scripts/brand/sync.mjswrites the text copies: favicons, the PWA icon source, the README SVGs, the mobile wordmark block, and the CLI login SVG. It has no dependencies, so thescript-checksCI job runs it with--check. Changing a coordinate inmultica-brand.tswithout regenerating now fails CI and names each file that drifted.The starting point was the MUL-8687 generator. I ported it to import the repo's
multica-brand.tsand Playwright, took Inter from@fontsource-variable/interinstead of an inlined base64 font, and removed the unused graphite-glass code path.One finding matters for anyone who reruns this. The committed bitmaps were rasterised on the GPU. Playwright's default headless shell, like
--disable-gpu, rasterises in software, and every bitmap changes. The full Chrome for Testing build (channel: "chromium") reproduces the committed files, on both Chromium 1208 (the repo's Playwright 1.58) and 1223.Related Issue
MUL-8701
Type of Change
Changes Made
scripts/brand/sync.mjs: the text copies, plus--check.scripts/brand/sync.test.mjs: the committed copies match. In a temp copy ofmultica-brand.ts, movinggapmakes the check fail on the mobile, CLI and README files, and changingICON_TILE_RADIUSmakes it fail on both favicons. Regenerating clears it.scripts/brand/generate.mjs: renders the bitmaps in Chromium. It then callspack.py(Pillow) for the.icoand the GIFs,iconutilfor the.icns, andoxipngon every PNG.scripts/brand/README.md: prerequisites (Node 22.18+, Playwright Chromium, Pillow, oxipng,iconutil), the output table, and the GIF capture caveat. Frames are captured by pausing and seeking each animation, because transform animations don't advance under CDP virtual time.apps/mobile/components/brand/multica-logo.tsx: the geometry now sits betweenGENERATEDmarkers. The stroke width comes fromWORDMARK_STROKEinstead of a literal16.server/cmd/multica/cmd_auth.go,packages/ui/lib/multica-brand.ts: comments pointing at the generator.script-checks. Thescriptspath filter now covers the brand source, every copy andscripts/brand/**, with matching cases inci-scope.test.mjs.knipcoversscripts/brand/*.mjs.No asset changes.
How to Test
node scripts/brand/sync.mjs --check && node --test scripts/brand/sync.test.mjs(also passes on Node 22.23).const asc = 30;inmultica-brand.ts, then runnode scripts/brand/sync.mjs --check. It exits 1 and lists the mobile, CLI and two README SVG files.pnpm exec playwright install chromium && pnpm generate:brand, thengit status. The tree stays clean, apart from the occasional one-pixel GPU noise the README describes.Checklist
knipalready fails onmain; its output is identical with this branch.