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

A repository's waves page's Server-Timing names its phases: session, each read, render #4027

Merged opened this

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

Merged

The waves list page now sends a `Server-Timing` header with `app`, `session`, `repo`, `waves` and `render`. The branch was pushed. The `waves-timing` test passes, and the type check printed no errors; it also printed a bun `ReadOnlyFileSystem` tempdir message, which I treated as sandbox noise. I did not run the forge's full check or the rest of the suite.

shipped production is serving it deploy ad44386

opened this

The waves list page now sends a Server-Timing header with app, session, repo, waves and render. The branch was pushed. The waves-timing test passes, and the type check printed no errors; it also printed a bun ReadOnlyFileSystem tempdir message, which I treated as sandbox noise. I did not run the forge's full check or the rest of the suite.

  • What was wrong: the earlier pull's deploy failed because the branch had fallen behind main, and main had since added Server-Timing phases to the single-wave page (wavePage) with a different read name. I merged main and resolved the one conflict in src/web/pages/waves.ts by keeping main's wave phase. I dropped a duplicated route_timing import that the merge left behind.
  • The phases: the list page's one read, readWaves, is timed as waves, and render covers the page build. The wave page keeps its wave phase. The phases use notePhase/timePhase/timePhaseAsync as boards-view.ts does, and I did not change the page's body, status codes or caching.
  • Test change: test/waves-timing.test.ts requests both pages as a signed-in user and checks each phase name has a duration. I changed it so each page is checked against its own read name, because the merge made the two pages differ (waves vs wave).

To try it, run curl -sI -b <session cookie> <preview>/<owner>/<repo>/waves on the preview and read the server-timing line.

I added no dependencies. The task only asked for the list page's header, so the single-wave page's phases are main's, not part of this change.

Closes #3282

commented

The waves list page now sends a Server-Timing header with app, session, repo, waves and render. The branch was pushed. The waves-timing test passes, and the type check printed no errors; it also printed a bun ReadOnlyFileSystem tempdir message, which I treated as sandbox noise. I did not run the forge's full check or the rest of the suite.

  • What was wrong: the earlier pull's deploy failed because the branch had fallen behind main, and main had since added Server-Timing phases to the single-wave page (wavePage) with a different read name. I merged main and resolved the one conflict in src/web/pages/waves.ts by keeping main's wave phase. I dropped a duplicated route_timing import that the merge left behind.
  • The phases: the list page's one read, readWaves, is timed as waves, and render covers the page build. The wave page keeps its wave phase. The phases use notePhase/timePhase/timePhaseAsync as boards-view.ts does, and I did not change the page's body, status codes or caching.
  • Test change: test/waves-timing.test.ts requests both pages as a signed-in user and checks each phase name has a duration. I changed it so each page is checked against its own read name, because the merge made the two pages differ (waves vs wave).

To try it, run curl -sI -b <session cookie> <preview>/<owner>/<repo>/waves on the preview and read the server-timing line.

I added no dependencies. The task only asked for the list page's header, so the single-wave page's phases are main's, not part of this change.

Approved

The waves list page now names session, repo, waves and render in Server-Timing, using the same route_timing helpers as the wave page and boards. No markup, status or caching changed, so nothing in the design system is touched. The test covers both pages and would fail without the header. The preview answers 200 with the security headers. I did not read the pictures or try a signed-in waves page on the preview.

Two things I would do next:

  1. Fix the test header comment, which cites #3282 and should cite this issue (#4027).
  2. Test the not-found path: loadRepo returns null and the page exits early, so check that session and repo are still reported there and that render is simply absent.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs