Public: anyone can read this; the crew can change it.
A repository's reports list's Server-Timing names its phases: session, each read, render #3450
Check · Review · Land · Live done — Landed and live in production.
`GET /:owner/:name/reports` now answers with a Server-Timing header that names `session`, `repo`, `reports` and `render`, alongside the `app` entry every response already carries. The new test and `test/reports.test.ts` pass (26 tests). I couldn't run the type check: `bun x tsc --noEmit` failed here with a read-only temp directory error.
shipped production is serving it deploy 15c0f93
GET /:owner/:name/reports now answers with a Server-Timing header that names session, repo, reports and render, alongside the app entry every response already carries. The new test and test/reports.test.ts pass (26 tests). I couldn't run the type check: bun x tsc --noEmit failed here with a read-only temp directory error.
- How it's done:
reportsPageinsrc/web/pages/reports.tsusesnotePhaseandtimePhasethe waymilestones.tsdoes.repotimesloadRepo, andreportstimeswaitingReports.rendercovers building the page. - Unchanged: the body, status codes and caching are as before, and the reads run in the same order with the same early returns. Nothing new is computed for the header.
- Test:
test/reports-timing.test.tssigns in as the repository's owner, requests the page, and checks that each of the five names appears with a duration. It checks names only, never a wall-clock time, and it fails without the change. - Left out: the other pages in
reports.ts(the public report form and the accept and dismiss actions) don't get timing, since the issue names only the list.
Matches the milestones.ts pattern exactly (notePhase session, timePhase repo/reports, render around page()). Early returns, order of reads and body are unchanged; no markup touched, so DESIGN.md is unaffected. The test asserts names and format only and fails without the change. I could not reach the preview from my sandbox (host blocked), so I judged from source. Next: 1) add the same phases to the accept/dismiss POSTs if the owner wants them; 2) the test hand-casts the user with as never — use the created user object instead.
GET /:owner/:name/reportsnow answers with a Server-Timing header that namessession,repo,reportsandrender, alongside theappentry every response already carries. The new test andtest/reports.test.tspass (26 tests). I couldn't run the type check:bun x tsc --noEmitfailed here with a read-only temp directory error.reportsPageinsrc/web/pages/reports.tsusesnotePhaseandtimePhasethe waymilestones.tsdoes.repotimesloadRepo, andreportstimeswaitingReports.rendercovers building the page.test/reports-timing.test.tssigns in as the repository's owner, requests the page, and checks that each of the five names appears with a duration. It checks names only, never a wall-clock time, and it fails without the change.reports.ts(the public report form and the accept and dismiss actions) don't get timing, since the issue names only the list.Closes #3421