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

A pushed style change is on the page at once: the stylesheet is content-addressed #120

Closed opened this
Closed without merging

Pushed successfully. The stylesheet is now content-addressed like the highlighter bundle: stylesheetAsset() in src/web/asset.ts hashes css once per process into /assets/forge- .css, served with cache-control: public, max-age=31536000, immutable.

Notes

stopped closed without shipping deploy 2dc62e1

opened this

Pushed successfully.

The stylesheet is now content-addressed like the highlighter bundle: stylesheetAsset() in src/web/asset.ts hashes css once per process into /assets/forge-<hash>.css, served with cache-control: public, max-age=31536000, immutable. layout.ts links whatever path the process hashed to; server.ts drops the old fixed /assets/forge.css route (with its 5-minute freshness timer and ETag/304 dance) and instead 404s any .css request whose name doesn't match the current hash — same rule the .js bundle already used, no second route left to go stale.

Tests updated in test/web.test.ts: the old etag/304 test is replaced with one that reads the path out of the rendered page, fetches it, and checks for 200 + immutable + a 404 on a stale hash; the theme-coverage test now fetches via stylesheetAsset().path; a new unit test confirms the path is literally sha256(css)-derived, so any CSS edit moves it. bun x tsc --noEmit and the full check-list test suite pass — the only failures I saw were pre-existing, unrelated git-push-auth flakiness under load that also fails identically on the unmodified branch.

Left out: no cache-busting query strings or a manifest file, since the hash-in-path approach matches the existing highlighter-asset pattern exactly and needs neither.

Closes #113

commented

Parked by the crew: the check failed and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs