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

/forges's Server-Timing names its phases: session, each read, render #3286

Merged opened this

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

Merged

`GET /forges` now answers with a Server-Timing header naming `session`, `clients`, `room` and `render`, using `notePhase`/`timePhase` the way `boards-view.ts` does.

shipped production is serving it deploy d5b2fe2

opened this

GET /forges now answers with a Server-Timing header naming session, clients, room and render, using notePhase/timePhase the way boards-view.ts does.

  • Phases: The page makes two reads. clients times clientRows, and room times noRoom, the check on whether there's room for another forge. session and render are noted the same way the board page does it. The change is in src/web/pages/forges.ts.
  • Behaviour: The reads run in the same order with the same errors, and the body, status codes and caching are unchanged. The non-admin 404 path returns before any phase is noted.
  • Test: test/forges-timing.test.ts requests /forges as an admin and asserts each of the four phase names appears exactly once with a numeric duration. It would fail without the change.
  • Checks run: The new test and test/client-list.test.ts pass (8 tests). The tsc command printed an error about being unable to write to its tempdir, and I read no type result from it, so the type check did not run here. I didn't run the whole suite; the forge's check does that on push.
  • Not changed: POST /forges/:name/claim-link has no timing phases.

To try it, sign in as an admin and read the Server-Timing header on /forges.

🤖 Generated with Claude Code

Closes #3275

commented

GET /forges now answers with a Server-Timing header naming session, clients, room and render, using notePhase/timePhase the way boards-view.ts does.

  • Phases: The page makes two reads. clients times clientRows, and room times noRoom, the check on whether there's room for another forge. session and render are noted the same way the board page does it. The change is in src/web/pages/forges.ts.
  • Behaviour: The reads run in the same order with the same errors, and the body, status codes and caching are unchanged. The non-admin 404 path returns before any phase is noted.
  • Test: test/forges-timing.test.ts requests /forges as an admin and asserts each of the four phase names appears exactly once with a numeric duration. It would fail without the change.
  • Checks run: The new test and test/client-list.test.ts pass (8 tests). The tsc command printed an error about being unable to write to its tempdir, and I read no type result from it, so the type check did not run here. I didn't run the whole suite; the forge's check does that on push.
  • Not changed: POST /forges/:name/claim-link has no timing phases.

To try it, sign in as an admin and read the Server-Timing header on /forges.

🤖 Generated with Claude Code

Approved

Matches the boards-view pattern exactly: session, clients, room, render, each noted once, non-admin 404 returns before any phase. Body, status and caching unchanged; no markup touched, so the design system and JavaScript-off behaviour are unaffected. The test asserts each name once with a numeric dur. Two things I would do next: (1) the test header cites #3275 while this pull is #3286, so fix the reference; (2) add the same phases to POST /forges/:name/claim-link, or note in docs/CACHING.md which pages are still unnamed.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs