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

The browser tab and a phone's home screen show the deal-clock mark, not a blank icon #50

Merged opened this

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

Merged

The tab, a bookmark and "Add to Home Screen" now show the deal-clock mark beside the app's name, where the blank data:, icon was before. What changed Icon: static/icon.svg is a hand-written copy of the header's brand mark: a clock ring with two hands on a rounded tile. The strokes are thick so it reads at 16 px.

Notes

shipped production is serving it deploy d2eada7

opened this

The tab, a bookmark and "Add to Home Screen" now show the deal-clock mark beside the app's name, where the blank data:, icon was before.

What changed

  • Icon: static/icon.svg is a hand-written copy of the header's brand mark: a clock ring with two hands on a rounded tile. The strokes are thick so it reads at 16 px. A prefers-color-scheme: dark block inside the SVG switches the dark colours.
  • Colours: The SVG holds the token values spelled out, because an icon file can't read CSS variables. A test checks that both the light and dark color-bg and color-accent values appear in it, so it fails if the tokens drift. lint:design doesn't scan .svg files, so it can't catch this itself.
  • Layout: src/pages/layout.ts links the icon as rel=icon type=image/svg+xml using asset("icon.svg"), which gives it the same ?v= hash and immutable caching as the stylesheets. It also links /manifest.webmanifest.
  • Favicon: GET /favicon.ico answers with a 302 to the hashed icon address, carrying the security headers.
  • Manifest: GET /manifest.webmanifest is served as application/manifest+json with the security floor's headers.

- It has name, short_name (both the app title), description, start_url: "/", scope: "/" and display: "standalone". - theme_color and background_color are both the light color-bg token. - It lists the icon with sizes: "any".

  • CSP: The existing policy already allows the icon (same origin), so it is unchanged.
  • Tests: One new test in src/server.test.ts covers the following:

- The layout no longer contains data:,. - The icon, /favicon.ico and the manifest each answer with the right status and content type. - The manifest parses, and its colours equal the tokens.

  • README: The walk gains item 16, "Put it on your phone". It sits after the existing item 15, so it shifts nothing.

contract.json is untouched and no dependency was added.

Not done

  • No PNG icons. Older iOS versions ignore an SVG home-screen icon and fall back to a page screenshot. An SVG was what the issue asked for, and a PNG would need a generator or a binary file in the repo.
  • No separate dark-scheme manifest colours. A manifest can only carry one pair, so both are the light background.

Checks

  • bun run lint:design is clean.
  • bun test passed for src/server.test.ts, src/design.test.ts and src/openapi.test.ts (50 tests).
  • bun x tsc --noEmit only printed tsc's help text here: the repo has no tsconfig.json, so I couldn't type-check.
  • scripts/gate.ts and scripts/fast.ts don't exist in this clone, so I ran neither.

To try it: open the preview at /, where the tab shows the mark. Then request /favicon.ico and /manifest.webmanifest.

🤖 Generated with Claude Code

Closes #48

commented

The tab, a bookmark and "Add to Home Screen" now show the deal-clock mark beside the app's name, where the blank data:, icon was before.

What changed

  • Icon: static/icon.svg is a hand-written copy of the header's brand mark: a clock ring with two hands on a rounded tile. The strokes are thick so it reads at 16 px. A prefers-color-scheme: dark block inside the SVG switches the dark colours.
  • Colours: The SVG holds the token values spelled out, because an icon file can't read CSS variables. A test checks that both the light and dark color-bg and color-accent values appear in it, so it fails if the tokens drift. lint:design doesn't scan .svg files, so it can't catch this itself.
  • Layout: src/pages/layout.ts links the icon as rel=icon type=image/svg+xml using asset("icon.svg"), which gives it the same ?v= hash and immutable caching as the stylesheets. It also links /manifest.webmanifest.
  • Favicon: GET /favicon.ico answers with a 302 to the hashed icon address, carrying the security headers.
  • Manifest: GET /manifest.webmanifest is served as application/manifest+json with the security floor's headers.

- It has name, short_name (both the app title), description, start_url: "/", scope: "/" and display: "standalone". - theme_color and background_color are both the light color-bg token. - It lists the icon with sizes: "any".

  • CSP: The existing policy already allows the icon (same origin), so it is unchanged.
  • Tests: One new test in src/server.test.ts covers the following:

- The layout no longer contains data:,. - The icon, /favicon.ico and the manifest each answer with the right status and content type. - The manifest parses, and its colours equal the tokens.

  • README: The walk gains item 16, "Put it on your phone". It sits after the existing item 15, so it shifts nothing.

contract.json is untouched and no dependency was added.

Not done

  • No PNG icons. Older iOS versions ignore an SVG home-screen icon and fall back to a page screenshot. An SVG was what the issue asked for, and a PNG would need a generator or a binary file in the repo.
  • No separate dark-scheme manifest colours. A manifest can only carry one pair, so both are the light background.

Checks

  • bun run lint:design is clean.
  • bun test passed for src/server.test.ts, src/design.test.ts and src/openapi.test.ts (50 tests).
  • bun x tsc --noEmit only printed tsc's help text here: the repo has no tsconfig.json, so I couldn't type-check.
  • scripts/gate.ts and scripts/fast.ts don't exist in this clone, so I ran neither.

To try it: open the preview at /, where the tab shows the mark. Then request /favicon.ico and /manifest.webmanifest.

🤖 Generated with Claude Code

commented

I've fixed the three failing tests and pushed the fix. The full bun test passed three times in a row here (no failures), and lint:design is clean. I haven't seen the forge's check on the new push yet.

Cause: Every test file runs in one process, so they share the rate-limit counters in src/security.ts. The failures were 429 too many requests where the audit tests expected 401, plus a paging test that had no rows to read after its own requests were refused.

I couldn't find out why my change tipped it over, because it adds no API calls or writes. The audit tests failed on my branch once here and passed three times afterwards, so this looks timing-dependent. The extra test I added shifts the timing, which is a plausible trigger, but I haven't shown that.

Change:

  • src/security.ts has a new forgetRationing() that empties the counters. It's meant for tests.
  • src/audit.test.ts calls it before each test, so those tests start with full allowances whatever the other files used. Their assertions are unchanged.

No icon, favicon or manifest code changed in this push.

Approved

Clean. The icon, /favicon.ico redirect and manifest all answer correctly on the preview with the security headers. The icon is hash-cached, a test pins the colours to the tokens, and contract.json is untouched. No new dependency. The forgetRationing test helper is small and justified by the flaky audit tests. Nit, not blocking: add crossorigin="use-credentials" to the manifest link if the app is ever served behind sign-in, since manifest fetches omit cookies by default.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs