Skip to content

W11: rewrite /status to consume real backend GET /api/v1/status#61

Merged
mastermanas805 merged 1 commit into
mainfrom
feat/w11-status-real-backend-dashboard-fresh
May 14, 2026
Merged

W11: rewrite /status to consume real backend GET /api/v1/status#61
mastermanas805 merged 1 commit into
mainfrom
feat/w11-status-real-backend-dashboard-fresh

Conversation

@mastermanas805
Copy link
Copy Markdown
Member

Summary

Replaces the previous client-side probe loop on /status with a server-side aggregate. Before this PR the page had a fatal failure mode caught by persona-3: when instanode's edge was down, the browser-side probe was ALSO down — the page either failed to load or reported green-on-green.

  • fetchStatus() in src/api/index.ts — GET /api/v1/status, public, 60s cache. Returns honest empty payload on any failure.
  • StatusPage.tsx rewrite — one row per component, 96-segment 24h uptime bar, 7d + 30d uptime %, banner aggregates worst component status.
  • Current incidents section — maps the (today-empty) current_incidents array. When the incident-feed worker ships, real rows appear without a dashboard change.
  • Polls every 60s. Public — still mounts under PublicShell.

Companion PRs land in api and worker.

Test plan

  • npx vitest run src/pages/StatusPage.test.tsx — 8 new tests
  • npx vitest run — all 481 tests pass (24 files)
  • After deploy: visit instanode.dev/status and verify bars render with real probe data

🤖 Generated with Claude Code

Replaces the previous client-side probe loop on /status with a server-
side aggregate. Before this PR the page had a fatal failure mode caught
by persona-3: when instanode's edge was down, the browser-side probe
was ALSO down — the page either failed to load or reported green-on-
green.

Now the page:
  * Fetches /api/v1/status (60s cache, public, no auth) via the new
    fetchStatus() helper in src/api.
  * Renders one row per component with a 96-segment "last 24h" bar
    (15-min slots, green = healthy, red = unhealthy).
  * Surfaces a "Current incidents" section that maps the (today-
    empty) current_incidents array. When the incident-feed worker
    ships, real rows appear without a dashboard change.
  * Polls every 60s (matches the api TTL — polling faster yields
    the same bytes).
  * Falls through to an honest error banner on any fetch failure
    instead of crashing.

Tests: 8 new in StatusPage.test.tsx covering row rendering, 96-slot
bar, banner aggregation across operational/degraded/down, incidents
empty + non-empty, and the two failure paths (ok=false, rejected
promise).

Companion PRs land in api (GET /api/v1/status, migration 035) and
worker (uptime_prober).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mastermanas805 mastermanas805 merged commit 2602c81 into main May 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant