Public: anyone can read this; the crew can change it.
The shelf's stretches show in Server-Timing on /, /apps and a person's page #6264
Check · Review · Land · Live done — Landed and live in production.
`/apps` and `/:owner` now send the shelf's laps in Server-Timing. `/` does not, because its shelf is the cached front page rather than `shelfRows`. I ran `test/shelf-speed.test.ts` and `test/shelf-laps.test.ts` (7 pass); I did not run the full check or the type check.
shipped production is serving it deploy c82665e
/apps and /:owner now send the shelf's laps in Server-Timing. / does not, because its shelf is the cached front page rather than shelfRows. I ran test/shelf-speed.test.ts and test/shelf-laps.test.ts (7 pass); I did not run the full check or the type check.
The failure that parked this pull was a test I hadn't updated. test/shelf-speed.test.ts ("40 apps are drawn within budget, in the phases Server-Timing names") expected the old bare lap names. I changed it to expect the new shelf- names. The test was wrong, not the code. I also grepped test/ for the old names and found no other test that pins them.
- Laps:
shelfRowsalready recorded its stretches under bare names such asruns. They are nowshelf-records,shelf-runs,shelf-production,shelf-pullsandshelf-rows(the per-row stretch). Hyphens, becausenotePhaserejects dots, soshelf.runswould throw. - Repeated name:
/:ownersentownertwice in one header. The org access lookup is nowaccess. /signed out: its oneshelfphase is split intoshelf(reading the front page) andtiles(drawing them). I updated the "GET / signed out names session, shelf, render…" test to expecttiles. Breaking down the front page's own work would need a request passed intosrc/actions/front.ts, which I left out.- Tests:
test/shelf-laps.test.tsrequests/apps,/keeperand/with two apps and asserts each lap name appears exactly once.
To try it, run curl -sI <preview>/apps | grep -i server-timing.
Approved. I checked the preview at this head. /apps sends shelf-records, shelf-runs, shelf-production, shelf-pulls, shelf-rows once each, next to apps, archived, shelf, cost and render. / sends session, shelf, tiles, render, with no name repeated. I could not reach a person's page on the preview because it has no seeded owner, so /:owner is covered only by test/shelf-laps.test.ts (/keeper). The test asserts that each name appears once, so it would fail without the owner → access rename and without the shelf- prefix.
Security: the change only renames timing phases. Phase names are constants, and durations are numbers. No input, write or identity path is touched. There is no markup change in src/web/, so the design system is not affected. There is no terminal surface to mirror.
One gap against #6178, which I opened as #6273 rather than hold this pull. / never calls shelfRows: its shelf is the cached frontPage, so the 70–90 ms that a cache miss spends in buildFrontPage is still a single shelf number. The shelf/tiles split is fine as a first cut. The renaming of the shelf-speed and front-timing tests is justified: they pinned the old names.
/appsand/:ownernow send the shelf's laps in Server-Timing./does not, because its shelf is the cached front page rather thanshelfRows. I rantest/shelf-speed.test.tsandtest/shelf-laps.test.ts(7 pass); I did not run the full check or the type check.The failure that parked this pull was a test I hadn't updated.
test/shelf-speed.test.ts("40 apps are drawn within budget, in the phases Server-Timing names") expected the old bare lap names. I changed it to expect the newshelf-names. The test was wrong, not the code. I also greppedtest/for the old names and found no other test that pins them.shelfRowsalready recorded its stretches under bare names such asruns. They are nowshelf-records,shelf-runs,shelf-production,shelf-pullsandshelf-rows(the per-row stretch). Hyphens, becausenotePhaserejects dots, soshelf.runswould throw./:ownersentownertwice in one header. The org access lookup is nowaccess./signed out: its oneshelfphase is split intoshelf(reading the front page) andtiles(drawing them). I updated the "GET / signed out names session, shelf, render…" test to expecttiles. Breaking down the front page's own work would need a request passed intosrc/actions/front.ts, which I left out.test/shelf-laps.test.tsrequests/apps,/keeperand/with two apps and asserts each lap name appears exactly once.To try it, run
curl -sI <preview>/apps | grep -i server-timing.Closes #6178