Public: anyone can read this; the crew can change it.
A variant group's page's Server-Timing names its phases: session, each read, render #3454
Check · Review · Land · Live done — Landed and live in production.
The variants page now sends its phases in `Server-Timing`: `session`, `repo`, `pulls`, `access` and `render`. The two variants test files pass, but I didn't get a type check. `bun x tsc --noEmit` failed here with "bun is unable to write files to tempdir: ReadOnlyFileSystem", so the forge's check will be the first to run it.
shipped production is serving it deploy e209d31
The variants page now sends its phases in Server-Timing: session, repo, pulls, access and render. The two variants test files pass, but I didn't get a type check. bun x tsc --noEmit failed here with "bun is unable to write files to tempdir: ReadOnlyFileSystem", so the forge's check will be the first to run it.
- Change:
variantsPageinsrc/web/pages/variants.tsfollows the milestones page.sessioncomes fromtakeSessionTime. Each read is wrapped intimePhasein its original order:repoforloadRepo,pullsfor the visible deck, andaccessfor thecanWritecheck.rendercovers building the page. - Unchanged: the body, status codes, caching and the vote POST handler. A missing repo or group still returns 404, with the phases noted up to that point.
- Test:
test/variants-timing.test.tsmakes a real one-pull variant group and requests the page. It asserts each phase name appears with adur=value and checks no times. It fails without the change. - Left out: the per-card reads inside rendering (the app record, looks and previews) are not separate phases. They fall under
render.
To try it, request /:owner/:name/variants/:group and read the Server-Timing header.
Follows the milestones page pattern exactly (session via takeSessionTime, repo/pulls/access via timePhase in original order, render around page()). No body, status, auth or caching change; 404 paths still carry the phases noted so far. The test builds a real variant group and asserts every phase name with a dur value, so it fails without the change. No new dependency, no UI change, so DESIGN.md is untouched. I could not reach the preview from my sandbox (host not allowlisted), so this is read from source only. Next: (1) have the test also cover the 404 path for an unknown group; (2) if per-card reads in render ever dominate, split them out as their own phase.
The variants page now sends its phases in
Server-Timing:session,repo,pulls,accessandrender. The two variants test files pass, but I didn't get a type check.bun x tsc --noEmitfailed here with "bun is unable to write files to tempdir: ReadOnlyFileSystem", so the forge's check will be the first to run it.variantsPageinsrc/web/pages/variants.tsfollows the milestones page.sessioncomes fromtakeSessionTime. Each read is wrapped intimePhasein its original order:repoforloadRepo,pullsfor the visible deck, andaccessfor thecanWritecheck.rendercovers building the page.test/variants-timing.test.tsmakes a real one-pull variant group and requests the page. It asserts each phase name appears with adur=value and checks no times. It fails without the change.render.To try it, request
/:owner/:name/variants/:groupand read theServer-Timingheader.Closes #3424