hyperhive/frontend/packages/swarm-ui/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
iris 1111577c91 extract build-queue rollup as a shared Preact component
New @hive/shared/jobq-rollup.js (JobqRollup.tsx + jobq-rollup.css),
mirroring JobqGraph's shape exactly: JSX use plus an imperative
mountJobqRollup(container, props) for a plain-.js call site. Fetches
Vec<hive_jobq_wire::StateCount> off `endpoint`, sums Running+Finishing
roots as "running" and Pending roots as "queued", renders nothing when
both are zero. Optional `queueHref` adds a "view queue -> " link.

Swapped dashboard's hand-rolled queue-summary banner (swarm.js) over to
this component instead of keeping two parallel implementations - same
"one shared component" pattern JobqGraph already set for the rebuild
queue tree view. Mounted once into a new #jobq-rollup-section, kept as
a sibling of (not inside) #containers-section since that section gets
replaceChildren()-wiped on every container-state render, which would
tear down and remount a Preact tree on every tick. Refreshed via the
mount handle's .refresh() on rebuild_queue_changed, same as builds.js's
JobqGraph handle.

Also mounted in swarm-ui's /jobs page, above JobqGraph, with no
queueHref (a link back to the page you're already on is noise) - the
literal ask on hyperhive#3364.

Verified: npm run build (whole workspace) and swarm-ui typecheck both
clean, comment-block + issue-ref lints run manually, headless-chromium
screenshots of both the dashboard SW4RM tab and swarm-ui's /jobs page
against mocked /api/jobq/rollup payloads - banner renders identically
in both, with and without the queue link as expected.
2026-08-16 22:08:38 +02:00
..
pages extract build-queue rollup as a shared Preact component 2026-08-16 22:08:38 +02:00
shell swarm-ui: add a jobs tab, and type JobqGraph as real TypeScript 2026-08-16 17:30:06 +02:00
ui swarm-ui: colocate component CSS as JS-side-effect imports 2026-08-12 21:33:44 +02:00
App.tsx swarm-ui: extract overview into its own page component 2026-08-16 19:05:01 +02:00
colors.css swarm-ui: bootstrap new swarm-level frontend (Preact + wouter + TS + JSX) 2026-08-11 21:31:44 +02:00
css.d.ts swarm-ui: colocate component CSS as JS-side-effect imports 2026-08-12 21:33:44 +02:00
index.html swarm-ui: serve the hyperhive favicon 2026-08-16 17:23:02 +02:00
main.tsx swarm-ui: bootstrap new swarm-level frontend (Preact + wouter + TS + JSX) 2026-08-11 21:31:44 +02:00
swarm-ui.css swarm-ui: real hive-roster overview page 2026-08-13 11:21:30 +02:00
theme.css swarm-ui: bootstrap new swarm-level frontend (Preact + wouter + TS + JSX) 2026-08-11 21:31:44 +02:00
util.ts swarm-ui: use native Intl.RelativeTimeFormat for fmtAgo, not hand-rolled 2026-08-16 19:05:01 +02:00