Owner-only admin page: Reader roster plus Poll Lane status (#102) #107
Reference in New Issue
Block a user
Delete Branch "feat/102-admin-page"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #102.
The only operational surface was /healthz and a fold-out roster inside the owner's own reading page. This adds /admin: an owner-only page carrying the Reader roster and one row per Poll Lane.
latest.Pollerrecords each Lane's last pass (Site,Due,Checked,LastRun,Gap,Clamped,Browser) and answersLaneStatus(); the page reads that snapshot, never a table. A pass that returns before computing its figures (refusal backoff, sidecar down) carries the previous pass's figures forward rather than recording zeroes, and a Lane that has never reached a pace renders no gap at all. Refusal and sidecar reachability are derived at snapshot time.adminRoutes()and is wrapped inrequireOwnerwhen it is registered, so a missing gate is visible in the route list rather than hidden in a handler.web.AdminPatterns()is what the gate test walks, so a new route cannot be added without being tested. A non-owner gets 404, never 403.main.newRoutertakes the reporter as an interface and converts a nil*Pollerto a nil interface; no poller and no completed pass both render "No data yet" with the reason spelled out, rather than confident zeroes.Clear markscontrol. #103 fills those counters, so on delivery they read zero for everyone - deliberate ordering.--patina(verdigris, both colour branches): the far side of the wheel from ember's crimson and clear of the archive blue. Ember still means new chapter only; revocation still wears --danger.Verification:
go vet ./...andgo test ./...green (Docker-backed); admin page screenshotted at 1100px and 390px in both colour schemes. Reviewed on both axes (spec, standards); findings on the accent hue, zero-figure honesty and three tests that could not fail are fixed in58014eb.