swactor/crates/dashboard
Zachery Aaron Shores-Chmielewski 3fc43cc311 fix(dashboard): bind the server to loopback
Restrict the local dashboard listener to 127.0.0.1 instead of exposing it on every interface, with a listener-address regression test.
2026-08-28 02:09:38 +04:00
..
proptest-regressions feat(myelin): enforce actor-owned control flow 2026-08-20 01:46:11 +04:00
src fix(dashboard): bind the server to loopback 2026-08-28 02:09:38 +04:00
.gitignore feat: stability for deployment and distribution (#44) 2026-02-19 14:39:33 +00:00
AGENTS.md feat(telemetry): add sequenced runtime dashboard signals 2026-08-24 01:28:38 +04:00
Cargo.lock refactor: datastream crate is now telemetry 2026-08-15 12:18:56 +04:00
Cargo.toml fix(dashboard): improve control and hardware views 2026-08-23 15:51:24 +04:00
README.md perf(runtime): bound telemetry and hot-path work 2026-08-24 19:22:33 +04:00

dashboard

Read-only HTML/SSE dashboard over incoming telemetry frames.

The crate owns the Axum server, bounded raw frame window, view registry, and application plugin-page registry. Component crates can keep telemetry views beside their code and register them through DashboardHandle::register_view. An embedding application can pass DashboardPlugin values to DashboardHandle::with_plugins; each plugin contributes an application-owned router and optional PluginPage metadata/HTML. The built-in control-plane view is hosted here because worker/actor/message processing is universal to swactor programs.

The control-plane page fuses machine stats, actor telemetry, and a 50-line stdout/stderr tail per node stream: node cards (CPU/GPU/net + actor rollup) → per-node actor roster and output cue → per-actor dossier. Pre-join provisioning output is keyed by run/node identity and merges into the joined runtime card. The Rust type name is the actor's display name; the address is the unique key. Stale streams (silent beyond the liveness window) render in a separate collapsed pool, superseded life generations are evicted immediately, and the stale pool is hard-capped at 50.

Routes

  • GET / — fleet control plane (home; same page as /view/fleet)
  • GET /events — raw incoming frames as SSE
  • GET /api/frames — recent raw frame window
  • GET /api/views — registered view metadata
  • GET /view/telemetry/live — generic live explorer over retained and incoming telemetry frames
  • GET /api/view/telemetry/live — bounded bootstrap snapshot: up to 500 recent frames and 256 KiB of raw payload, distributed across channels; retention remains 500 frames per stream/channel for live inspection
  • GET /view/fleet — fused control-plane page (machine + actors per node)
  • GET /api/view/fleet — live/stale pools with per-node machine and roster snapshot
  • GET /api/view/fleet/detail?stream=<node#life>&actor=<addr> — bounded per-actor dossier detail (diet, history, sampled receipts)

Every page carries the unified top navbar, built from the view and plugin-page registries at serve time. Pages include a <!--swactor:nav--> placeholder and the server substitutes the links, so registered telemetry views and application plugin pages appear automatically.

Dashboard-owned state is derived only from observed frames, and the dashboard crate sends no control signals back to producers. A plugin router remains owned by the embedding application; composing that router does not grant dashboard views mutation capabilities.