| Filename | Latest commit message | Latest commit date |
|---|---|---|
Adds a 'sessions' chip to the per-agent stats summary panel showing how many fresh claude sessions started within the selected time window. Backend (hive-agent/src/stats.rs): - New optional field `session_count: Option<u64>` on `Snapshot` (skip_serializing_if = None — inert-until-data, same pattern as first_turn_ctx). Counts rows in the `sessions` table whose started_at falls within the window; returns None when the table doesn't exist on an older db. - New `read_session_count(conn, from)` helper (rusqlite::Result so the caller maps Err to None). - Extracted per-row accumulation loop into `TurnAccum` struct + `push()` method to keep `snapshot()` under the too_many_lines limit. Frontend (frontend/packages/agent/src/stats.js): - New 'sessions' chip added to renderSummary, guarded by `typeof s.session_count === 'number'`, placed before the existing first-turn-ctx chip. |
||
| .. | ||
| packages | ||
| .gitignore | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
hyperhive frontend
npm workspaces project for the hyperhive browser-facing assets:
packages/shared/— shared modules used by both surfaces (terminal pane, Catppuccin palette + body typography).packages/dashboard/— the hive-c0re dashboard SPA.packages/agent/— the per-container web UI (default agent page, stats, screen).
Build
npm install # one-off; uses the checked-in package-lock.json
npm run build # builds every workspace into packages/*/dist/
The Rust binaries serve packages/dashboard/dist/ and
packages/agent/dist/ via tower_http::ServeDir at runtime; the
build derivation is wired up in nix/modules/frontend.nix. Per-agent
additions are layered on top of the default agent dist via the
hyperhive.frontend.extraFiles option in agent.nix.
Why npm + esbuild
- Hermetic: dependencies vendored via the checked-in lockfile;
buildNpmPackagein nix uses it as the source-of-truth so the output is reproducible without network access at build time. - esbuild: vanilla-JS bundler, no framework runtime overhead.
Each workspace's
build.mjsis ~30 lines. - Single-PR migration: see issue #273 for the design proposal and the four-commit shape (npm scaffold → nix derivations → container plumbing → Rust cutover).