Watch
0
0
Fork
You've already forked hyperhive
0

hive ui: remove the BUILD L0GS tab and the live build-log panel

A build's output and history are the swarm's builds Grafana board now, from the
lines hive-c0re logs. Removes the tab and its pane, the live log under the
rebuild queue, their styles, the log stream helper and the duration formatter
only they used, and the docs; also the tab-counts sentence 5925 missed.
This commit is contained in:
iris 2026-11-01 16:22:40 +01:00
commit deeb5ecd86
2 changed files with 29 additions and 741 deletions

View file

@ -20,9 +20,8 @@ page with four tabs:
- **4G3NTS** — every agent, live. This is the default tab and the one
you'll check most.
- **R3BU1LD QU3U3** and **BUILD L0GS** — the build
lifecycle: the rebuild queue with a live log of whatever is building,
and the build log history.
- **R3BU1LD QU3U3** — the rebuild queue. A build's output and history are on the
swarm's `builds` Grafana board.
- **K3PT ST4T3** — kept state from agents with no container
(tombstones), with a purge button per entry.

View file

@ -11,7 +11,7 @@ matrix accounts, the controller's job graph — are on the
hive-c0re serves the dashboard at `/`.
It has a fixed chrome header at the top and a `<main>` that shows exactly
one tab pane at a time. The URL hash (`#agents`, `#rebuild`, `#meta`,
`#buildlogs`, `#kept`) drives which pane is
`#kept`) drives which pane is
active; hash changes don't reload the page. ST4TS
is a standalone page reached from the pages menu, not from the
dashboard tab strip.
@ -35,10 +35,8 @@ dashboard tab strip.
If the name doesn't load the avatar shows a question mark, and without the URL the
popover has no links.
- **Tab strip**: `◆ 4G3NTS ◆`, `◆ R3BU1LD QU3U3 ◆`,
`◆ BUILD L0GS ◆`, `◆ K3PT ST4T3 ◆`. In-page tabs only — ST4TS
lives on its own page, reached from the pages menu. Count pills on
4G3NTS (stale containers), R3BU1LD QU3U3 (rebuilds in flight) and
K3PT ST4T3 (kept-state entries).
`◆ K3PT ST4T3 ◆`. In-page tabs only — ST4TS
lives on its own page, reached from the pages menu.
- **Banner-thin** (`░▒▓█▓▒░ HYPERHIVE / HIVE-C0RE / WE ARE THE WIRED ░▒▓█▓▒░`)
— sits below the tab strip.
- **No warning banner.** No page shows hive-level warnings (host disk
@ -97,12 +95,9 @@ container is all hive-c0re can actually prove. Fixing it properly
needs a recorded destroy — **deferred** to the swarm-controller /
snapshot-storage rework where the problem changes shape.
## Build tabs (`#rebuild`, `#buildlogs`)
## Build tab (`#rebuild`)
The build lifecycle — rebuild queue, live build log, and
build log history — is two tabs of the dashboard: **R3BU1LD QU3U3**
(`#rebuild`) and **BUILD L0GS**
(`#buildlogs`). They live in `builds.js`, which `tabs.js` imports: the
The rebuild queue is the **R3BU1LD QU3U3** tab (`#rebuild`). It lives in `builds.js`, which `tabs.js` imports: the
dashboard's one tab strip, `/api/state` snapshot and
`/api/dashboard/stream` subscription serve them, with
`rebuild_queue_changed` on the stream alongside the dashboard's other
@ -156,7 +151,7 @@ the tree — one per lifecycle state, matching the row glyphs — lets the
operator narrow which root groups render; unchecking a state re-fetches
`GET /api/jobq/graph?states=<checked, comma-joined>` rather than
hiding rows client-side, so the `onUpdate` callback's node list (and
everything downstream of it — the live-log panel) only
everything downstream of it) only
ever sees what's actually shown. Filtering is by a **root's own**
state, which is already its subtree's rolled-up answer, so the filter
keeps or drops a whole group, never splitting mid-tree. Default selection is
@ -169,34 +164,9 @@ root set — the history cap and the state filter are independent
concerns, so a narrow filter never reaches further back in time to
compensate.
Below the queue, a **live build-log panel** (`#rebuild-live-log`,
`renderRebuildLiveLog`) shows the currently running rebuild's output
inline — collapsible, with a live/ok/fail badge and a `↓ raw`
download. It's keyed to the first `Running` node (in wire order)
whose `payload.data.build_log_id` has a value — read from the `onUpdate`
callback's node list, no separate
fetch — and **polls** `GET /api/build-log/{id}` every 2s
(`fetchAndRenderLiveLog` / `liveLogPollTimer`); not an `EventSource`
(that's the BUILD L0GS tab's own per-row expand view below — `GET
/api/build-logs/id/{id}/stream`, real SSE, replays accumulated output
on connect — a separate mechanism). The live-log panel lives in its
own container outside `#rebuild-queue-section` so the mounted
`JobqGraph`'s own re-renders never disturb the open poll; it hides
when nothing is building.
**BUILD L0GS** — all-agents build log history. Lazy-loaded on first tab
activation; autorefreshes when
`rebuild_queue_changed` fires. Fetches `GET /api/build-logs?limit=30`.
Renders a scrollable list of build entries; each row is a collapsible
button showing status badge (`live` / `ok` / `fail`), agent name,
elapsed duration, build kind, age, and the invocation command line.
Expanding a row fetches the full stdout+stderr via
`GET /api/build-logs/id/{id}`. A live in-progress build shows a `live`
badge with a ticking elapsed-time chip; expanding streams output via
`GET /api/build-logs/id/{id}/stream` with sticky-bottom autoscroll
(suspends on manual scroll-up). Deep-link: `?id=N#buildlogs` opens the
entry with that id pre-expanded.
A build's output and history aren't on this page. hive-c0re logs every container build
to the journal, and the swarm's `builds` Grafana board reads those lines: the builds with
their outcome and runtime, and the output of the one you pick.
## ST4TS page (`/stats.html`)
@ -544,11 +514,10 @@ below — some endpoints aren't in it yet.
404 when the row is missing (vacuum-reaped or stale id).
- `GET /api/build-logs/id/{id}/stream` — live SSE stream of
stdout+stderr for an in-progress build (newline-delimited JSON
frames). Used by the expanding live-row view in the BUILD L0GS tab. The
frames). The
stream closes when the build finishes or errors.
- `GET /api/build-logs/id/{id}/raw` — raw concatenated
stdout+stderr as `text/plain`. Used by the `↓ raw` / `↓ download
raw` links in the build tabs. Works on both finished and in-progress
stdout+stderr as `text/plain`. Works on both finished and in-progress
build logs.
- `GET /api/reminders` — list pending reminders for the
dashboard's queued-reminders panel.