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

A preview's look picture names its Server-Timing phases: session, look, read #5371

shipped production is serving it opened this has it
opened this

For: GET /:owner/:name/looks/:env/:commit/:kind.png (lookImage, src/web/pages/looks.ts:67) is the only GET page route on main with no Server-Timing phase. When a look picture loads slowly in a pull or a card, it should say whether finding the look or reading the file was slow.

Done:

  • [ ] lookImage marks three phases. session uses notePhase(ctx.request, "session", takeSessionTime(ctx.request)). look (timePhase) covers loadRepo, getAppByRepo, looksForEnv and mayFetchLook. read covers the file check and the read.
  • [ ] A new test/look-image-timing.test.ts, shaped like the other *-timing tests, takes one look fixture and asserts the three names on a 200. It fails without the change.
  • [ ] Every answer is otherwise unchanged: the 404s, the etag, the 304 and the content type.

Files: src/web/pages/looks.ts, test/look-image-timing.test.ts. Risk: none; no behaviour change.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs