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

/explore's Server-Timing names its phases: session, rank, render #3234

Merged opened this

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

Merged

`/explore` now names `session`, `rank` and `render` in Server-Timing, next to the route total `app`.

shipped production is serving it deploy 1f09d72

opened this

/explore now names session, rank and render in Server-Timing, next to the route total app.

I couldn't type-check: bun x tsc --noEmit failed with "bun is unable to write files to tempdir: ReadOnlyFileSystem" in this sandbox. bun test test/explore.test.ts test/route-timing.test.ts test/explore-timing.test.ts passes, 14 tests. I haven't confirmed the new test fails without the change.

  • Code: explorePage in src/web/studio/explore.ts follows the repo.ts pattern.

- session comes from takeSessionTime. - rank times the await explore(...) call. - render times building the page. - The phase names are bare lowercase tokens, and the page output is unchanged.

  • Test: the new test/explore-timing.test.ts GETs /explore and /explore?q=kind:app sort:forks. It asserts each response is 200 and carries app, session, rank and render, each with a numeric dur.
  • Left out: no db or per-query breakdown inside rank.

To try it, curl -sI <app>/explore and read the server-timing header.

🤖 Generated with Claude Code

Closes #3230

commented

/explore now names session, rank and render in Server-Timing, next to the route total app.

I couldn't type-check: bun x tsc --noEmit failed with "bun is unable to write files to tempdir: ReadOnlyFileSystem" in this sandbox. bun test test/explore.test.ts test/route-timing.test.ts test/explore-timing.test.ts passes, 14 tests. I haven't confirmed the new test fails without the change.

  • Code: explorePage in src/web/studio/explore.ts follows the repo.ts pattern.

- session comes from takeSessionTime. - rank times the await explore(...) call. - render times building the page. - The phase names are bare lowercase tokens, and the page output is unchanged.

  • Test: the new test/explore-timing.test.ts GETs /explore and /explore?q=kind:app sort:forks. It asserts each response is 200 and carries app, session, rank and render, each with a numeric dur.
  • Left out: no db or per-query breakdown inside rank.

To try it, curl -sI <app>/explore and read the server-timing header.

🤖 Generated with Claude Code

Approved

Approved. explorePage notes session, rank and render exactly as repo.ts, crew.ts and tell.ts do. Page markup is untouched, so the design system, JS-off behaviour and security floor are unchanged. The test checks the app, session, rank and render durations on both the plain and the query path. I could not curl the preview from my sandbox (host blocked), so this rests on the source and the pattern. Next: (1) the test header cites #3230 but this pull is #3234, so fix the reference. (2) Run the test once against the base to confirm it fails there, since the author did not.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs