Skip to content
This repository was archived by the owner on May 26, 2026. It is now read-only.

feat(KR-P2-DASHBOARD): Kora overview landing page (capstone aggregator)#63

Merged
rafe-walker merged 1 commit into
mainfrom
feat/kora-KR-P2-DASHBOARD
May 21, 2026
Merged

feat(KR-P2-DASHBOARD): Kora overview landing page (capstone aggregator)#63
rafe-walker merged 1 commit into
mainfrom
feat/kora-KR-P2-DASHBOARD

Conversation

@rafe-walker

Copy link
Copy Markdown
Owner

Summary

Capstone of the 9-panel CC#2 admin-UI series. One-glance daily-driver page that becomes the new `/` landing page (replaces redirect-to-`/sessions`). Joshua hits `/` and sees Kora's full operational posture at a glance:

  • Health hero up top (HEALTHY / DEGRADED / STOPPED / OUTAGE)
  • 6-card grid: Operational / Cost / Sea Tickets / STOP-KORA / Last boot / DR
  • Each card click-throughs to its detail panel

Pure frontend aggregator — no new backend, no new `api.ts` types. Reuses the 7 endpoints CC#2 has already shipped (#26 OPS, #31 SEA, #37 CONTROL, #45 BOOT, #49 COST, #54 HEALTH, #58 DR).

Page (web/src/pages/DashboardPage.tsx)

  • Parallel fetch — `Promise.allSettled` on mount; one slow/broken endpoint can't stall the rest.

  • Per-card LoadStatus state machine (loading / ready / error) — error cards render red-bordered with a Retry button so a broken endpoint degrades to a single bad card, not a broken dashboard.

  • Health hero — large click-through card to `/health-rollup`; tone-coded icon + big uppercase status + control-plane + worker pills + `stopped_reason` when present.

  • 6 grid cards (responsive 1/2/3 columns):

    Card Highlights shown
    Operational `primary_state` + `claim_permission` + degraded flag
    Cost `$spent / $pool` + active rung + effective model tier
    Sea Tickets first `in_progress` title + claim # + queued count, or "Idle (N queued)"
    STOP-KORA highest open level + lifecycle pill, or green "No active commands"
    Last boot outcome badge + elapsed + started "X ago"
    DR "Clean (epoch N)" green, or red "DR detected — runbook pending"
  • Per-card "(stubbed)" indicator auto-derived from each endpoint's `stub` flag.

  • Subdued info banner at top when ANY source is stubbed: "Some cards show preview data — flips to real as runtime buckets ship."

  • Manual Reload (consistent with all 9 prior panels — no auto-refresh).

  • Bottom strip — links to Sessions / Capabilities / Skills / Plugins / Identity / MCP / Cron / Profiles / Config / Env / Detailed health.

App.tsx changes

  • `/` route flipped from `RootRedirect` → `DashboardPage`.
  • `RootRedirect` declaration deleted (was only referenced from that one route; `UnknownRouteFallback` still inline-redirects to `/sessions` unchanged for 404s — those shouldn't dump operators onto a hero page).
  • "Overview" nav entry added at top of `BUILTIN_NAV_REST` (LayoutDashboard icon, above `/sessions`).

Auto-improvement

As KR-P2-CLEANUP (CC#3 in flight) / K / L / M land and flip the upstream endpoints stub → real, the "(stubbed)" badges drop and the subdued banner disappears without any change here. Today's render mix (per current main): boot/cost/sea/control/health/dr all stubbed, operational already-flipped (PR #35), capabilities already-real. The badge collection is the visible map of remaining wire-in work.

Test plan

  • No new tests — dashboard is pure composition of already-tested endpoint shapes; 107/107 across the 11-suite admin-panel test set still pass
  • `npx tsc -b` on `web/` — clean
  • `npx vite build` on `web/` — clean
  • Manual smoke: navigate to `/`, verify all 6 cards + hero render with the live mix of stub + real data current on main; verify subdued banner appears (most cards are still stubbed); verify clicking each card lands on the correct detail panel; verify Reload refreshes all 7 in parallel

Dependency notes

Self-contained — depends only on already-merged endpoints. Auto-flips as upstream runtime buckets land.

🤖 Generated with Claude Code

…r over 7 admin endpoints)

One-glance daily-driver page: Joshua hits / and sees Kora's full
operational posture — overall health hero, then a 2×3 grid covering
Operational / Cost / Sea Tickets / STOP-KORA / Last boot / DR. Each
card click-throughs to the detail panel it summarises.

Capstone of the 9-panel admin-UI series. Pure frontend aggregator
over the existing api.ts methods — no new backend endpoints, no new
api.ts types. Replaces the prior `/` → `/sessions` redirect.

Frontend:
  - pages/DashboardPage.tsx —
    * Fetches 7 panel endpoints via Promise.allSettled on mount so
      one slow/broken endpoint can't stall the rest of the page.
    * Per-card LoadStatus state machine (loading / ready / error)
      with red-bordered error card + per-card Retry button — one
      broken endpoint degrades to a single bad card rather than
      breaking the whole dashboard.
    * Overall health hero (large, click-through to /health-rollup):
      big uppercase status word + tone-coded icon + control_plane
      and worker pills + stopped_reason when present.
    * 6 grid cards (responsive 1/2/3 columns):
        Operational : primary_state + claim_permission + degraded
        Cost        : $spent/$pool + active_rung + effective_model_tier
        Sea Tickets : first in_progress title + claim # + queued count
        STOP-KORA   : highest open level or "No active commands"
        Last boot   : outcome + elapsed + started "X ago"
        DR          : "Clean (epoch N)" or red "DR detected"
    * Per-card "(stubbed)" indicator pulled from each endpoint's
      stub flag — auto-disappears as the upstream runtime buckets
      ship and the flag goes away (no FE change needed).
    * Subdued info banner at top when ANY source is stubbed:
      "Some cards show preview data — flips to real as runtime
      buckets ship."
    * Manual Reload button at top-right; no auto-refresh (consistent
      with all 9 prior panels).
    * Bottom-strip links to Sessions / Capabilities / Skills /
      Plugins / Identity / MCP / Cron / Profiles / Config / Env /
      Detailed health — Dashboard becomes the new entry point for
      the whole admin surface.
  - App.tsx —
    * `/` route flipped from RootRedirect (→/sessions) to
      DashboardPage.
    * RootRedirect declaration deleted (was only referenced from
      that one route; UnknownRouteFallback still inline-redirects to
      /sessions, unchanged).
    * "Overview" nav entry added at TOP of BUILTIN_NAV_REST with
      LayoutDashboard icon, above /sessions.

Tests: no new tests — the dashboard is pure composition of already-
tested endpoint shapes (107/107 across the full 11-suite admin-panel
test set still pass). tsc -b + vite build clean.

Dashboard auto-improves: as KR-P2-CLEANUP / K / L / M land and the
upstream endpoints flip stub→real, the "(stubbed)" badges drop and
the subdued banner disappears without any change here.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant