Commit graph

3 commits

Author SHA1 Message Date
80380652cc feat(dashboard): P3 depth — pull/gc/conflict flow events + server-side history ✨📊
Some checks are pending
CI / vet-build-test (push) Waiting to run
- 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.
2026-06-23 20:45:31 -05:00
03469958d3 chore: prep for public release — MIT license + github.com module path 🌍⚖️
Some checks are pending
CI / vet-build-test (push) Waiting to run
- LICENSE: MIT (enables the adoption push; public repo was all-rights-reserved).
- go.mod + all imports: git.shoemoney.ai/shoemoney/devbox -> github.com/shoemoney/devbox,
  so outsiders can 'go install github.com/shoemoney/devbox/cmd/devbox@latest'. Forgejo
  stays the self-hosted home; the registry (devbox-hub) + public dist (devbox-dist) are
  unchanged. vet + build + go test -race all green after the rename.
- README: document the go install path.

Security: full git-history scan (manual blob sweep + gitleaks, 84 commits) found
ZERO secrets — Forgejo token never committed, no keys/passwords/private keys.
2026-06-23 19:19:09 -05:00
2d407d418a feat: hub live dashboard backend — state + SSE flow stream 📊🛰️
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.
2026-06-23 12:35:36 -05:00