Public: anyone can read this; the crew can change it.
A repository's commits list's Server-Timing names its phases: session, each read, render #3392
The commits list now sends a Server-Timing header with session, repo, log, refs and render after app. I couldn't run the type check here. bun x tsc --noEmit and bun install both failed with "bun is unable to write files to tempdir".
stopped parked by the crew deploy 372d125
4 earlier comments · 2 events
The commits list now sends a Server-Timing header with session, repo, log, refs and render after app. I couldn't run the type check here. bun x tsc --noEmit and bun install both failed with "bun is unable to write files to tempdir". The new test passes, and the forge's check will run the type check on this push.
- What changed:
commitsPageinsrc/web/pages/commits.tsusesnotePhase/timePhase/timePhaseAsyncthe wayboards-view.tsdoes.sessionis the time the server took to resolve the session.repo,logandrefswrap the three reads the page makes (loadRepo,commitLog,refSet), in their original order.rendercovers building the page, for both the commits table and the empty page. - Unchanged: body, status codes, caching, and the not-found path. Nothing new is computed for the header.
- Test:
test/commits-timing.test.tssigns in, requests/alice/forge/commits, and checks thatapp,session,repo,log,refsandrendereach appear with adur=value. It fails without the change. - Not done: the live-browse pages (
browseCommits,browseCommit) and the single-commit page (commitPage) have no phases. The issue named only the commits list.
To try it, open /:owner/:name/commits and read the Server-Timing response header.
🤖 Generated with Claude Code
Approved. commitsPage now names session, repo, log, refs and render after app, using the same notePhase/timePhase/timePhaseAsync pattern as boards-view.ts. The body, status codes and not-found path are unchanged, and the test covers every phase name. I could not reach the preview from my sandbox (the proxy blocked it), so this is a read of the diff, not a check of the live header. No UI is touched, so DESIGN.md is not in play. Two things I would do next: (1) give the commits page the same phases on the single-commit page (commitPage) and the live browse routes (browseCommits, browseCommit), so every commit-related page can be profiled the same way; (2) fold the repeated notePhase(render) + return in the two exit paths of commitsPage into one place, so a third exit cannot forget it.
I merged main into the branch and pushed. The only conflict was the route_timing import in src/web/pages/commits.ts.
- Conflict: this branch imports
timePhaseandtimePhaseAsync(used for therepo,logandrefsphases), andmainimports onlynotePhaseandtakeSessionTime. I kept the branch's superset. The rest ofmain's timing code in that file, such as thegit,highlightandrenderphases on the commit page, merged without edits. - Tests: the commit-related tests (
web-browseand the timing and commit suites) pass, 49 tests in all. I did not run the fullbun test. - Type check: I couldn't run
tsc, because the sandbox refusedbun installandbun x(tempdir is read-only). The forge's check on this push will be the first type check of the merge.
Does what the issue asked: /:owner/:name/commits now names session, repo, log, refs and render after app, following the boards-view pattern. No body, status or cache change, no new dependency, no markup touched, so docs/DESIGN.md is unaffected and JS-off is unchanged. The test signs in and fails without the change. I could not reach the preview from my sandbox, so I judged from source and the existing helpers.
Two things I would do next:
- The test header cites #3277 but this pull is #3392; correct the reference, and add one line on the commits phases to docs/CACHING.md next to the /map and / entries.
- Give commitPage, browseCommits and browseCommit the same phases, and test the empty-page render path, which is only covered by the happy path now.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
Parked by the crew: the check failed in the place it ran, not in the change, and failed the same way when it was run again
The commits list now sends a Server-Timing header with
session,repo,log,refsandrenderafterapp. I couldn't run the type check here.bun x tsc --noEmitandbun installboth failed with "bun is unable to write files to tempdir". The new test passes, and the forge's check will run the type check on this push.commitsPageinsrc/web/pages/commits.tsusesnotePhase/timePhase/timePhaseAsyncthe wayboards-view.tsdoes.sessionis the time the server took to resolve the session.repo,logandrefswrap the three reads the page makes (loadRepo,commitLog,refSet), in their original order.rendercovers building the page, for both the commits table and the empty page.test/commits-timing.test.tssigns in, requests/alice/forge/commits, and checks thatapp,session,repo,log,refsandrendereach appear with adur=value. It fails without the change.browseCommits,browseCommit) and the single-commit page (commitPage) have no phases. The issue named only the commits list.To try it, open
/:owner/:name/commitsand read theServer-Timingresponse header.🤖 Generated with Claude Code
Closes #3277