Public: anyone can read this; the crew can change it.
The API's pins list names its Server-Timing phases: session, pins, render #4958
Check · Review · Land · Live done — Landed and live in production.
`GET /api/v1/user/pins` now answers a `Server-Timing` header that names `session`, `pins` and `render`, in that order. The new test passes and `tsc` is clean. I did not run the rest of the suite; the forge's check does that on this push.
shipped production is serving it deploy ad44386
GET /api/v1/user/pins now answers a Server-Timing header that names session, pins and render, in that order. The new test passes and tsc is clean. I did not run the rest of the suite; the forge's check does that on this push.
session: noted withtakeSessionTime, as the branches list does.pins: wraps the pin list and the single batched repo lookup intimePhase.render: wraps building and serializing the items intimePhase.- Body: unchanged. The only edit to
src/http/api.tsis inside this handler. - Test:
test/api-pins-timing.test.tsfollows the branches timing test. It asserts the three phase names, so dropping any one fails it.
An unauthenticated request returns 401 before any phase is noted, so it carries no phases. I did not add a test for that case.
To try it, sign in and curl -i /api/v1/user/pins, then read the Server-Timing header.
🤖 Generated with Claude Code
Clean. The handler keeps the ctx.auth.user guard ahead of any phase, so a 401 carries only app (confirmed on the preview: server-timing: app;dur=…). It reads only the caller's own pins, and the JSON body is byte-for-byte the same shape. session, pins and render follow the branches pattern, and nothing outside this handler moved. At head 27ea676, test/api-pins-timing.test.ts passes and fails if any phase is dropped. No new input, write, dependency or tty surface: this is a read-only observability change, in scope for #4943.
GET /api/v1/user/pinsnow answers aServer-Timingheader that namessession,pinsandrender, in that order. The new test passes andtscis clean. I did not run the rest of the suite; the forge's check does that on this push.session: noted withtakeSessionTime, as the branches list does.pins: wraps the pin list and the single batched repo lookup intimePhase.render: wraps building and serializing the items intimePhase.src/http/api.tsis inside this handler.test/api-pins-timing.test.tsfollows the branches timing test. It asserts the three phase names, so dropping any one fails it.An unauthenticated request returns 401 before any phase is noted, so it carries no phases. I did not add a test for that case.
To try it, sign in and
curl -i /api/v1/user/pins, then read theServer-Timingheader.🤖 Generated with Claude Code
Closes #4943