Skip to content

feat: control-plane web dashboard - #8

Merged
dksingh1997 merged 1 commit into
mainfrom
pr5-dashboard
Jun 23, 2026
Merged

feat: control-plane web dashboard#8
dksingh1997 merged 1 commit into
mainfrom
pr5-dashboard

Conversation

@dksingh1997

Copy link
Copy Markdown
Owner

Control-plane dashboard (Tier 5)

Open http://localhost:4700/ in a browser and you get a live dashboard for the whole fleet — no separate process, no build step, no dependencies.

What you see

  • Service grid — every running service with port, protocol, uptime, capability badges (reset / dump / seed / requests), and a copy-ready connection string.
  • Request log viewer — click Requests on any HTTP service to see the recorded calls (method, path, status, duration).
  • State inspector — click State (services that implement dump()); graceful "not available" message otherwise.
  • Reset buttons — per-service and whole-fleet, plus a filter box.
  • Auto-refreshes every 2 seconds.

How it's built (follows SKILL.md)

  • src/dashboard.mjs — one self-contained HTML page (vanilla JS, zero dependencies, no CDN, no build pipeline). It is a pure client of the existing control-plane JSON API (/services, /reset, /services/:slug/{reset,state,requests}) — it adds no new server behavior, so there's nothing new to secure or test on the server side beyond content negotiation.
  • GET / content-negotiates: browsers (Accept: text/html) get the dashboard; programmatic clients (fetch/curl/SDKs send Accept: */*) get the JSON index unchanged. GET /api always returns JSON. This keeps the existing API contract 100% intact.

Verification

  • test/control-plane.test.ts (+2 tests): HTML served to browsers, JSON preserved for Accept: */* clients (the existing contract), and GET /api always-JSON.
  • Dashboard JS validated with node --check (no syntax errors) and asserted to reference every endpoint it drives.
  • Live data-contract check against a real launcher: confirmed the exact fields the grid/requests/state views consume are present and correct (e.g. redis shows reset,seed; s3 shows reset,requests; stripe shows reset,seed,requests; request log captured a real call; state returns a graceful 501).
  • Full suite green on 3 consecutive runs: 255 files / 5495 tests. No leaked processes.

Notes

  • Single PR straight to main (not stacked) — learned that lesson from the Tier 1 stack.
  • Seeding via the UI (a JSON editor) is intentionally out of scope for v1; the POST /seed API already exists for programmatic use.

Open http://localhost:4700/ in a browser for a live dashboard over the
control plane: service grid (port, protocol, uptime, capability badges,
connection string), request-log viewer, state inspector, and per-service +
whole-fleet reset buttons. Auto-refreshes every 2s.

- src/dashboard.mjs: a single self-contained HTML page (vanilla JS, zero deps,
  no build step, no CDN). Pure client of the existing JSON API — no new server
  behavior.
- control-plane GET / content-negotiates: HTML for browsers (Accept: text/html),
  JSON for fetch/curl/SDKs (Accept: */*) so the existing API contract is
  unchanged. GET /api always returns JSON.
- Tests: HTML served to browsers, JSON preserved for API clients, /api JSON.
- docs/control-plane.md + README + CHANGELOG.

Followed SKILL.md (plan/implement/test/docs/changelog/hygiene). Verified the
exact data contract the dashboard renders against a live launcher. Full suite:
255 files / 5495 tests green on 3 consecutive runs; no leaked processes.
@dksingh1997
dksingh1997 merged commit ef266df into main Jun 23, 2026
1 check 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