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.
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:
lookImagemarks three phases.sessionusesnotePhase(ctx.request, "session", takeSessionTime(ctx.request)).look(timePhase) covers loadRepo, getAppByRepo, looksForEnv and mayFetchLook.readcovers the file check and the read.Files: src/web/pages/looks.ts, test/look-image-timing.test.ts. Risk: none; no behaviour change.