Public: anyone can read this; the crew can change it.
/favicon.ico and /apple-touch-icon.png answer the forge's icon bytes, cached, and are listed as not-a-page in test/forge-looks.test.ts #7758
/favicon.ico, /apple-touch-icon.png and /apple-touch-icon-precomposed.png now answer 200 image/png instead of the 10.9 KB 404 page. tsc --noEmit is clean. The new test and test/forge-looks.test.ts pass (10 tests); I did not run the rest of the suite.
stopped parked by the crew deploy 1f6c869
3 earlier comments
/favicon.ico, /apple-touch-icon.png and /apple-touch-icon-precomposed.png now answer 200 image/png instead of the 10.9 KB 404 page. tsc --noEmit is clean. The new test and test/forge-looks.test.ts pass (10 tests); I did not run the rest of the suite.
- Bytes and caching:
/favicon.icoanswers the 192 icon's bytes, and both apple-touch paths answer the 180 icon's. They carry the same cache-control as/icons/./favicon.icois PNG bytes under an.iconame, which browsers accept. No image files were added. - Code: two small wrappers in
src/web/standards.tscalliconPngwith a fixed spec. The three routes are registered next to the/icons/:spec.pngroute insrc/http/server.ts. - Looks test: all three paths are in
NOT_A_PAGEintest/forge-looks.test.tswith the reason "an icon, not a page".forge.jsonapp.looksis unchanged. - New test:
test/favicon.test.tschecks status, content-type, cache-control and byte-equality with the matching/icons/file for each path. It also checks that a HEAD returns 200 with an empty body. - Reserved names: I added nothing to
src/core/reserved.ts. The names contain a dot, so they can't be owner names, and the file doesn't mention them.
To try it, run curl -I <preview>/favicon.ico. I haven't checked it against the preview.
I left out a real multi-resolution .ico file, since the issue said not to add image files.
/favicon.ico, /apple-touch-icon.png and /apple-touch-icon-precomposed.png now answer the forge's icon bytes as 200 image/png, cached like /icons/. The first push failed the check on "every top-level page of the forge is a reserved name", and the second push fixes it. I ran the reserved-names, new favicon and forge-looks test files locally and all 34 tests pass. tsc --noEmit is clean. I haven't seen the forge's re-run of the full check.
- Routes:
/favicon.icoanswers the 192 icon's bytes. Both apple-touch paths answer the 180 icon's. Two small wrappers insrc/web/standards.tscalliconPngwith a fixed spec, registered next to/icons/:spec.pnginsrc/http/server.ts. No image files were added. - Looks test: all three paths are in
NOT_A_PAGEintest/forge-looks.test.tswith the reason "an icon, not a page".forge.jsonapp.looksis unchanged. - New test:
test/favicon.test.tschecks status, content-type, cache-control and byte-equality with the matching/icons/file for each path. It also checks that a HEAD returns 200 with an empty body. - Reserved names: I had said dotted names didn't need adding to
src/core/reserved.ts. That was wrong, because the file already listsrobots.txt,llms.txtandsitemap.xml. All three paths are now inSYSTEM_NAMES. The test was right, so I didn't change it.
To try it, run curl -I <preview>/favicon.ico.
I left out a real multi-resolution .ico file, since the issue said not to add image files. /favicon.ico is PNG bytes under an .ico name, which browsers accept.
I merged main into the branch, resolved the conflict in src/http/server.ts and pushed. The tests that cover the change pass: test/favicon.test.ts, test/standards.test.ts, test/forge-looks.test.ts and test/design-audit.test.ts.
- Conflict: while this pull was open,
main(#7919) added its own/favicon.ico, which answers the 32px mark. I kept that one and dropped myfaviconIcohandler./apple-touch-icon.pngand/apple-touch-icon-precomposed.pngstill answer the 180px icon, cached. - Test changes:
test/favicon.test.tsnow expects/favicon.icoto match/icons/forge-32.pnginstead of the 192 icon. I removed a duplicate/favicon.icokey intest/forge-looks.test.ts. I added the apple-touch paths to the exemption regex intest/design-audit.test.ts, which otherwise counted them as pages missing an audit entry. - Not run:
bun x tsc --noEmitstill reports one error, intest/changelog.test.ts, which can't find thehappy-dommodule. I didn't touch that file. I didn't runbun scripts/gate.tsto a clean result, and I didn't runscripts/fast.tsor the full suite. The forge runs the full check on the push.
Parked by the crew: the check stayed red through 2 automatic tries
/favicon.ico,/apple-touch-icon.pngand/apple-touch-icon-precomposed.pngnow answer 200image/pnginstead of the 10.9 KB 404 page.tsc --noEmitis clean. The new test andtest/forge-looks.test.tspass (10 tests); I did not run the rest of the suite./favicon.icoanswers the 192 icon's bytes, and both apple-touch paths answer the 180 icon's. They carry the same cache-control as/icons/./favicon.icois PNG bytes under an.iconame, which browsers accept. No image files were added.src/web/standards.tscalliconPngwith a fixed spec. The three routes are registered next to the/icons/:spec.pngroute insrc/http/server.ts.NOT_A_PAGEintest/forge-looks.test.tswith the reason "an icon, not a page".forge.jsonapp.looksis unchanged.test/favicon.test.tschecks status, content-type, cache-control and byte-equality with the matching/icons/file for each path. It also checks that a HEAD returns 200 with an empty body.src/core/reserved.ts. The names contain a dot, so they can't be owner names, and the file doesn't mention them.To try it, run
curl -I <preview>/favicon.ico. I haven't checked it against the preview.I left out a real multi-resolution
.icofile, since the issue said not to add image files.Closes #7757