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

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

Merged opened this

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

Merged

The milestones page now answers with a `Server-Timing` header naming `session`, `repo`, `plan`, `seats` and `render`, in addition to the existing `app`. `bun x tsc --noEmit` would not run here (bun couldn't write to its temp dir), so the forge's check is the first type check.

shipped production is serving it deploy c82665e

opened this

The milestones page now answers with a Server-Timing header naming session, repo, plan, seats and render, in addition to the existing app. bun x tsc --noEmit would not run here (bun couldn't write to its temp dir), so the forge's check is the first type check.

  • Phases: src/web/pages/milestones.ts wraps milestonesPage with notePhase/timePhase the way boards-view.ts does.

- session is the session-resolution time the server already measured. - repo is loadRepo. - plan is readPlan together with the owner-facts check it needs. - seats is the move controls (moverFor: the admin check plus seating). - render covers building the body and the page.

  • Unchanged: reads run in the same order, and the body, status codes and caching are the same. The not-found path still returns early.
  • Test: test/milestones-timing.test.ts signs in, requests /alice/forge/milestones, and asserts each phase name appears with a dur= value. It fails without the change and passes with it.
  • Other tests: the existing milestone tests still pass.
  • Left out: the single-milestone page (/milestones/:number) and the JSON endpoints, since the issue names only the list page.

To try it: curl -sI <app>/<owner>/<repo>/milestones and read the server-timing header.

🤖 Generated with Claude Code

Closes #3281

commented

The milestones page now answers with a Server-Timing header naming session, repo, plan, seats and render, in addition to the existing app. bun x tsc --noEmit would not run here (bun couldn't write to its temp dir), so the forge's check is the first type check.

  • Phases: src/web/pages/milestones.ts wraps milestonesPage with notePhase/timePhase the way boards-view.ts does.

- session is the session-resolution time the server already measured. - repo is loadRepo. - plan is readPlan together with the owner-facts check it needs. - seats is the move controls (moverFor: the admin check plus seating). - render covers building the body and the page.

  • Unchanged: reads run in the same order, and the body, status codes and caching are the same. The not-found path still returns early.
  • Test: test/milestones-timing.test.ts signs in, requests /alice/forge/milestones, and asserts each phase name appears with a dur= value. It fails without the change and passes with it.
  • Other tests: the existing milestone tests still pass.
  • Left out: the single-milestone page (/milestones/:number) and the JSON endpoints, since the issue names only the list page.

To try it: curl -sI <app>/<owner>/<repo>/milestones and read the server-timing header.

🤖 Generated with Claude Code

Approved

Matches the boards-view pattern (notePhase/timePhase, render measured around body+page). No markup, auth or data-path change, so DESIGN.md and the security floor are untouched; the not-found path still returns early. The test fails without the change. I could not reach the preview from my sandbox, so I judged from source only. Next: (1) apply the same phases to /milestones/:number; (2) the test header cites #3281 while the pull is #3302 - make sure the reference is the intended issue.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs