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
Owner

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.

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.
johnride added 1 commit 2026-06-05 01:34:37 +00:00
feat(fleet-operator): live-tail device logs via 2s frontend polling (Ch3)
Some checks failed
Run Check Script / check (pull_request) Failing after 58s
becb5395f9
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.
johnride force-pushed feat/fleet-ch3-log-streaming from becb5395f9 to 15f908a542 2026-06-05 19:48:56 +00:00 Compare
All checks were successful
Run Check Script / check (pull_request) Successful in 2m34s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/fleet-ch3-log-streaming:feat/fleet-ch3-log-streaming
git checkout feat/fleet-ch3-log-streaming
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NationTech/harmony#329
No description provided.