feat(fleet-operator): live-tail device logs via 2s frontend polling (Ch3) #329

Open
johnride wants to merge 1 commits from feat/fleet-ch3-log-streaming into feat/fleet-ch2-operator-recovery

1 Commits

Author SHA1 Message Date
15f908a542 feat(fleet-operator): live-tail device logs via 2s frontend polling (Ch3)
All checks were successful
Run Check Script / check (pull_request) Successful in 2m34s
Fake log streaming by re-fetching the podman-logs tail every 2s from the
frontend (HTMX `every 2s`) — the pragmatic stand-in until a real TTY/streaming
channel (v0.4 #13), per the agreed Ch3 scope.

- log_viewer polls `load, every 2s` with `hx-sync="this:drop"` so slow/offline
  devices can't pile up requests.
- Multi-deployment selector: the poll URL is driven by `hx-include` of the
  `<select>` rather than a baked deployment, so changing the selection is
  picked up by the next poll instead of polling a stale deployment's URL.
  Single/no deployment bakes it into the URL as before.
- app.js: tail-follow only when the user is already at the bottom, so the 2s
  poll doesn't yank them down while reading history.
- Render tests lock the polling trigger and the selector-driven URL behavior.

Deferred: the `LogQuery<T>` Score companion. It's meant to mirror the
smoke-test contract, which doesn't exist yet (Ch10) — building it now would be
a speculative abstraction at n=1. Revisit when the smoke companion lands.
2026-06-05 15:26:10 -04:00