Skip to content

Deployments status page — Vercel-style build/deploy view for the NAS pipeline

Why

The NAS deploy is unstable and a build takes ~20–25 min, so the owner needs to SEE build status at a glance instead of an agent hand-watching GitHub Actions. Extends the build-observability theme of T-108 (the always-on corner watermark) with a fuller, dedicated view.

Owner request (verbatim, 2026-06-24): "Can you actually build a status page mimicking the deployment page of Verel so that I could see the build status? If it's a lot of work, then forget about it."

Judged it moderate (not "a lot of work") + high recurring value → built it.

What shipped

/deployments (admin-gated) — a Vercel-style list of the nas-image.yml GitHub Actions runs (each run builds the image AND deploys it to the NAS, so 1 run = 1 deployment): - Per row: status Building / Ready / Error / Canceled (mapped from status + conclusion), commit SHA + message, branch · event · actor · attempt, relative time + duration, link to the run log. - A live-build banner: compares the running bundle's own NEXT_PUBLIC_BUILD_SHA (the SAME value the T-108 corner stamp shows) against the latest successful build → "On the latest build" / "A new build is in progress…" / "Newer build X is ready — hard-refresh". The matching row gets a ● Live tag. - Auto-refreshes every 15 s so a Building row updates live; manual Refresh too.

pages/api/deployments.ts — admin-gated (getServerSession + isAdminLikeRole), fetches the runs from the GitHub API + normalises them. Token: reuses the app's runtime GH_ADMIN_PAT (falls back to GITHUB_TOKEN) — both are already in the deployed env (confirmed on the NAS), so NO new secret / provisioning. The token never leaves the server. Linked from the Tools page.

Verified

tsc clean. The GitHub fetch + normalisation tested against the LIVE API (status 200; rows map correctly — 39af188 Ready, the cancelled supersedes, durations). Live visual is owner-confirmed on deploy: the page is admin-gated (like the sign-test), so it can't be auto-screenshotted unauthenticated.

Decision log

  • Attestation: read AGENTS.md + checked the board by scope — extends T-108's build observability with a fuller view; a distinct deliverable (a page + API + nav), no existing task covered it. Source: EOP Local Assistance (fork) · session edb0abc7-6373-449b-8e31-379fd38d391b (local Claude Code). Proposed + approved by the owner (quoted above), 2026-06-24.

Blast radius: new /deployments route + app/deployments/{page,client}.tsx + pages/api/deployments.ts + a Tools-page panel link. READ-ONLY (GitHub Actions API) — no data or deploy mutations. Reuses the existing admin gate and the app's existing GitHub token; the watermark stamp (T-108) is the live-build source of truth.