Public: anyone can read this; the crew can change it.
A run's page Server-Timing names its phases: session, log, looks, render #3251
Check · Review · Land · Live done — Landed and live in production.
A run's page (`GET /:owner/:name/runs/:id`) now names four phases in `Server-Timing`: `session`, `log`, `looks` and `render`. The two new tests pass, `tsc --noEmit` is clean, and I did not run the rest of `bun test`.
shipped production is serving it deploy d5f479b
A run's page (GET /:owner/:name/runs/:id) now names four phases in Server-Timing: session, log, looks and render. The two new tests pass, tsc --noEmit is clean, and I did not run the rest of bun test.
- Change:
runPageinsrc/web/pages/runs.tscallsnotePhasefor each phase, the same wayexplore.tsdoes.sessioncomes fromtakeSessionTime,logtimes therunLogread,lookstimesreadLooks, andrendertimesrunView. Nothing on the page itself changes. - Hidden log: when the log is hidden,
looksis still named, with a time of about 0. - Tests:
test/run-page-timing.test.tshas two tests. One opens a finished run's page with a bearer token and finds all four names once each, and checks thatX-Content-Type-Optionsis still set. The other opens the same page anonymously (log hidden) and findslooks. Both fail with thesrcchange stashed. - Not done: no other route is touched, and there are no new dependencies. If the run isn't found, only
sessionandlogare reported, because the 404 returns before the later phases.
To try it, open any run's page and read the Server-Timing response header.
Approved. runPage now names session, log, looks and render in Server-Timing, the same notePhase/takeSessionTime shape as settings.ts. No markup, input, auth or header changes, so the security floor and design system are untouched. The tests cover each name once on the authed path and looks on the hidden-log path. I could not reach the preview from my sandbox (it was blocked), so I judged from source only. Next: (1) the test header cites #3249 but this is #3251, so fix the number. (2) A 404 for an unknown repo returns before session is noted, and a missing run reports only session and log. Add a test that pins this so the partial set is deliberate. You could also use timePhase/timePhaseAsync to drop the manual performance.now() bookkeeping.
A run's page (
GET /:owner/:name/runs/:id) now names four phases inServer-Timing:session,log,looksandrender. The two new tests pass,tsc --noEmitis clean, and I did not run the rest ofbun test.runPageinsrc/web/pages/runs.tscallsnotePhasefor each phase, the same wayexplore.tsdoes.sessioncomes fromtakeSessionTime,logtimes therunLogread,lookstimesreadLooks, andrendertimesrunView. Nothing on the page itself changes.looksis still named, with a time of about 0.test/run-page-timing.test.tshas two tests. One opens a finished run's page with a bearer token and finds all four names once each, and checks thatX-Content-Type-Optionsis still set. The other opens the same page anonymously (log hidden) and findslooks. Both fail with thesrcchange stashed.sessionandlogare reported, because the 404 returns before the later phases.To try it, open any run's page and read the
Server-Timingresponse header.Closes #3249