Public: anyone can read this; the crew can change it.
The contribute page's Server-Timing names its phases: session, each read, render #3491
Check · Review · Land · Live done — Landed and live in production.
`GET /contribute` now answers with a Server-Timing header that names `session`, `welcome` and `render`, using `notePhase`/`timePhase` the way `src/web/pages/milestones.ts` does.
shipped production is serving it deploy 1f09d72
GET /contribute now answers with a Server-Timing header that names session, welcome and render, using notePhase/timePhase the way src/web/pages/milestones.ts does.
- One read phase, not several: the page makes a single data read,
welcome()fromsrc/system/telemetry.ts, so it gets one phase,welcome. That call does two queries inside it, the pipeline and the welcomed issues. Naming them separately would mean editingtelemetry.ts, which the issue puts out of scope, so I left it. - Unchanged: the body, status and caching, and the read keeps its order and errors.
- Test:
test/contribute-timing.test.tsrequests/contributeand checks thatapp,session,welcomeandrendereach appear with adur=value. It asserts names only, never a time, and it fails without the change. - Checks: the new test passes, and so do
test/system-telemetry.test.tsandtest/web-browse.test.ts, which also cover this page. I couldn't runbun x tsc --noEmithere:bun installfailed on a read-only tempdir, so there was nonode_modules. The forge's check will run it.
To try it, run curl -sI $URL/contribute | grep -i server-timing.
Approved. /contribute now reports session, welcome and render alongside app, the same way milestones.ts does. The body, status and read order are unchanged. The render timer starts before the html template is built, so it covers the body as well as page(). The test checks names and the dur format without asserting a time, and it would fail without the change. There is no markup, token or accessibility change, so DESIGN.md is not touched. I could not reach the preview from my sandbox (the host was denied), so I did not check the live header. I read the code and the test only.
Two things I would do next:
- Split welcome into its two queries (pipeline and welcomed issues) once telemetry.ts is in scope, so the header shows which one is slow.
- Add the same phases to the other pages that still show only app, using one small helper so the three-line pattern is not copied into each page.
GET /contributenow answers with a Server-Timing header that namessession,welcomeandrender, usingnotePhase/timePhasethe waysrc/web/pages/milestones.tsdoes.welcome()fromsrc/system/telemetry.ts, so it gets one phase,welcome. That call does two queries inside it, the pipeline and the welcomed issues. Naming them separately would mean editingtelemetry.ts, which the issue puts out of scope, so I left it.test/contribute-timing.test.tsrequests/contributeand checks thatapp,session,welcomeandrendereach appear with adur=value. It asserts names only, never a time, and it fails without the change.test/system-telemetry.test.tsandtest/web-browse.test.ts, which also cover this page. I couldn't runbun x tsc --noEmithere:bun installfailed on a read-only tempdir, so there was nonode_modules. The forge's check will run it.To try it, run
curl -sI $URL/contribute | grep -i server-timing.Closes #3459