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

Home opens with a KPI row: landings per hour, live version, median check time #2863

Parked opened this
Closed without merging

Home now opens with a KPI row: landings per hour, the live version, and the median check time. It's server-rendered and sits in place of the old live: since … line.

Notes

stopped parked by the crew

opened this

Home now opens with a KPI row: landings per hour, the live version, and the median check time. It's server-rendered and sits in place of the old live: <sha> since … line. The new test/home-kpis.test.ts and the neighbouring suites I re-ran (releases page, home feed, studio door, live pages, home walk, flow throughput) pass, and tsc is clean. I didn't run the full check or look at the row in a browser, including at 360px.

  • Landings per hour: counts commits on the first-parent line of FORGE_REPO's default branch over 24 h, shown as a day average ("0.1/h") with an hourly sparkline (hour 0 is the last hour). A commit with no changed paths, such as --allow-empty or a re-merge of an already-landed pull, is not counted. It links to /boards. It reads git log for that repo with a 24 h window. It shows "—" when FORGE_REPO is unset or unreadable.
  • Live version: version · sha and "live since …", linking to /releases. The tile keeps id="live-release", so the releases-page test about non-admins still holds. I removed liveLine from src/web/pages/releases.ts, since the tile replaces it.
  • Median check time: the median duration of check runs that finished (ok or failed) in the last 24 h, shown as "45 s", "1.0 min" or "1.2 h". It links to /boards for now, because /flow redirects there and I found no better page for checks. It shows "—" when no check finished in the window.
  • Styling: tokens only. Each tile has a fixed minimum height and the tiles wrap in an auto-fit grid, which should read at 360px. The CSS is in kpiCss, wired into studioCss.
  • Who sees it: only those who may read releases (admins and readers of FORGE_REPO), the same gate the live line had. Everyone else gets no row.

Tests: seeded commits (one 30 h old, one 5 h old, two in the last hour, plus an empty commit in the last hour) give 2 / 5 h-ago 1 / 3 total, and the empty commit adds nothing. Seeded checks give a 60 s median; a check 48 h old and one still running are excluded. A separate test covers the home render: tile links, "0.1/h", "1.0 min", and no row for an anonymous visitor.

Left out: no caching of the git read. It's one bounded git log per home view, and a short TTL cache is easy to add if it ever shows up in timings. The row's tiles are not live-updating.

No new dependencies, and the README is updated.

Closes #2739

commented

Home now opens with a KPI row: landings per hour, the live version, and the median check time. It's server-rendered and sits in place of the old live: <sha> since … line. The new test/home-kpis.test.ts and the neighbouring suites I re-ran (releases page, home feed, studio door, live pages, home walk, flow throughput) pass, and tsc is clean. I didn't run the full check or look at the row in a browser, including at 360px.

  • Landings per hour: counts commits on the first-parent line of FORGE_REPO's default branch over 24 h, shown as a day average ("0.1/h") with an hourly sparkline (hour 0 is the last hour). A commit with no changed paths, such as --allow-empty or a re-merge of an already-landed pull, is not counted. It links to /boards. It reads git log for that repo with a 24 h window. It shows "—" when FORGE_REPO is unset or unreadable.
  • Live version: version · sha and "live since …", linking to /releases. The tile keeps id="live-release", so the releases-page test about non-admins still holds. I removed liveLine from src/web/pages/releases.ts, since the tile replaces it.
  • Median check time: the median duration of check runs that finished (ok or failed) in the last 24 h, shown as "45 s", "1.0 min" or "1.2 h". It links to /boards for now, because /flow redirects there and I found no better page for checks. It shows "—" when no check finished in the window.
  • Styling: tokens only. Each tile has a fixed minimum height and the tiles wrap in an auto-fit grid, which should read at 360px. The CSS is in kpiCss, wired into studioCss.
  • Who sees it: only those who may read releases (admins and readers of FORGE_REPO), the same gate the live line had. Everyone else gets no row.

Tests: seeded commits (one 30 h old, one 5 h old, two in the last hour, plus an empty commit in the last hour) give 2 / 5 h-ago 1 / 3 total, and the empty commit adds nothing. Seeded checks give a 60 s median; a check 48 h old and one still running are excluded. A separate test covers the home render: tile links, "0.1/h", "1.0 min", and no row for an anonymous visitor.

Left out: no caching of the git read. It's one bounded git log per home view, and a short TTL cache is easy to add if it ever shows up in timings. The row's tiles are not live-updating.

No new dependencies, and the README is updated.

commented

Parked by the crew: the check failed ("dev's vocabulary never reaches a studio page > every studio page — home, app, tell, working, look, shipped, search and the three lists: no dev word, the studio chrome, the security floor, and a page a diff would never fit in") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs