Public: anyone can read this; the crew can change it.

Give the app its own icon in the browser tab and on a phone home screen #16

Merged opened this

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

Merged

The app now has its own icon in the browser tab and for phone home screens, and /favicon.ico no longer 404s. src/server.test.ts passes (26 tests) and bun run lint:design is clean. I did not run bun x tsc --noEmit, because the repo has no tsconfig.json and it only printed its help text.

Notes

shipped production is serving it deploy aba151a

opened this

The app now has its own icon in the browser tab and for phone home screens, and /favicon.ico no longer 404s. src/server.test.ts passes (26 tests) and bun run lint:design is clean. I did not run bun x tsc --noEmit, because the repo has no tsconfig.json and it only printed its help text. The type check and the rest of the suite are left to the forge. scripts/fast.ts and scripts/gate.ts don't exist in this clone, so neither ran.

  • Icon: static/icon.svg (287 bytes) is a clock face in the design/tokens.json accent and bg colours. The hex values in it are copied from the tokens, not referenced, so a token change won't update the icon.
  • Home screen: static/apple-touch-icon.png is 180×180, drawn from the same mark. I generated it with a throwaway script, so no image tool or dependency is involved, and the script is not committed.
  • Layout: src/pages/layout.ts replaces the empty data:, icon with the SVG icon link, the touch-icon link and <meta name="apple-mobile-web-app-title" content="Speed to Lead">. Both links go through asset, so both are cached as immutable.
  • /favicon.ico: src/routes.ts answers with a 302 to the versioned /static/icon.svg?v=…, with the usual security headers. staticFile is unchanged, so paths outside static/ are still refused.
  • Test: one new test in src/server.test.ts checks that the pages link both icons and the title meta. It also checks that the SVG and PNG answer with the right content types, that the SVG carries nosniff, and that /favicon.ico redirects to the versioned icon with nosniff.
  • Not done: I did not add <link rel="shortcut icon">, a web manifest or other PNG sizes, since the issue didn't ask for them. CSP, dependencies and contract.json are untouched.

To try it, open any page and look at the tab, or request /favicon.ico and follow the redirect.

🤖 Generated with Claude Code

Closes #14

commented

The app now has its own icon in the browser tab and for phone home screens, and /favicon.ico no longer 404s. src/server.test.ts passes (26 tests) and bun run lint:design is clean. I did not run bun x tsc --noEmit, because the repo has no tsconfig.json and it only printed its help text. The type check and the rest of the suite are left to the forge. scripts/fast.ts and scripts/gate.ts don't exist in this clone, so neither ran.

  • Icon: static/icon.svg (287 bytes) is a clock face in the design/tokens.json accent and bg colours. The hex values in it are copied from the tokens, not referenced, so a token change won't update the icon.
  • Home screen: static/apple-touch-icon.png is 180×180, drawn from the same mark. I generated it with a throwaway script, so no image tool or dependency is involved, and the script is not committed.
  • Layout: src/pages/layout.ts replaces the empty data:, icon with the SVG icon link, the touch-icon link and <meta name="apple-mobile-web-app-title" content="Speed to Lead">. Both links go through asset, so both are cached as immutable.
  • /favicon.ico: src/routes.ts answers with a 302 to the versioned /static/icon.svg?v=…, with the usual security headers. staticFile is unchanged, so paths outside static/ are still refused.
  • Test: one new test in src/server.test.ts checks that the pages link both icons and the title meta. It also checks that the SVG and PNG answer with the right content types, that the SVG carries nosniff, and that /favicon.ico redirects to the versioned icon with nosniff.
  • Not done: I did not add <link rel="shortcut icon">, a web manifest or other PNG sizes, since the issue didn't ask for them. CSP, dependencies and contract.json are untouched.

To try it, open any page and look at the tab, or request /favicon.ico and follow the redirect.

🤖 Generated with Claude Code

Approved

Clean. Icon, touch icon and title meta are linked through asset (immutable cache), /favicon.ico redirects with security headers, static path guard untouched, no contract or dependency change, test covers the behaviour, and the preview serves all of it. No security findings.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs