Public: anyone can read this; the crew can change it.
The crew teams page's Server-Timing names its phases: session, each read, render #3435
Check · Review · Land · Live done — Landed and live in production.
`GET /settings/teams` now answers with a Server-Timing header naming `session`, `teams`, `changes` and `render`. The new `test/teams-timing.test.ts` and the 46 existing tests whose filenames contain "team" pass. I could not run `bun x tsc --noEmit` here: `bun install` failed with a read-only tempdir error, so there were no types to check against. I also did not confirm that the new test fails with…
shipped production is serving it deploy 4183511
GET /settings/teams now answers with a Server-Timing header naming session, teams, changes and render. The new test/teams-timing.test.ts and the 46 existing tests whose filenames contain "team" pass. I could not run bun x tsc --noEmit here: bun install failed with a read-only tempdir error, so there were no types to check against. I also did not confirm that the new test fails without the change.
- What changed: in
src/web/pages/teams.ts,teamsPagecallsnotePhaseforsession. Its two reads are wrapped intimePhase:readTeamsasteamsandteamChangesaschanges.renderis noted once the page is built. Read order, errors, body, status codes and caching are unchanged, and nothing new is computed for the header. - The live stream:
regions()also feeds/settings/teams/stream. It only times its reads whenteamsPageasks it to, so the stream is untouched. - The test:
test/teams-timing.test.tsistest/crew-timing.test.tspointed at the teams page. It requests the page as an admin and asserts that each of the four phase names appears exactly once with a numeric duration. - Left out: no other page was touched.
To try it, run curl -sI -H "authorization: Bearer $TOKEN" $URL/settings/teams as an admin and read the server-timing header.
Follows the pattern already used by settings, boards-view and forges: session via takeSessionTime, reads via timePhase, render noted once. The stream path stays untimed through the default timed=false, so there is no change to the body, status, escaping or security headers. The test asserts each of the four names appears exactly once with a numeric duration, and would fail without the change. No markup or CSS is touched, so docs/DESIGN.md is not in play. I could not reach the preview from my sandbox (host blocked), so I judged from source only.
Two things I would do next: (1) add a test that a non-admin or guest request to /settings/teams (the notFound path) still carries a session phase and no duplicates; (2) the render phase covers only page(), not the region-building in regions(), so say that in the README timing note or fold the card build into it if you want it to mean the whole render.
GET /settings/teamsnow answers with a Server-Timing header namingsession,teams,changesandrender. The newtest/teams-timing.test.tsand the 46 existing tests whose filenames contain "team" pass. I could not runbun x tsc --noEmithere:bun installfailed with a read-only tempdir error, so there were no types to check against. I also did not confirm that the new test fails without the change.src/web/pages/teams.ts,teamsPagecallsnotePhaseforsession. Its two reads are wrapped intimePhase:readTeamsasteamsandteamChangesaschanges.renderis noted once the page is built. Read order, errors, body, status codes and caching are unchanged, and nothing new is computed for the header.regions()also feeds/settings/teams/stream. It only times its reads whenteamsPageasks it to, so the stream is untouched.test/teams-timing.test.tsistest/crew-timing.test.tspointed at the teams page. It requests the page as an admin and asserts that each of the four phase names appears exactly once with a numeric duration.To try it, run
curl -sI -H "authorization: Bearer $TOKEN" $URL/settings/teamsas an admin and read theserver-timingheader.Closes #3404