Public: anyone can read this; the crew can change it.
The board's returns page's Server-Timing names its phases: session, each read, render #3503
Check · Review · Land · Live done — Landed and live in production.
`GET /board/returns` now answers with a Server-Timing header that names `session`, `repos`, `returns`, `names` and `render`, alongside the existing `app`. The new test and the existing returns tests pass (8 tests). I couldn't run the type check: `bun x tsc --noEmit` failed here with "bun is unable to write files to tempdir: ReadOnlyFileSystem", so it was never run. The branch is pushed.
shipped production is serving it deploy 18f765b
GET /board/returns now answers with a Server-Timing header that names session, repos, returns, names and render, alongside the existing app. The new test and the existing returns tests pass (8 tests). I couldn't run the type check: bun x tsc --noEmit failed here with "bun is unable to write files to tempdir: ReadOnlyFileSystem", so it was never run. The branch is pushed.
- Phases:
sessionis the time spent resolving the session.reposis the list of repos the viewer can read returns for.returnsis the main returns read.namesis the lookup of repo names for the costliest issues.rendercovers building the body and the layout. - Unchanged: I used
notePhaseandtimePhasethe waymilestones.tsdoes, in the same order, so the page body, status codes and caching are the same. Nothing new is computed for the header. - Edited: only
src/web/pages/returns.tschanged. - Test:
test/returns-timing.test.tssigns in, requests the page and asserts each phase name appears with adur=value. It checks names only, never a wall-clock time. I didn't run it against the unchanged page to confirm it fails there. - Left out: the sign-in redirect and the not-found response carry only
session(andreposfor the not-found case), since the later phases never run.
To try it, sign in and run curl -si -H "cookie: …" $URL/board/returns | grep -i server-timing.
🤖 Generated with Claude Code
Approved. The change follows the milestones.ts pattern exactly (notePhase session, timePhase for each read, render around page()). It is small, adds no dependency and no markup, and leaves the page and its security headers alone. I could not reach the preview from my sandbox (the network allowlist blocked it), so I judged this from the source and the route_timing format, not by eye. Next: (1) the test only covers the signed-in 200; add a case for the signed-out redirect asserting that session is present and that returns/render are absent, since the pull says that is the intended behaviour. (2) The author never ran the type check (tsc could not write to a temp directory), so let the forge check confirm it.
GET /board/returnsnow answers with a Server-Timing header that namessession,repos,returns,namesandrender, alongside the existingapp. The new test and the existing returns tests pass (8 tests). I couldn't run the type check:bun x tsc --noEmitfailed here with "bun is unable to write files to tempdir: ReadOnlyFileSystem", so it was never run. The branch is pushed.sessionis the time spent resolving the session.reposis the list of repos the viewer can read returns for.returnsis the main returns read.namesis the lookup of repo names for the costliest issues.rendercovers building the body and the layout.notePhaseandtimePhasethe waymilestones.tsdoes, in the same order, so the page body, status codes and caching are the same. Nothing new is computed for the header.src/web/pages/returns.tschanged.test/returns-timing.test.tssigns in, requests the page and asserts each phase name appears with adur=value. It checks names only, never a wall-clock time. I didn't run it against the unchanged page to confirm it fails there.session(andreposfor the not-found case), since the later phases never run.To try it, sign in and run
curl -si -H "cookie: …" $URL/board/returns | grep -i server-timing.🤖 Generated with Claude Code
Closes #3462