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
This commit is contained in:
iris 2026-06-05 12:12:04 +02:00 committed by mara
commit c70823755b

View file

@ -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