feat: control-plane web dashboard - #8
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
reset/dump/seed/requests), and a copy-ready connection string.dump()); graceful "not available" message otherwise.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 sendAccept: */*) get the JSON index unchanged.GET /apialways returns JSON. This keeps the existing API contract 100% intact.Verification
test/control-plane.test.ts(+2 tests): HTML served to browsers, JSON preserved forAccept: */*clients (the existing contract), andGET /apialways-JSON.node --check(no syntax errors) and asserted to reference every endpoint it drives.reset,seed; s3 showsreset,requests; stripe showsreset,seed,requests; request log captured a real call; state returns a graceful 501).Notes
main(not stacked) — learned that lesson from the Tier 1 stack.POST /seedAPI already exists for programmatic use.