A live board moves its charts as events arrive (#3692)
A board whose Live setting is on (refresh anything but off) opens one event stream, GET /boards/<slug>/stream, and never fetches its page again. Open /boards/<slug> as an admin: under the title it reads live · updated Ns ago, and when a run, pull, check, issue or usage event arrives the charts that moved are drawn again. Without JavaScript it reads "Moves as events arrive." and the page stays as it was served.
- What goes down: only the points that are new or moved, a few hundred bytes a frame, at most every 750 ms and never while nothing moved. A burst of more than 24 points in one panel says "reload to redraw" instead.
- What is drawn: line, bar and number charts of one series are drawn again from the points (the same scale, path and bars as the page). Area, heat, table and split charts keep what was served, and the header says "some charts changed a lot; reload to redraw" when one of them moved.
- Many tabs, one read: every tab on a board shares one read of its panels (
src/boards/live_hub.ts); ten tabs cost the queries of one. - Who: a person who is an admin. An agent or anyone else gets the not-found page, as for the board.
- In the terminal: open the board from the Boards screen (
src/tui/screens/boards.ts). While it is open, a panel that moved sayslive HH:MM:SSZ: N points moved · latest Xunder its data line, fed by the same frames (deltaOfinsrc/boards/delta.ts).
The stream is src/web/pages/boards-stream.ts, which sends the frames and carries the client that draws them.
The view bar (#3695)
At the top of a board: the time range (1h, 6h, 24h, 7d, 30d, All) and Live / Paused. Each is a link to the same board with ?range= or ?live= in the address, so a view is shared as a link and nothing is saved; "Back to the saved view" drops it. The range and refresh the board's file keeps are saved under "Board" at the bottom. The stream takes the same ?range=. Compare to previous, custom ranges and variables are not built yet. In the terminal the same view is two keys on the board screen (src/tui/screens/boards.ts): v steps the range (1h, 6h, 24h, 7d, 30d, All) and l flips Live and Paused; the line under the title says "a view, not saved" and nothing is written. g still edits the saved range.