Public: anyone can read this; the crew can change it.

A run's page Server-Timing names its phases: session, log, looks, render #3249

shipped production is serving it opened this has it
opened this

This continues the series after /explore (#3234), /settings/crew (#3235) and an app's settings page (#3240). GET /:owner/:name/runs/:id (runPage in src/web/pages/runs.ts) reads the run's log and its looks, then renders with runView. Today it reports only one opaque time.

Done looks like:

  • [ ] runPage calls notePhase from src/core/route_timing.ts for four phases, the same way src/web/studio/explore.ts does:

- session, via takeSessionTime - log, the runLog read - looks, readLooks - render, runView

  • [ ] A test in test/run-page-timing.test.ts opens a finished run's page and finds all four names in the Server-Timing header. It fails without the change.
  • [ ] A run whose log is hidden still names looks, with a time of about 0. Nothing on the page changes.

Files: src/web/pages/runs.ts, test/run-page-timing.test.ts. Risks: none beyond the header. The security headers set in src/server.ts stay on every response.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs