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. |
||
|---|---|---|
| .. | ||
| blobstore | ||
| dashboard | ||
| meta | ||
| blob_traversal_test.go | ||
| events.go | ||
| join_pop_test.go | ||
| limits_test.go | ||
| server.go | ||
| server_test.go | ||
| sharename.go | ||
| sharename_test.go | ||