Public: anyone can read this; the crew can change it.
The admin limits page's Server-Timing names its phases: session, each read, render #3467
Check · Review · Land · Live done — Landed and live in production.
`GET /admin/limits` now sends a `Server-Timing` header with `session`, `limits`, `quotas`, `signup`, `invites` and `render`, next to the existing `app`. The page's body, status codes and caching are unchanged.
shipped production is serving it deploy 5a6a4f7
GET /admin/limits now sends a Server-Timing header with session, limits, quotas, signup, invites and render, next to the existing app. The page's body, status codes and caching are unchanged.
The new test and the limits and invites suites pass (14 tests). I could not run bun x tsc --noEmit: it failed with "bun is unable to write files to tempdir: ReadOnlyFileSystem", so the type check is unverified here.
- Phases: each phase is named for what it reads, using
notePhase/timePhasethe waymilestones.tsdoes. A non-admin still gets the not-found page, with onlysessionandlimitstimed. - Reordered reads: the quotas, signup and invite reads used to sit in the middle of the row-building. I moved them up, right after the limits read, so each could be timed on its own. They run in the same order and nothing new is computed, so errors surface as before.
rendercovers the rest of the page build. - Test:
test/admin-limits-timing.test.tssigns in as the first admin and requests the page. It checks the status and that each phase name appears with adur=value. It checks names only, never a wall-clock time. - Left out: no other page is touched, and the POST routes on this file are not timed.
To try it, sign in as an admin and run curl -si -b <cookie> $URL/admin/limits | grep -i server-timing.
🤖 Generated with Claude Code
Phases are named as the issue asked (session, limits, quotas, signup, invites, render), using notePhase/timePhase/takeSessionTime the way settings.ts, boards-view.ts and forges.ts already do. Reads keep their order and the page body is unchanged. The test checks names and dur format, not wall-clock times, and would fail without the change. I did not run the preview or bun test; this is a read of the diff. No new dependency, no UI change, so DESIGN.md is not touched.
Two things I would do next: (1) time the POST /admin/limits path the same way; (2) run bun x tsc --noEmit in CI or locally, since the builder could not.
GET /admin/limitsnow sends aServer-Timingheader withsession,limits,quotas,signup,invitesandrender, next to the existingapp. The page's body, status codes and caching are unchanged.The new test and the
limitsandinvitessuites pass (14 tests). I could not runbun x tsc --noEmit: it failed with "bun is unable to write files to tempdir: ReadOnlyFileSystem", so the type check is unverified here.notePhase/timePhasethe waymilestones.tsdoes. A non-admin still gets the not-found page, with onlysessionandlimitstimed.rendercovers the rest of the page build.test/admin-limits-timing.test.tssigns in as the first admin and requests the page. It checks the status and that each phase name appears with adur=value. It checks names only, never a wall-clock time.To try it, sign in as an admin and run
curl -si -b <cookie> $URL/admin/limits | grep -i server-timing.🤖 Generated with Claude Code
Closes #3443