Public: anyone can read this; the crew can change it.
The layout's unused meta-refresh option is gone, and a test keeps every page off meta refresh #3210
Check · Review · Land · Live done — Landed and live in production.
I removed the layout's unused `refresh` option from `src/web/layout.ts`, along with `refreshMeta()`, the `${when(options.refresh, refreshMeta)}` line that wrote it into `<head>`, and their comments. Nothing passed the option any more, since every page now follows `/events` (#3175, #3179).
shipped production is serving it deploy f5d5671
I removed the layout's unused refresh option from src/web/layout.ts, along with refreshMeta(), the ${when(options.refresh, refreshMeta)} line that wrote it into <head>, and their comments. Nothing passed the option any more, since every page now follows /events (#3175, #3179).
Three tests and one doc changed with it:
test/refresh-meta.test.tsis rewritten. Its two cases that calledrefreshMeta()directly are gone along with the function. It now readsapp.looksfromforge.json, loads each listed page twice (signed in as an admin, and signed out), and fails if any status is 500 or above or any body containshttp-equiv="refresh". It keeps its two existing client-script cases: the page script doesn't look for the refresh tag, and a closed mirror stream reloads at most once.test/no-polling.test.tsdrops its allowlist entry forsrc/web/layout.ts. That entry existed only to cover the removed option, and its "still uses what it is allowed" check would now fail. The test was out of date, not wrong about the code;src/web/sw.tskeeps its entry for the restart page.docs/STUDIO.md("Live regions") no longer describes a<noscript>meta-refresh fallback. It now says no page carries one and names the test that enforces it.
bun test test/refresh-meta.test.ts test/no-polling.test.ts passes (25 tests), and tsc --noEmit is clean. To confirm the new test bites, I put a <meta http-equiv="refresh"> in the layout's <head>: 19 tests failed, one per listed page. I then removed it. To try it yourself, add that same tag to page() in src/web/layout.ts and run bun test test/refresh-meta.test.ts.
🤖 Generated with Claude Code
Approved. The unused refresh option, refreshMeta() and the head line are removed with nothing left calling them. The no-polling allowlist entry goes with them, and STUDIO.md now matches the code. The rewritten test renders every page in app.looks, signed in and signed out, and fails on any http-equiv=refresh. The author showed it fails when the tag is added. No user-facing page changed, so there is nothing for the design system to object to. I could not reach the preview from my sandbox, so I did not check it live. Two things I would do next: (1) have the test also assert the status is not 5xx for pages behind a guest redirect, noting which paths redirect, so a silent redirect cannot hide a page from the check; (2) cover the service-worker restart page in src/web/sw.ts, the one place that still carries the tag, with a test that it is the only one.
I removed the layout's unused
refreshoption fromsrc/web/layout.ts, along withrefreshMeta(), the${when(options.refresh, refreshMeta)}line that wrote it into<head>, and their comments. Nothing passed the option any more, since every page now follows/events(#3175, #3179).Three tests and one doc changed with it:
test/refresh-meta.test.tsis rewritten. Its two cases that calledrefreshMeta()directly are gone along with the function. It now readsapp.looksfromforge.json, loads each listed page twice (signed in as an admin, and signed out), and fails if any status is 500 or above or any body containshttp-equiv="refresh". It keeps its two existing client-script cases: the page script doesn't look for the refresh tag, and a closed mirror stream reloads at most once.test/no-polling.test.tsdrops its allowlist entry forsrc/web/layout.ts. That entry existed only to cover the removed option, and its "still uses what it is allowed" check would now fail. The test was out of date, not wrong about the code;src/web/sw.tskeeps its entry for the restart page.docs/STUDIO.md("Live regions") no longer describes a<noscript>meta-refresh fallback. It now says no page carries one and names the test that enforces it.bun test test/refresh-meta.test.ts test/no-polling.test.tspasses (25 tests), andtsc --noEmitis clean. To confirm the new test bites, I put a<meta http-equiv="refresh">in the layout's<head>: 19 tests failed, one per listed page. I then removed it. To try it yourself, add that same tag topage()insrc/web/layout.tsand runbun test test/refresh-meta.test.ts.🤖 Generated with Claude Code
Closes #3195