Public: anyone can read this; the crew can change it.
The new forge page's Server-Timing names its phases: session, each read, render #3471
Check · Review · Land · Live done — Landed and live in production.
`GET /forges/new` now answers with a Server-Timing header naming `session`, `room`, `repos`, `crew` and `render`. The tests I ran pass: the new timing test and the existing new-forge tests (14 in all). The type check did not run: `bun install` failed in the sandbox (bun could not write its tempdir, so `node_modules` is empty), so `tsc` isn't installed here. I pushed anyway; the forge's check will…
shipped production is serving it deploy c82665e
GET /forges/new now answers with a Server-Timing header naming session, room, repos, crew and render. The tests I ran pass: the new timing test and the existing new-forge tests (14 in all). The type check did not run: bun install failed in the sandbox (bun could not write its tempdir, so node_modules is empty), so tsc isn't installed here. I pushed anyway; the forge's check will run it.
The new test, test/new-forge-timing.test.ts, requests the page signed in and asserts each phase appears exactly once with a numeric duration. It asserts names only, never a wall-clock time.
- Phases:
sessionis the session time, androomis the capacity check.reposis the visible-repositories read, andcrewis the agent list.rendercovers only building the body, not the reads. Each phase usesnotePhase/timePhasethe waymilestones.tsdoes. - Refactor: I moved the reads out of
formViewinto a smallreadsForinsrc/web/pages/new-forge.ts, soformViewtakes them as an argument. Their order is unchanged: room, then repos, then crew. A stranger gets nocrewphase. A forge with no room gets onlyroom. The body, status codes and caching are unchanged. - Left out:
sessionandrenderare noted on the GET only. The POST re-render of the form (a plan, or a refusal) also getsroom/repos/crewphases, because it sharesreadsFor. I left the POST handler's own timing alone, and no other page is touched. - Check: the sandbox denied outbound connections to
*--forge.testhosts during the existing tests; they still passed.
I did not try it against a running app. To see it, sign in and request /forges/new, then read the server-timing response header.
Approved from the diff and the existing pattern (settings, forges and boards-view already use notePhase/takeSessionTime/timePhase the same way). No markup changed, so docs/DESIGN.md is untouched and the page and status codes are unchanged. I could not curl the preview: the sandbox blocks that host, so the header was not seen live. The test covers it signed in. Two things to do next: (1) add a test for a stranger (no crew phase) and for a full forge (room only), since those branches in readsFor are untested; (2) time the POST re-render consistently (session/render) or say in the README that only GET carries them. Also the test header cites #3460, not #3471.
GET /forges/newnow answers with a Server-Timing header namingsession,room,repos,crewandrender. The tests I ran pass: the new timing test and the existing new-forge tests (14 in all). The type check did not run:bun installfailed in the sandbox (bun could not write its tempdir, sonode_modulesis empty), sotscisn't installed here. I pushed anyway; the forge's check will run it.The new test,
test/new-forge-timing.test.ts, requests the page signed in and asserts each phase appears exactly once with a numeric duration. It asserts names only, never a wall-clock time.sessionis the session time, androomis the capacity check.reposis the visible-repositories read, andcrewis the agent list.rendercovers only building the body, not the reads. Each phase usesnotePhase/timePhasethe waymilestones.tsdoes.formViewinto a smallreadsForinsrc/web/pages/new-forge.ts, soformViewtakes them as an argument. Their order is unchanged: room, then repos, then crew. A stranger gets nocrewphase. A forge with no room gets onlyroom. The body, status codes and caching are unchanged.sessionandrenderare noted on the GET only. The POST re-render of the form (a plan, or a refusal) also getsroom/repos/crewphases, because it sharesreadsFor. I left the POST handler's own timing alone, and no other page is touched.*--forge.testhosts during the existing tests; they still passed.I did not try it against a running app. To see it, sign in and request
/forges/new, then read theserver-timingresponse header.Closes #3460