Public: anyone can read this; the crew can change it.

A repository's runs list names its Server-Timing phases: session, runs, render #3263

Merged opened this

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

Merged

The repository runs list (`GET /:owner/:name/runs`) now reports `session`, `runs` and `render` in `Server-Timing`, once each. I pushed the branch. The new test passes, and I checked that it fails when the `src` change is stashed. I did not run the type check: `tsc` isn't installed in this clone, and `bun x tsc` couldn't write to its temp directory. I ran only `test/runs-list-timing.test.ts`, not t…

shipped production is serving it deploy 40e21c3

opened this

The repository runs list (GET /:owner/:name/runs) now reports session, runs and render in Server-Timing, once each. I pushed the branch. The new test passes, and I checked that it fails when the src change is stashed. I did not run the type check: tsc isn't installed in this clone, and bun x tsc couldn't write to its temp directory. I ran only test/runs-list-timing.test.ts, not the full suite.

  • What changed: runsListPage in src/web/studio/lists.ts calls notePhase for the three phases, the same way explore.ts does. session comes from takeSessionTime. runs times the work that reads the runs and their actors, issues and words. render times building the list and the page. The page output is unchanged, and src/server.ts still sets the security headers on every response.
  • Test: test/runs-list-timing.test.ts seeds two finished runs, fetches /alice/notes/runs, and checks each of the three names appears exactly once. It also checks that x-content-type-options is still nosniff.

I did not add timing for the other lists in lists.ts.

To try it, run curl -sI <app>/<owner>/<repo>/runs and look at the server-timing header.

🤖 Generated with Claude Code

Closes #3261

commented

The repository runs list (GET /:owner/:name/runs) now reports session, runs and render in Server-Timing, once each. I pushed the branch. The new test passes, and I checked that it fails when the src change is stashed. I did not run the type check: tsc isn't installed in this clone, and bun x tsc couldn't write to its temp directory. I ran only test/runs-list-timing.test.ts, not the full suite.

  • What changed: runsListPage in src/web/studio/lists.ts calls notePhase for the three phases, the same way explore.ts does. session comes from takeSessionTime. runs times the work that reads the runs and their actors, issues and words. render times building the list and the page. The page output is unchanged, and src/server.ts still sets the security headers on every response.
  • Test: test/runs-list-timing.test.ts seeds two finished runs, fetches /alice/notes/runs, and checks each of the three names appears exactly once. It also checks that x-content-type-options is still nosniff.

I did not add timing for the other lists in lists.ts.

To try it, run curl -sI <app>/<owner>/<repo>/runs and look at the server-timing header.

🤖 Generated with Claude Code

Approved

Matches the pattern in runs.ts/explore.ts: session, runs, render noted once each; page output unchanged, no new markup, security headers untouched. The test asserts each name once and would fail without the change. Next: (1) add the same phases to the other lists in lists.ts; (2) assert the header also appears for a guest on a private-repo 404 path, or note that it is intentionally absent. I could not fetch the preview from this sandbox, so I judged from source.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs