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

One wave's page names its Server-Timing phases: session, each read, render #3652

Merged opened this

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

Merged

A wave's page (`GET /:owner/:name/waves/:version`) now reports four named phases in `Server-Timing`: `session`, `repo`, `wave` and `render`. I couldn't run the type check: `bun x tsc --noEmit` failed here with "unable to write files to tempdir: ReadOnlyFileSystem". `test/wave-page-timing.test.ts` and the existing `test/waves-page.test.ts` pass.

shipped production is serving it deploy 119f4d2

opened this

A wave's page (GET /:owner/:name/waves/:version) now reports four named phases in Server-Timing: session, repo, wave and render. I couldn't run the type check: bun x tsc --noEmit failed here with "unable to write files to tempdir: ReadOnlyFileSystem". test/wave-page-timing.test.ts and the existing test/waves-page.test.ts pass.

  • Phases: wavePage in src/web/pages/waves.ts notes session from takeSessionTime, times loadRepo as repo and readWave as wave, and times building the body and page() as render. The page output is unchanged.
  • Test: the new test GETs a real wave page and checks that app, session, repo, wave and render each appear as name;dur=N.N. I didn't run it against the old handler, but it would fail there since the old handler reports only app.
  • Left out: no caching, as the issue says. wavesPage (the list) is untouched.

To try it, run bun test test/wave-page-timing.test.ts, or request a wave page and read the Server-Timing header.

🤖 Generated with Claude Code

Closes #3633

commented

A wave's page (GET /:owner/:name/waves/:version) now reports four named phases in Server-Timing: session, repo, wave and render. I couldn't run the type check: bun x tsc --noEmit failed here with "unable to write files to tempdir: ReadOnlyFileSystem". test/wave-page-timing.test.ts and the existing test/waves-page.test.ts pass.

  • Phases: wavePage in src/web/pages/waves.ts notes session from takeSessionTime, times loadRepo as repo and readWave as wave, and times building the body and page() as render. The page output is unchanged.
  • Test: the new test GETs a real wave page and checks that app, session, repo, wave and render each appear as name;dur=N.N. I didn't run it against the old handler, but it would fail there since the old handler reports only app.
  • Left out: no caching, as the issue says. wavesPage (the list) is untouched.

To try it, run bun test test/wave-page-timing.test.ts, or request a wave page and read the Server-Timing header.

🤖 Generated with Claude Code

Approved

Approved. The wave page now reports session, repo, wave and render in Server-Timing, using the same notePhase/takeSessionTime/timePhase pattern as the sibling pages (access, boards, capacity). Markup, tokens and headers are untouched, so docs/DESIGN.md is unaffected, and no new surface, input or write was added. The test reads a real wave page and would fail on the old handler, which only reported app. I could not load the preview: the sandbox blocks that host, so this judgement rests on the code and the test. Two things to do next: 1) cover wavesPage (the list) the same way, since it still reports only app. 2) The test header cites #3633 while the pull is #3652, so check that is the intended issue number.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs