Public: anyone can read this; the crew can change it.
Website spec: Lighthouse lab LCP, CLS and INP for the looks pages, as a report (#2915 check 9) #2971
Each preview's look pages are now measured once per head for lab LCP, CLS and TBT (the lab's stand-in for INP). The pull shows them in a "Lab vitals" card under the Look card. Each number sits beside the threshold specification.website gives (LCP ≤ 2.5 s, CLS ≤ 0.1, INP ≤ 200 ms), and the card never fails a check.
stopped parked by the crew deploy 2da97c4
Each preview's look pages are now measured once per head for lab LCP, CLS and TBT (the lab's stand-in for INP). The pull shows them in a "Lab vitals" card under the Look card. Each number sits beside the threshold specification.website gives (LCP ≤ 2.5 s, CLS ≤ 0.1, INP ≤ 200 ms), and the card never fails a check.
Why #2965 was parked: its check failed only test/spawn-pipes.test.ts; the other 1468 tests passed. The test was right. src/looks/devtools.ts piped Chromium's stderr, stopped reading once it had the DevTools address, and cancelled the stream. That leaves a pipe nobody drains, the leak #2149 guards against. stderr is now read in a background loop for the whole life of the browser and cancelled after it is killed, as capture.ts does. The site is added to the test's PIPING list with that reason, and no other line of the test changed.
spawn-pipes, lab and lab-service pass here, and so does tsc --noEmit. The one exception is the real-Chromium load in test/lab.test.ts: in my sandbox Chromium aborts because it cannot open a socket, and the existing real-capture test in test/looks.test.ts fails the same way. The forge's check, whose image ships chromium, is where it runs.
How it works
src/looks/lab.ts: the thresholds, the measuring conditions, and Lighthouse's reduction of the page's performance entries.- LCP is the last candidate.
- CLS is the largest window of layout shifts. A window closes after a 1 s gap or at 5 s long, and shifts after input are not counted.
- TBT is each long task's time past 50 ms after first contentful paint.
- What the page reports is validated before it is used.
src/looks/devtools.ts: drives headless Chromium over its DevTools protocol, with no dependency. It loads each page as Lighthouse does on mobile: 390×844, CPU slowed 4×, 562.5 ms latency, 1.47 Mbit/s down. The page is loaded through the same grant door as the pictures, and one browser runs at a time, shared with the pictures.src/looks/service.ts: after a preview's pictures, each page is measured once per head and stored in a newlook_labtable. A newer head's numbers replace the older's, and they go when the pull closes. Production is not measured.src/web/pages/lab.ts: the card shows the conditions and the commit. Each verdict is given in words as well as colour, and the card is visible to whoever may see the pictures.
Choices to review
- No
webspec.ts: it exists only in open pulls #2937 and #2956, so this pull stands alone. - Not part of the forge's check run: the check runs in a cell with no preview to load, so the report comes from the looks service, the one place that already opens the preview in a browser.
- Measured INP left out: it needs scripted interactions, so TBT stands in for it in the lab. The section is cited by topic, because specification.website was not reachable from the sandbox.
To try it: open a pull on an app repository. Once its preview is green, the Lab vitals card appears under the Look card.
🤖 Generated with Claude Code
Parked by the crew: the check failed in the place it ran, not in the change, and failed the same way when it was run again
Each preview's look pages are now measured once per head for lab LCP, CLS and TBT (the lab's stand-in for INP). The pull shows them in a "Lab vitals" card under the Look card. Each number sits beside the threshold specification.website gives (LCP ≤ 2.5 s, CLS ≤ 0.1, INP ≤ 200 ms), and the card never fails a check.
Why #2965 was parked: its check failed only
test/spawn-pipes.test.ts; the other 1468 tests passed. The test was right.src/looks/devtools.tspiped Chromium's stderr, stopped reading once it had the DevTools address, and cancelled the stream. That leaves a pipe nobody drains, the leak #2149 guards against. stderr is now read in a background loop for the whole life of the browser and cancelled after it is killed, ascapture.tsdoes. The site is added to the test'sPIPINGlist with that reason, and no other line of the test changed.spawn-pipes,labandlab-servicepass here, and so doestsc --noEmit. The one exception is the real-Chromium load intest/lab.test.ts: in my sandbox Chromium aborts because it cannot open a socket, and the existing real-capture test intest/looks.test.tsfails the same way. The forge's check, whose image ships chromium, is where it runs.How it works
src/looks/lab.ts: the thresholds, the measuring conditions, and Lighthouse's reduction of the page's performance entries.src/looks/devtools.ts: drives headless Chromium over its DevTools protocol, with no dependency. It loads each page as Lighthouse does on mobile: 390×844, CPU slowed 4×, 562.5 ms latency, 1.47 Mbit/s down. The page is loaded through the same grant door as the pictures, and one browser runs at a time, shared with the pictures.src/looks/service.ts: after a preview's pictures, each page is measured once per head and stored in a newlook_labtable. A newer head's numbers replace the older's, and they go when the pull closes. Production is not measured.src/web/pages/lab.ts: the card shows the conditions and the commit. Each verdict is given in words as well as colour, and the card is visible to whoever may see the pictures.Choices to review
webspec.ts: it exists only in open pulls #2937 and #2956, so this pull stands alone.To try it: open a pull on an app repository. Once its preview is green, the Lab vitals card appears under the Look card.
🤖 Generated with Claude Code
Closes #2942