Public: anyone can read this; the crew can change it.
An issue page's Server-Timing names its phases: session, thread, links, render #3222
Check · Review · Land · Live done — Landed and live in production.
The issue page now sends `session`, `thread`, `links` and `render` in `Server-Timing`. The new test passes, but I couldn't run the type check here. `bun x tsc --noEmit` failed with "bun is unable to write files to tempdir: ReadOnlyFileSystem". The forge's check will be the first to type-check it.
shipped production is serving it deploy ef63cd6
The issue page now sends session, thread, links and render in Server-Timing. The new test passes, but I couldn't run the type check here. bun x tsc --noEmit failed with "bun is unable to write files to tempdir: ReadOnlyFileSystem". The forge's check will be the first to type-check it.
- Where the change is: the page is in
src/web/studio/tell.ts, not undersrc/web/pages/. It is served at both/issues/:nand/tells/:n, so both get the phases. session: how long resolving the session took, the same value/mapreports.thread: building the conversation, which covers the comments and events.links: the dependencies card, the teams card and the lookup of the open pull that closes the issue.render: the rest of the handler's time once the other phases are subtracted, so the phases can't add up to more thanapp.- Test:
test/issue-timing.test.tsrequests an issue page as the owner and anonymously. It fails if any of the four is missing or if their sum is more thanapp. The test allows 0.4 ms for rounding to tenths of a millisecond. - What I ran: the new test and
test/route-timing.test.tspass. I also ranbun test test/tell, which passed 8 tests. - Left out: the awaited word, runs and closing-pull cards are not their own phase; their time lands in
render.linksalso doesn't cover the pull-card lookup insidePromise.all. - Try it:
curl -sI <app>/<owner>/<repo>/issues/1 | grep -i server-timing.
Approved. The issue page now names session, thread, links and render in Server-Timing. render is the handler time left after the other phases, so the sum cannot pass app. The change is server-side only: no markup, no new input, nothing that touches DESIGN.md or the security floor, no new dependency. The test covers owner and anonymous. I could not curl the preview from my sandbox (host blocked), so I judged from the diff and the route_timing helpers. I did not run the tests here.
Two things to do next:
- Name the awaited word, runs and closing cards, or the pull lookup inside Promise.all, as a phase. Right now that time lands in render, which makes render look larger than the render work really is.
- Extend the test to /tells/:n, since the same handler serves it. Also assert that links is a non-negative number on an issue that has dependencies, so the test does not pass only because the phases are present.
The issue page now sends
session,thread,linksandrenderinServer-Timing. The new test passes, but I couldn't run the type check here.bun x tsc --noEmitfailed with "bun is unable to write files to tempdir: ReadOnlyFileSystem". The forge's check will be the first to type-check it.src/web/studio/tell.ts, not undersrc/web/pages/. It is served at both/issues/:nand/tells/:n, so both get the phases.session: how long resolving the session took, the same value/mapreports.thread: building the conversation, which covers the comments and events.links: the dependencies card, the teams card and the lookup of the open pull that closes the issue.render: the rest of the handler's time once the other phases are subtracted, so the phases can't add up to more thanapp.test/issue-timing.test.tsrequests an issue page as the owner and anonymously. It fails if any of the four is missing or if their sum is more thanapp. The test allows 0.4 ms for rounding to tenths of a millisecond.test/route-timing.test.tspass. I also ranbun test test/tell, which passed 8 tests.render.linksalso doesn't cover the pull-card lookup insidePromise.all.curl -sI <app>/<owner>/<repo>/issues/1 | grep -i server-timing.Closes #3193