fix(gallery): use the WebJs brand favicon, not the demo placeholder - #1377
Merged
Conversation
#1375 fixed the blank tab by linking /icon, but that route is the metadata-route DEMO: it generates a placeholder grey "w", so the gallery rendered as a different product beside webjs.dev in a tab strip. Ship the website's committed brand assets in gallery/public/ and declare them through metadata.icons in the same shape and order the website uses, raster ahead of SVG for Google's favicon crawler. favicon.ico rides along unlinked; the framework serves it at the origin root for crawlers that read no markup, and it 404'd before. app/icon.ts stays as the dynamic-favicon demo, which is what it always was: the scaffold copies it into generated apps and gallery:clear prunes it with the other metadata routes. Its comment now says the gallery's own mark is the static one, so the route is not mistaken for live wiring. Move the test to the repo suite. It reads website/public/, which exists only here, and gallery/test/** is scaffold payload that copyGallery() copies into every generated app, where a stray directory also left gallery:clear unable to prune an empty test/ (red on main since #1375).
This was referenced Aug 10, 2026
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.
Follow-up to #1375, which fixed the blank tab with the wrong mark.
gallery/app/icon.tsis the metadata-route demo: it generates a placeholder grey "w" inline. #1375 linked it, so gallery.webjs.dev got a favicon that looks nothing like webjs.dev, and the gallery read as a separate product in a tab strip.What changes
The gallery now ships the website's committed brand assets in
gallery/public/(byte-identical:favicon.svg,favicon-192.png,apple-touch-icon.png,favicon.ico) and declares them throughmetadata.iconsin the same shape and order the website uses. The rendered head now matcheswebjs.devexactly:Raster first, because Google's favicon crawler takes the first usable icon and wants a square raster whose side is a multiple of 48px.
favicon.icoships unlinked: the framework serves it at the origin root for crawlers that read no markup, and it404'd before.app/icon.tsstays. It is a deliberate demo of the metadata-route surface, copied into generated apps bycopyGallery()and pruned bygallery:clearalongsideapple-icon.ts/manifest.ts/opengraph-image.ts, andtest/scaffolds/scaffold-gallery.test.js:86asserts scaffolded apps ship it. Its header comment now says the gallery's own mark is the static one inpublic/, so the route is not mistaken for live wiring.Two things #1375 got wrong beyond the mark
gallery/test/**is scaffold payload.copyGallery()copies it into every generated app, so #1375'sgallery/test/seo/shipped to users, and a stray directory there leftgallery:clearunable to prune an emptytest/.test/scaffolds/scaffold-gallery.test.jshas been red on main since #1375 (it was merged without waiting for CI, at my request). The test moves totest/repo-health/gallery-favicon.test.mjs, which is also where it belongs on the merits: it readswebsite/public/, which exists only in this repo.Tests
test/repo-health/gallery-favicon.test.mjs, five assertions, sitting besidesite-seo-tags.test.mjswhich covers the website's own icons:<link rel="icon">200with animage/*type/favicon.icoanswers at the origin rootwebsite/public/, the assertion that catches a placeholder, since 1 and 2 passed on fix(gallery): link the favicon the app already serves #1375's wrong markGreen locally, along with
test/scaffolds/scaffold-gallery.test.js(now fixed),test/repo-health/site-seo-tags.test.mjs, the gallery's own suite,webjs checkandwebjs typecheck.