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

The origins page's Server-Timing names its phases: session, each read, render #3453

Merged opened this

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

Merged

The origins page's Server-Timing now names `session`, `origins`, `mirrors`, `apps`, `frozen` and `render`, alongside `app`. I couldn't run the type check here: `bun x tsc` fails in the sandbox with "unable to write files to tempdir", and there's no local `tsc`. The tests pass: the new origins timing test and the nine other origins suites, 155 tests in all.

shipped production is serving it deploy 7b21267

opened this

The origins page's Server-Timing now names session, origins, mirrors, apps, frozen and render, alongside app. I couldn't run the type check here: bun x tsc fails in the sandbox with "unable to write files to tempdir", and there's no local tsc. The tests pass: the new origins timing test and the nine other origins suites, 155 tests in all.

  • What changed: originsPage in src/web/pages/origins.ts uses notePhase and timePhase from route_timing.ts, the same way milestones.ts does. The four reads keep their order. render covers building the body and the page shell.
  • frozen phase: the frozen-mirrors card did its two reads inside the template. I moved them into readFrozen so they can be timed. frozenCard now only renders what readFrozen returns.
  • Unchanged: the body, status codes and caching are the same. The POST error re-renders of the page call the same view without timing, so no other route's header changes.
  • Test: test/origins-timing.test.ts signs in, requests /settings/origins, and checks that each phase name appears with a dur= value. It checks names only, never a time.
  • Left out: no timing on the POST routes or the OAuth flow page, as the issue said to touch no other page.

To try it: sign in, curl -i /settings/origins with your session cookie, and read the server-timing header.

🤖 Generated with Claude Code

Closes #3423

commented

The origins page's Server-Timing now names session, origins, mirrors, apps, frozen and render, alongside app. I couldn't run the type check here: bun x tsc fails in the sandbox with "unable to write files to tempdir", and there's no local tsc. The tests pass: the new origins timing test and the nine other origins suites, 155 tests in all.

  • What changed: originsPage in src/web/pages/origins.ts uses notePhase and timePhase from route_timing.ts, the same way milestones.ts does. The four reads keep their order. render covers building the body and the page shell.
  • frozen phase: the frozen-mirrors card did its two reads inside the template. I moved them into readFrozen so they can be timed. frozenCard now only renders what readFrozen returns.
  • Unchanged: the body, status codes and caching are the same. The POST error re-renders of the page call the same view without timing, so no other route's header changes.
  • Test: test/origins-timing.test.ts signs in, requests /settings/origins, and checks that each phase name appears with a dur= value. It checks names only, never a time.
  • Left out: no timing on the POST routes or the OAuth flow page, as the issue said to touch no other page.

To try it: sign in, curl -i /settings/origins with your session cookie, and read the server-timing header.

🤖 Generated with Claude Code

Approved

Approved. The change follows the same notePhase/timePhase pattern as settings.ts and boards-view.ts. Markup, status codes, caching and the security headers are unchanged, and it adds no UI, so docs/DESIGN.md is not in play. The test names all seven phases and fails without the change. Two caveats: the preview was unreachable from my sandbox (403 from the allowlist), so I judged from the source. The type check was also not run, as the builder reported. Next: (1) run tsc once on the forge side. (2) Replace the mutable timing out-parameter in originsView with a returned or computed render start, which would read more simply.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs