Public: anyone can read this; the crew can change it.
The accounts page's Server-Timing names its phases: session, each read, render #3456
Check · Review · Land · Live done — Landed and live in production.
`GET /settings/accounts` now answers with a Server-Timing header that names `session`, `accounts`, `mail`, `orphans`, `owned` and `render`. The new test and the existing accounts tests pass (32 in total). I couldn't run the type check: `bun x tsc --noEmit` failed here with "unable to write files to tempdir", so the forge's check will be its first run.
shipped production is serving it deploy ddc329f
GET /settings/accounts now answers with a Server-Timing header that names session, accounts, mail, orphans, owned and render. The new test and the existing accounts tests pass (32 in total). I couldn't run the type check: bun x tsc --noEmit failed here with "unable to write files to tempdir", so the forge's check will be its first run.
- Phases:
accountsPagerecordssessionthe waymilestones.tsdoes. The data reads are wrapped withtimePhase:accountsis the account list,mailis whether mail is configured,orphansis the organizations with no active owner, andownedis the per-row sole-owned-organizations lookup.rendertimes building the page. The edits are insrc/web/pages/accounts.ts. - Moved read: the
ownedlookup used to run inside the row markup. It now runs once before rendering, as a list indexed by account. It returns the same values and runs after the other reads, as it did before. - Unchanged: the body, status codes and caching are the same, and no other page is touched.
- Test:
test/accounts-timing.test.tsrequests the page as an admin. It asserts each of the six names appears exactly once with a numeric duration, and never checks a wall-clock time. I did not confirm that it fails without the change. - Not done: the POST acts that re-render the page (the 409 refusals) also record the four read phases and
render, but notsession. I left them that way rather than split the view in two.
Approved. The change follows the pattern in settings.ts, boards-view.ts and forges.ts (notePhase/takeSessionTime/timePhase). Markup, status codes and caching are unchanged, so nothing here departs from docs/DESIGN.md and nothing needs JavaScript. Moving the per-row owned lookup out of the markup keeps the output the same and gives it a name. The test checks each of the six names once with a numeric dur, and no wall-clock value. I could not reach the preview from my sandbox (the host is blocked), so I judged the header from the source and the test only.
Two things I would do next:
- Add the missing session phase to the POST re-render path, or split accountsView so a 409 page has the same phases as the GET. It is minor.
- Prove the test fails without the change. The builder said that was not checked, and the type check was not run either, so the forge check is the first to run it.
GET /settings/accountsnow answers with a Server-Timing header that namessession,accounts,mail,orphans,ownedandrender. The new test and the existing accounts tests pass (32 in total). I couldn't run the type check:bun x tsc --noEmitfailed here with "unable to write files to tempdir", so the forge's check will be its first run.accountsPagerecordssessionthe waymilestones.tsdoes. The data reads are wrapped withtimePhase:accountsis the account list,mailis whether mail is configured,orphansis the organizations with no active owner, andownedis the per-row sole-owned-organizations lookup.rendertimes building the page. The edits are insrc/web/pages/accounts.ts.ownedlookup used to run inside the row markup. It now runs once before rendering, as a list indexed by account. It returns the same values and runs after the other reads, as it did before.test/accounts-timing.test.tsrequests the page as an admin. It asserts each of the six names appears exactly once with a numeric duration, and never checks a wall-clock time. I did not confirm that it fails without the change.render, but notsession. I left them that way rather than split the view in two.Closes #3426