Two bugs on the agent terminal page after the #362 overhaul: ## 1. `↓ N new` pill clipped by the composer The fixed-overlay composer (z-index 30, agent.css) sits in the root stacking context. The pill — `position: absolute` inside `.live.terminal` with no z-index — defaults to its document-order position in the body's stacking order, which the composer covers. Fix: bump `.agent-main .tail-pill { z-index: 35 }` so the pill participates in the root stacking context above the composer. Scoped to the agent-page overlay layout — the shared `.tail-pill` rule stays untouched (the dashboard's in-page layout doesn't need the bump). ## 2. Autoscroll-on-new-message not firing when the operator was already at the bottom `afterAppend()` in terminal.js was calling `isNearBottom()` AFTER appending the new row. The new row's own height is already in `scrollHeight` at that point, so for any row taller than the NEAR_BOTTOM_PX threshold (48px — easily passed by a multi-line message body, a tool-result summary, a markdown block), the check returns false and the pill shows + scroll stays put. Fix: capture `wasNearBottom = isNearBottom()` BEFORE the `log.appendChild(...)` in each of `row` / `details` / `detailsDiff`, pass it into `afterAppend(wasNearBottom)`. Now the auto-scroll triggers whenever the operator was visually at the bottom an instant before the row landed, regardless of the new row's height. Same shared `@hive/shared/terminal.js` is used by the dashboard + per-agent UI + the upcoming /flow.html page, so both pages inherit the fix. ## Validation `npm run build` clean. Bundle deltas: shared terminal bundle re-inlined into both consumers unchanged in size (the wasNearBottom variable is a single bool, no measurable delta). Agent CSS +0.1kb (z-index property). Browser smoke test isn't possible from inside iris's container — worth eyeballing post-deploy: - With the operator scrolled to bottom, a tall message lands and the view scrolls to keep it visible (instead of pinning the pill). - The pill appears above the composer when the operator is scrolled up and new messages land. Closes #375. |
||
|---|---|---|
| .. | ||
| 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).