| Filename | Latest commit message | Latest commit date |
|---|---|---|
Shadow-DOM custom element (attachShadowCss, own <style>, matches the <hive-dialog>/<hive-toast> pattern) that renders any hive_jobq graph from the wire shape hive-jobq-wire serves: a tree from parent/child structure, a state glyph per node, payload.label verbatim, and payload.data as a generic key/value list. Never branches on what a label or data key means, per the wire type's own opaque-payload contract. Fetch endpoint is a configurable attribute (<hive-jobq-graph endpoint="/api/jobq/graph">) rather than hardcoded, and a public render(nodes) method lets a host push pre-fetched data (e.g. from its own SSE stream) instead. No transport of its own beyond the initial self-fetch — refresh() is public so the host decides its own refresh cadence. Verified against real production data (61-node live rebuild-queue graph, fetched from this hive's own /api/jobq/graph) via a jsdom render: correct tree shape, correct state glyphs, correct data-list presence count, both the self-fetching and render()-pushed paths, and the empty-graph path. Not wired into any page yet — the builds.js migration (hyperhive#2812) follows once the open payload-gap question there is settled. |
||
| .. | ||
| 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).