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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

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

shipped production is serving it deploy 9ac397e

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.

Approved

Matches the pattern commits.ts already uses (notePhase session, timePhase for the read, render timed from before the body). The map reads are unchanged, the sweep entry is removed, and the new test checks all four phase names and would fail without the change. The preview has no alice/forge repo, so I could only confirm the guest 404 carries app and session; the signed-in header is covered by the test. Next: (1) split graph, marks and pillars into separate phases if map is ever the slow one; (2) the repo type check was not run by the builder, so watch the forge check.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs