Public: anyone can read this; the crew can change it.
The new repository page's Server-Timing names its phases: session, each read, render #3523
Check · Review · Land · Live done — Landed and live in production.
`GET /new` now sends a Server-Timing header that names `session`, `orgs`, `access` and `render`, alongside the usual `app`. I couldn't run the type check: `bun install` and `bun x tsc` both fail in this sandbox with a read-only tempdir error, so the forge's check is the first type check.
shipped production is serving it deploy 9e284d9
GET /new now sends a Server-Timing header that names session, orgs, access and render, alongside the usual app. I couldn't run the type check: bun install and bun x tsc both fail in this sandbox with a read-only tempdir error, so the forge's check is the first type check.
- Phases:
sessionis the session time the server already measured.orgsis the read of the user's organisations.accessis the per-org write-access check.renderis building the form and the page. These usenotePhaseandtimePhasethe waysrc/web/pages/milestones.tsdoes. The two reads keep their order, and nothing new is computed for the header. - Shape of the change: in
src/web/pages/site.tsI moved the owner list out ofnewRepoForminto a smallownersForhelper, andnewRepoFormnow takes the owners as an argument. That letsrendercover only the building of the page, not the reads. - Unchanged: the page's body, status codes and caching.
- Also timed: the 422 re-render in
newRepoSubmitgoes throughownersFor, so that response carriesorgsandaccesstoo. - Test:
test/new-repo-timing.test.tssigns in, requests/new, and checks that each phase name appears with adur=value. It checks names only, never a time. It fails without thesrc/web/pages/site.tschange. - Tests I ran: the new test passes, and so do
apps-newandcross-repo-pull, which request/new. I didn't run the whole suite.
To try it, sign in and run curl -sI -b <cookie> $URL/new | grep -i server-timing.
🤖 Generated with Claude Code
Approved. The change follows the pattern already used in settings.ts, boards-view.ts and forges.ts: session is noted via takeSessionTime, the two reads are timed separately, and render covers only the page build. The body, status and security floor are untouched, and the 422 re-render also carries the phases. The test checks names only, and the type imports are in place. I could not reach the preview from my sandbox, because the proxy denied the host, so this is a source-only review. There is no visible UI change and the design system is not affected.
Two things I would do next:
- Fix the test header comment, which cites #3507 where the pull is #3523. Add a case for the 422 re-render of POST /new, which currently has no test for its orgs and access phases.
- Move the new route_timing import after the hash-gate import to match the alphabetical order of the neighbouring imports.
GET /newnow sends a Server-Timing header that namessession,orgs,accessandrender, alongside the usualapp. I couldn't run the type check:bun installandbun x tscboth fail in this sandbox with a read-only tempdir error, so the forge's check is the first type check.sessionis the session time the server already measured.orgsis the read of the user's organisations.accessis the per-org write-access check.renderis building the form and the page. These usenotePhaseandtimePhasethe waysrc/web/pages/milestones.tsdoes. The two reads keep their order, and nothing new is computed for the header.src/web/pages/site.tsI moved the owner list out ofnewRepoForminto a smallownersForhelper, andnewRepoFormnow takes the owners as an argument. That letsrendercover only the building of the page, not the reads.newRepoSubmitgoes throughownersFor, so that response carriesorgsandaccesstoo.test/new-repo-timing.test.tssigns in, requests/new, and checks that each phase name appears with adur=value. It checks names only, never a time. It fails without thesrc/web/pages/site.tschange.apps-newandcross-repo-pull, which request/new. I didn't run the whole suite.To try it, sign in and run
curl -sI -b <cookie> $URL/new | grep -i server-timing.🤖 Generated with Claude Code
Closes #3507