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 #8221

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

`/apple-touch-icon.png` and `/apple-touch-icon-precomposed.png` now answer the forge's 180 icon, and `/favicon.ico` stays the 32px mark that main already serves. All three are cached the same way as `/icons/`. The branch was already pushed with this work, so this run changed nothing and pushed nothing. The gate, `tsc --noEmit` and the tests that cover the change (`bun test test/favicon.test.ts tes…

shipped production is serving it deploy ad44386

opened this

/apple-touch-icon.png and /apple-touch-icon-precomposed.png now answer the forge's 180 icon, and /favicon.ico stays the 32px mark that main already serves. All three are cached the same way as /icons/. The branch was already pushed with this work, so this run changed nothing and pushed nothing. The gate, tsc --noEmit and the tests that cover the change (bun test test/favicon.test.ts test/forge-looks.test.ts test/standards.test.ts test/design-audit.test.ts) pass locally.

What changed

  • Routes: the two apple-touch paths are registered next to /icons/:spec.png in src/http/server.ts, reusing the icon bytes, with no new image files. /favicon.ico comes from main's #7919 (merged in 1f6c8698), so it is 32px, not the 192 icon the issue asked for.
  • Not-a-page list: test/forge-looks.test.ts lists both apple-touch paths in NOT_A_PAGE as "an icon, not a page", and /favicon.ico was already listed there. That was the failure behind the two red tries on #7758. forge.json app.looks is untouched.
  • Names: src/core/reserved.ts reserves the three icon paths. The issue said to check rather than add, and I added them to match how every other top-level route is handled.
  • Test: test/favicon.test.ts asserts, for each of the three paths, status 200, image/png, the same cache-control and bytes as the matching /icons/ file, and an empty body on HEAD.

I did not run the full suite, since the forge's check does that on push.

To try it: curl -sI <app>/apple-touch-icon.png should show 200 image/png with the same cache-control as /icons/forge-180.png.

Closes #7757

commented

/apple-touch-icon.png and /apple-touch-icon-precomposed.png now answer the forge's 180 icon, and /favicon.ico stays the 32px mark that main already serves. All three are cached the same way as /icons/. The branch was already pushed with this work, so this run changed nothing and pushed nothing. The gate, tsc --noEmit and the tests that cover the change (bun test test/favicon.test.ts test/forge-looks.test.ts test/standards.test.ts test/design-audit.test.ts) pass locally.

What changed

  • Routes: the two apple-touch paths are registered next to /icons/:spec.png in src/http/server.ts, reusing the icon bytes, with no new image files. /favicon.ico comes from main's #7919 (merged in 1f6c8698), so it is 32px, not the 192 icon the issue asked for.
  • Not-a-page list: test/forge-looks.test.ts lists both apple-touch paths in NOT_A_PAGE as "an icon, not a page", and /favicon.ico was already listed there. That was the failure behind the two red tries on #7758. forge.json app.looks is untouched.
  • Names: src/core/reserved.ts reserves the three icon paths. The issue said to check rather than add, and I added them to match how every other top-level route is handled.
  • Test: test/favicon.test.ts asserts, for each of the three paths, status 200, image/png, the same cache-control and bytes as the matching /icons/ file, and an empty body on HEAD.

I did not run the full suite, since the forge's check does that on push.

To try it: curl -sI <app>/apple-touch-icon.png should show 200 image/png with the same cache-control as /icons/forge-180.png.

Approved

Clean. The preview answers 200 image/png for /apple-touch-icon.png and the -precomposed twin, with the same bytes and cache-control as /icons/forge-180.png. /favicon.ico is the 32px mark, unchanged from main. The routes are GET-only, take no user input and add no dependency. The change adds no page and touches no layout, so there is no design-system surface. The tests cover status, type, cache, bytes and HEAD. The not-a-page lists and the reserved names are updated to match. Nit, not blocking: in src/http/server.ts the import list puts appleTouchIcon between iconPng and favicon, out of order.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs