From c70823755b2929ac989fc38930dfe64c51c1fe58 Mon Sep 17 00:00:00 2001 From: iris Date: Fri, 5 Jun 2026 12:12:04 +0200 Subject: [PATCH] docs(web-ui): document BUILD tab auto-scroll, elapsed-time ticker, SSE list refresh The BUILD sub-tab description was written before the auto-scroll, live elapsed-time ticker, and SSE-driven list refresh were added. Update it to cover: - Live elapsed-time chip: ticks every second via setInterval, cleared on finish/error - Sticky-bottom auto-scroll: follows new output while the operator is at the bottom; silently appends when scrolled up - SSE-driven list refresh: rebuild_queue_changed fires a 2s-debounced fetchBuild() while on the BUILD tab; refresh button still works for immediate re-fetch --- docs/web-ui/dashboard.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/web-ui/dashboard.md b/docs/web-ui/dashboard.md index 4601e26c..ee05f26b 100644 --- a/docs/web-ui/dashboard.md +++ b/docs/web-ui/dashboard.md @@ -362,9 +362,21 @@ 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 and a growing `…` duration chip; when complete, the row -re-renders with the final status. `status === null` = still running. +`GET /api/build-logs/id/{id}`. + +A live in-progress build shows a `live` badge with an elapsed-time +chip that ticks every second (updated by a `setInterval` on the +row; cleared when the build finishes or the stream errors). Expanding +a live row streams its output via `GET /api/build-logs/stream/{id}` +(newline-delimited JSON frames) with **sticky-bottom auto-scroll**: +the stream scrolls to keep the latest output visible as long as the +operator hasn't scrolled up manually; once the operator scrolls up, +new lines append silently at the bottom without jumping. + +The build list auto-refreshes when a `rebuild_queue_changed` SSE +event fires while the BUILD tab is active (2s debounce to let the +backend commit the new row). The `↻ refresh` button triggers an +immediate re-fetch. **AGENT sub-tab** — per-container journald viewer. Two selects: agent name (populated from `GET /api/state`) and unit filter