- Hub emits 3 new flow events: pull (head fetch/propagation, handleHead), conflict
(stale-parent push, handlePush), gc (in-process sweep). Opt-in periodic GC via
'serve --gc-every <dur>' (default off) self-maintains the hub AND animates each
sweep; runGC stays put (no risky refactor of mark-and-sweep).
- Server-side history ring: per-minute activity buckets (push/pull/conflict/gc +
bytes), last 60 min, in /api/state — the sparkline now survives a page reload
(was computed from the live stream only). Recorded under the Emit lock; race-clean.
- Frontend (index.html): pull = teal inbound pulse, conflict = red collision burst,
gc = amber hub sweep + toast; stacked per-minute history sparkline seeded from
/api/state and growing live. One file, no new deps.
- dashboard-fleet-verify.sh: rewritten — drives join·push·pull·conflict·gc and
asserts all 5 on the SSE stream + the history window; adds LOCAL=1 mode (native,
no Pi). Verified locally end-to-end. Tests: TestHistoryRing. go test ./... -race clean.
Single self-contained index.html (vanilla JS + canvas, zero deps/CDN,
go:embed'd, air-gap safe). Cyberpunk net-ops aesthetic: a breathing glowing
hub core with counter-rotating rings, device nodes orbiting (online bright /
idle dim), magenta share nodes; on a push a trailed particle streams
device→core→share then a fan-out ripple to subscribers, joins burst in.
7 glassmorphism metric tiles with hand-drawn canvas sparklines + eased
counters; an auto-scrolling color-coded activity stream (capped 50); SSE
auto-reconnect with a live/reconnecting indicator; ?demo=1 synthesizes a
stream for the wow-factor and offline preview. Built by a worktree subagent
(frontend-design), screenshot-verified against the REAL hub backend — live
/api/state + /api/events both drive it (see docs/images/dashboard.png).
Added a 📦 data-URI favicon (kills the only console 404).
Optional, off by default: devbox-hub serve --dashboard [--dashboard-addr
127.0.0.1:8099]. A separate, loopback-by-default listener (never widens the
API surface; warns if bound non-loopback since it's unauthenticated read-only).
- internal/hub/dashboard: embedded UI (go:embed index.html) + GET /api/state
(hub/totals/devices/shares snapshot) + GET /api/events (SSE live flow stream).
A nil *Dashboard is Emit-safe so hub handlers call it unconditionally.
- meta reads for the snapshot: Devices(), ShareStats() (one rolled-up query),
SumChunkBytes(). 'online' is activity-tracked since hub start (2-min window).
- hub emits 'join' (device enrolled) and 'push' (device→share, bytes/chunks/
snapshot/new_head) flow events.
Tests: state reflects the DB + a push event reaches a live SSE subscriber +
nil-safe Emit. index.html here is a placeholder — the epic frontend lands next.