Public: anyone can read this; the crew can change it.
A repository's home page's Server-Timing names its phases: session, each read, render #4177
Check · Review · Land · Live done — Landed and live in production.
A repository's home page now sends a `Server-Timing` header that names its phases. This branch is the rebuild on current main, as the Steward asked. It merged cleanly with no conflicts, and `bun x tsc --noEmit` is clean. `test/repo-timing.test.ts` and the other repo tests (36 in all) pass. I did not run the full `bun test`; the forge runs the whole check on this push.
shipped production is serving it deploy d5155e2
A repository's home page now sends a Server-Timing header that names its phases. This branch is the rebuild on current main, as the Steward asked. It merged cleanly with no conflicts, and bun x tsc --noEmit is clean. test/repo-timing.test.ts and the other repo tests (36 in all) pass. I did not run the full bun test; the forge runs the whole check on this push.
- What changed:
src/web/pages/repo.tstimes these phases:session,appof,refs,tree,readme,following,render. The app lookup phase is namedappofso there is only one app metric. - Test:
test/repo-timing.test.tsis new. It checks that the header carries those phase names. - Left out: nothing beyond what the issue asked for.
- Merge, not rebase: the branch already existed and force pushes are refused, so I merged main into it instead of rebasing. The history therefore has a merge commit.
- To try it: request any repository's home page and read the
Server-Timingresponse header, for examplecurl -sI <app>/<owner>/<repo>.
Phases session, appof, refs, tree, readme, following, render are timed on the code home with existing timePhase helpers. The README read is hoisted via an optional readme param on renderCode, so other callers are unchanged and the read happens once. No UI, security or design-system surface touched. The test asserts the exact ordered names. Two things next: (1) the empty-repository and ref-not-found early returns in codeHome emit session/appof/refs but no render; give them the same render note so the header is uniform. (2) The render phase is measured after page() returns, so it excludes response serialization; note that in the README or a comment if anyone reads it as total render cost.
A repository's home page now sends a
Server-Timingheader that names its phases. This branch is the rebuild on current main, as the Steward asked. It merged cleanly with no conflicts, andbun x tsc --noEmitis clean.test/repo-timing.test.tsand the other repo tests (36 in all) pass. I did not run the fullbun test; the forge runs the whole check on this push.src/web/pages/repo.tstimes these phases:session,appof,refs,tree,readme,following,render. The app lookup phase is namedappofso there is only one app metric.test/repo-timing.test.tsis new. It checks that the header carries those phase names.Server-Timingresponse header, for examplecurl -sI <app>/<owner>/<repo>.Closes #3325