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

An app's /__forge/ door reads in the reader's colour scheme, dark included #6653

shipped production is serving it opened this has it
opened this

The door's inline style is light-only (pre is #eee on #111 text), so on a dark phone it is a white flash; it should follow prefers-color-scheme as the forge's own pages do.

Done:

  • [ ] The door's STYLE declares color-scheme: light dark and a dark @media (prefers-color-scheme: dark) rule for body, links and pre; the CSP's style hash is still computed from STYLE, so the page stays script-free and styled
  • [ ] A new test asserts the served page's CSP style-src hash matches the sha256 of its one <style> block, and that the dark rule is present

Files: src/apps/door.ts, test/door-scheme.test.ts

Risks: a hand-written hash would break the style silently; keep it derived from STYLE.

Before pushing: bun x tsc --noEmit and bun test test/door-scheme.test.ts test/apps-door.test.ts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs