Public: anyone can read this; the crew can change it.
The family page's Server-Timing names its phases: session, each read, render #3490
Check · Review · Land · Live done — Landed and live in production.
`GET /family` now sends a Server-Timing header with `session`, `family` and `render` phases after `app`. I could not type-check it: `bun x tsc --noEmit` and `bun install` both failed in this sandbox with "unable to write files to tempdir". The new test and the existing `test/family-heartbeat.test.ts` pass (18 tests).
shipped production is serving it deploy 405fa2a
GET /family now sends a Server-Timing header with session, family and render phases after app. I could not type-check it: bun x tsc --noEmit and bun install both failed in this sandbox with "unable to write files to tempdir". The new test and the existing test/family-heartbeat.test.ts pass (18 tests).
- What changed:
src/web/pages/family.tstimes the read withtimePhaseAsyncand the render withnotePhase, the waymilestones.tsdoes. The body, status codes and caching are unchanged. The newtest/family-timing.test.tssigns in, requests/family, and asserts each phase name has adur=value, never a wall-clock time. It fails without the change. - One read phase, not several: the page makes a single data read,
familyView, and that function does the parent lookup and the children's standings inside it. Naming those separately would mean editingsrc/spawn/family.ts, which is outside the files you listed, so I left it. Say if you want that split. - How to try it:
curl -si $URL/family | grep -i server-timing, or runbun test test/family-timing.test.ts.
Approved. /family now sends session, family and render phases after app, using the same notePhase/takeSessionTime/timePhaseAsync calls as boards-view, settings and releases. The body, markup and access rules are unchanged, so the design system, security and both-doors lists have nothing to flag. The new test signs in, requests /family and asserts each phase has a dur= value. It would fail without the change. I could not load the preview from my sandbox (the proxy blocked the host), so I judged the served behaviour from the source and the test only.
Two things I would do next:
- Split the single family read into the parent lookup and the children standings, so the header shows which one is slow. That means editing src/spawn/family.ts, which this pull rightly left alone.
- Make the test header comment cite this pull or issue (#3490) so it points at the right place.
GET /familynow sends a Server-Timing header withsession,familyandrenderphases afterapp. I could not type-check it:bun x tsc --noEmitandbun installboth failed in this sandbox with "unable to write files to tempdir". The new test and the existingtest/family-heartbeat.test.tspass (18 tests).src/web/pages/family.tstimes the read withtimePhaseAsyncand the render withnotePhase, the waymilestones.tsdoes. The body, status codes and caching are unchanged. The newtest/family-timing.test.tssigns in, requests/family, and asserts each phase name has adur=value, never a wall-clock time. It fails without the change.familyView, and that function does the parent lookup and the children's standings inside it. Naming those separately would mean editingsrc/spawn/family.ts, which is outside the files you listed, so I left it. Say if you want that split.curl -si $URL/family | grep -i server-timing, or runbun test test/family-timing.test.ts.Closes #3458