| Filename | Latest commit message | Latest commit date |
|---|---|---|
Mara on #774: previous batches were cookie-stripping rather than prose migration. This batch actually moves substantive comment prose from tabs.js into docs/web-ui.md. Moved to docs/web-ui.md: - Container row → **Icon layout + load strategy** sub-paragraph (new): absolute-positioning rationale (so img load state can't reflow row), fire-and-forget load pattern (no pre-check reachability), favicon fallback chain, icon-unreachable class, the immediate-fallback-when-stopped optimisation. - Container row → **Pending-state derivation** paragraph (new): three-source priority order (transient → in-flight queue → none), why ContainerStateChanged isn't enough, the opRunning flag's role in driving the pending-running class + spinner. Collapsed in tabs.js: - Icon block (~14 lines of WHY comments + pointer to docs) → 4-line pointer + behavioural one-liner. Drops #177 / #195 / #202 cookies en passant since their substance now lives in docs. - Pending-state block (~22 lines split across two paragraphs) → 4-line pointer. Drops #769 self-cookie (the queued vs running split lives in docs::Container row now). - SharedWorker EventSource (~7 lines) → 5-line pointer. Drops #448 cookie (the SSE multiplexing paragraph in docs already has the design + Firefox throttling rationale; the in-code comment was duplicating). - M4TR1X tab gating (~4 lines) → 2-line pointer. Drops #607 cookie in both tabs.js + docs/web-ui.md::Tab strip (the substance was already in docs, just had the cookie attached). tabs.js: 11 → 6 refs (92% reduction from baseline 73). Net effect: ~47 lines of substantive prose moved out of tabs.js into docs/web-ui.md, where it belongs. |
||
| .. | ||
| 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).