| Filename | Latest commit message | Latest commit date |
|---|---|---|
Substantial prose migration from @hive/shared/terminal.js (the shared HiveTerminal factory backing #msgflow + #live across both dashboard and per-agent UIs) into a new docs subsection. Added to docs/web-ui.md as a new ### Shared terminal pane subsection under ## Shape (shared by both) — ~78 lines of new substantive prose: - **api shape**: row / details / detailsDiff factory contract - **Sticky-bottom + snap animation**: stickToBottom semantics + 140ms ease-out vs 500ms browser default + 24px short-circuit; per-frame target re-eval extends destination through mid-animation mutations - **Mid-animation scroll-event guard**: smoothScrollingUntil timestamp swallows the rAF-driven scroll events so the eased positions don't flip stickToBottom false partway - **Post-append MutationObserver**: catches renderer mutations after api.row returns (badges, multi-line bodies, tool panes) + why programmatic scrollTop writes don't feedback-loop - **Backfill + SSE**: history/stream envelope shape (seq, events), kind-aware seq dedupe at the boundary, .no-anim during replay, optional streamFactory for SharedWorker integration - **linkify**: text-node-only autolink, XSS-safe by construction, trailing-punctuation strip Collapsed in terminal.js (cookies en passant): - #400 (snap animation timing — closed) × 3 → docs pointers - #393 (post-append MutationObserver — closed) × 1 → docs pointer - #375 (pre-append nearBottom snapshot — closed) × 1 → docs pointer - #448 (streamFactory SharedWorker hook — closed) × 1 → docs pointer - #163 (seq dedupe + onStreamOpen resync — closed) × 2 → drop cookies; substance lives in docs - #233 (linkify) × 1 → docs pointer + terminal.css cookie scrub terminal.js: 8 → 0 #NNN cookies (100% reduction). terminal.css: 1 → 0 issue-ref cookies (remaining 1 match is a hex color literal). Net effect: ~50 lines of substantive WHY-prose moved out of shared frontend into docs/web-ui.md, where it documents the factory's contract for both consumer pages. |
||
| .. | ||
| 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).