Skip to content

CODER-004 — Build Status Panel UI (Builds tab/panel in the Coder web surface) #80

Closed

Description

@serge-ivo

Type: Frontend

Description

Add a "Builds" view to the Coder agent UI showing every repo's build status. Each entry: repo/build name + run number, a status badge (✓ success / ✗ failed / ⟳ running / pending), timestamp, and a one-line summary (branch@sha · workflow), with a "View run" link.

Acceptance Criteria

  • A "Repos | Builds" segmented toggle on the all-repos landing view (mirrors the existing "Co-pilot | Terminal" toggle style) switches between ReposList and the new Builds panel.
  • Each build row shows: name/#runNumber, status badge, relative timestamp, branch@sha summary.
  • Status derived from status + conclusion: in_progress→running, queued→pending, completed+success→success, completed+{failure,cancelled,timed_out}→failed, else unknown.
  • Repos that return available:false render a muted "not available (local repo / GitHub App not installed)" row rather than being hidden silently.
  • Empty state when the instance has no GitHub-connected repos.
  • Polls for freshness (~20s) while the Builds view is open; stops when not visible.
  • Scrollable on mobile: scroll container uses overflow-y-auto overscroll-contain and a bounded height (flex-1 min-h-0; use dvh if a fixed/overlay layout is introduced), consistent with the modal scroll fixes already applied.

Technical Notes

  • New file: agents/coder/web/src/BuildsPanel.tsx. Wire to CODER-001 /deployments (or CODER-003 /builds aggregate if available). Reuse api from @proagentstore/sdk/client and usePolling from @proagentstore/sdk/hooks.
  • Edit agents/coder/web/src/CodingTab.tsx: add a landingView: "repos" | "builds" state, wrap the landing return in the flex-col height container (mirror the session-open branch), render the toggle + conditional body.
  • Follow ReposList.tsx card styling (bg-paper border border-line rounded-lg p-3) and the project's lucide-react icon convention. No new shared types needed beyond a local DeploymentRun/Build interface (or promote to types.ts if reused).

Dependencies

CODER-001 (hard). CODER-003 optional (latency only).

Activity

  1. serge-ivo commented on Aug 1, 2026

    @serge-ivo
    ContributorAuthor

    Architectural clarification (CODER-004)

    Token boundary (browser). The browser never holds a GitHub token. It calls the Worker (/builds aggregate — CODER-003, or per-repo /deployments — CODER-001) with only its session JWT bearer; the Worker injects the GitHub App installation token server-side and returns sanitized run fields. The panel renders those fields — no token, no raw GitHub payload.

    Poll cadence honors the tier model. While the Builds view is visible, refresh at the active cadence (~30s) and prefer the aggregate /builds call so it's one request regardless of repo count (fall back to per-repo /deployments). When the view is hidden, stop. Once CODER-007 lands, switch to WebSocket push and drop polling entirely.

  2. serge-ivo commented on Aug 2, 2026

    @serge-ivo
    ContributorAuthor

    Shipped in eff1f6d — closing

    New agents/coder/web/src/BuildsPanel.tsx + a Repos | Builds toggle in CodingTab.

    • Wired to the CODER-003 aggregate GET /coding/builds — one call, latest run per repo (not N per-repo /deployments).
    • Each row: repo name + #runNumber, status badge (✓ Success / ✗ Failed / ⟳ Running (spinner) / Pending / Unknown), relative timestamp, branch@sha · workflow summary, and a View run link.
    • Status derived exactly per the AC: in_progress→running, queued→pending, completed+success→success, completed+{failure,cancelled,timed_out}→failed, else unknown.
    • Repos returning available:false render a muted "Not available (local repo / GitHub App not installed)" row — shown, not hidden. Empty states for no-repos and no-GitHub-connected-repos.
    • Polls every 20s while the Builds view is open, and stops when not visible (CodingTab only mounts BuildsPanel while landingView === 'builds', so unmount halts the poll).
    • Mobile-scrollable: flex-1 min-h-0 overflow-y-auto overscroll-contain, consistent with the earlier modal scroll fixes.
    • The Repos | Builds segmented toggle mirrors the existing Co-pilot | Terminal control; it's an internal toggle within the existing coding surface, so no console-shell/surface-registry change was needed.

    tsc --noEmit clean (coder/web). Next: CODER-005 (#81) — the Working/Idle/Error header indicator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfrontendFrontend / UI work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions