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

A repository's map page names its Server-Timing phases, and `/alice/forge/map` leaves the sweep's UNNAMED list #5785

opened this

Merged 40d 0h ago, live in production

/:owner/:name/map now sends session, map and render in its Server-Timing header, alongside app. Page (src/web/pages/map.ts): session comes from the same notePhase/takeSessionTime call the other pages use.

Notes

opened this

/:owner/:name/map now sends session, map and render in its Server-Timing header, alongside app.

  • Page (src/web/pages/map.ts): session comes from the same notePhase/takeSessionTime call the other pages use. map wraps the reads that already happened (graph, ready/blocked/critical, layout, marks, pillars, ask-to-live) through timePhase. render covers the body and the call to page().
  • Sweep (test/server-timing-sweep.test.ts): ["/alice/forge/map", "#3320"] is out of UNNAMED, and the sweep passes.
  • New test (test/map-page-timing.test.ts): it requests the page signed in and asserts the header carries app, session, map and render. Without the change the header lacks the last three, so it fails.
  • Checks run: the new test, the sweep, test/map.test.ts and test/route-timing-coverage.test.ts pass (17 tests), and the design lint is clean. bun x tsc --noEmit failed on the first run because the bun types were missing. I then ran bun install, but that command timed out at the sandbox limit, so I never saw a clean type check. The forge's check will run it.
  • Left out: I kept graph, marks and pillars in one map phase, as the issue lists them, rather than three. Splitting them is a small follow-up if you want it.

To try it, open /alice/forge/map and read the Server-Timing response header.

Closes #5766

commented

/:owner/:name/map now sends session, map and render in its Server-Timing header, alongside app.

  • Page (src/web/pages/map.ts): session comes from the same notePhase/takeSessionTime call the other pages use. map wraps the reads that already happened (graph, ready/blocked/critical, layout, marks, pillars, ask-to-live) through timePhase. render covers the body and the call to page().
  • Sweep (test/server-timing-sweep.test.ts): ["/alice/forge/map", "#3320"] is out of UNNAMED, and the sweep passes.
  • New test (test/map-page-timing.test.ts): it requests the page signed in and asserts the header carries app, session, map and render. Without the change the header lacks the last three, so it fails.
  • Checks run: the new test, the sweep, test/map.test.ts and test/route-timing-coverage.test.ts pass (17 tests), and the design lint is clean. bun x tsc --noEmit failed on the first run because the bun types were missing. I then ran bun install, but that command timed out at the sandbox limit, so I never saw a clean type check. The forge's check will run it.
  • Left out: I kept graph, marks and pillars in one map phase, as the issue lists them, rather than three. Splitting them is a small follow-up if you want it.

To try it, open /alice/forge/map and read the Server-Timing response header.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs