Skip to content

fix(serving): static pages can use embedded fonts - #576

Merged
allisonmahmood merged 2 commits into
mainfrom
look/564-tier0-fonts
Oct 7, 2026
Merged

allisonmahmood merged 2 commits into
mainfrom
look/564-tier0-fonts

Conversation

@allisonmahmood

Copy link
Copy Markdown
Owner

A tier 0 page can't use a web font. Its content policy has no font-src, so default-src 'none' blocks every font, even one embedded as a data: URL. Tiers 1 and 2 already allow embedded fonts.

Tier 0's policy now allows font-src data:. The change is in shell-headers.ts, which both the hosted shell (the srcdoc wrapper and /~content) and patchy dev use. Remote fonts stay blocked, so a company font reaches a page only inside the page's own bytes. That means no new route, and every version stays self-contained.

  • A new accepted fixture, embedded-font.html, uses a Latin subset of Inter (OFL) as a data: @font-face. The HTML policy tests, the repo bundle check at tiers 0 and 1, and pnpm seed:dev all read it.
  • The Serving glossary and ADR-0010 now say how a font reaches a tier 0 page.

Checked in a dev environment (pnpm dev up team, publishing as Ada):

  • Hosted: the fixture published as a file patch renders in Inter with no browser errors. A page whose @font-face points at an https: URL falls back to serif, and Chrome reports violates … "font-src data:".
  • Local: a tier 0 repo running the fixture under patchy dev loads the font (FontFace.status is loaded) and its shell sends font-src data:. In repo mode a remote font never reaches the browser, because the bundle check refuses it (<style>: external CSS url()).

Closes #564

Built by Claude Opus 5.5 in Claude Code, running in T3 Code.

allisonmahmood and others added 2 commits October 7, 2026 04:39
Tier 0's content policy had no font-src, so default-src 'none' blocked
every font, even a data: one. Allow data: fonts in the policy the hosted
shell and the local runtime share; remote fonts stay blocked.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Inter's Latin subset (OFL) as a data: @font-face, read by the policy
tests, the repo bundle check and pnpm seed:dev.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions github-actions Bot added area:server Touches the server area area:cli Touches the cli area area:core Touches the core area area:docs Touches the docs area size:s Under 100 changed lines labels Oct 7, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Review round 1 (stack orchestration for #547): one GPT-6.1 Sol reviewer plus the orchestrator's own read of the diff. No findings. The policy change sits in the one constant every tier 0 render path shares (address shell, /~content, local patchy dev); the fixture reaches the policy tests, the dev seed and the repo bundle test; the glossary and ADR-0010 are updated. Verdict: ready to merge once #577 and the rest of the stack are reviewed, so the stack lands bottom-up.

Posted by Claude Fable 5.1 (orchestrator) in Claude Code, running in T3 Code.

@allisonmahmood
allisonmahmood merged commit 98169b3 into main Oct 7, 2026
13 checks passed
@allisonmahmood
allisonmahmood deleted the look/564-tier0-fonts branch October 7, 2026 14:38
@allisonmahmood
allisonmahmood restored the look/564-tier0-fonts branch October 7, 2026 14:39
@allisonmahmood
allisonmahmood deleted the look/564-tier0-fonts branch October 7, 2026 14:39
allisonmahmood added a commit that referenced this pull request Oct 7, 2026
Release 8 of What's new, written for the deploy of the company look
stack (#547, first build). It covers everything merged after release 7's
`through`.

- **New: Your tools can look like your company** — #577, #579
- **New: Preview a look before you publish it** — #578
- **New: Setting up Patchy sets up your look** — #598 (the rebased
replacement for #582)
- **Improved: Patches hear when the look changes** — #581
- **Improved: Static pages can use embedded fonts** — #576
- Behind the scenes: the personal style file retires (#598)

Written by Claude Fable 5.1 in Claude Code, running in T3 Code.

Co-authored-by: Claude Fable 5.1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:cli Touches the cli area area:core Touches the core area area:docs Touches the docs area area:server Touches the server area size:s Under 100 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(serving): static pages can use embedded fonts

1 participant