feat(cockpit): runner control actions + log viewing (#266) - #282
Merged
Conversation
Add per-runner control (start/stop/restart) and log viewing to the Runner fleet tab, driving the managers that are already the API (nssm / systemctl --user over wsl.exe) via the argv-list shell-out helper — reimplementing no service manager. - control.py: start/stop/restart per mechanism; explicit per-action UAC 'runas' elevation for NSSM mutations (Start-Process -Verb RunAs -Wait -PassThru, exit code mirrors the child) — never a silent no-op; systemd --user needs none (AC1, AC3). - logs.py: tail the selected service's own logs — Windows service.out/err.log under runner/windows/logs, Linux journalctl --user -u <unit> over WSL (AC2). - log_view.py: LogViewer dialog, reads off the GUI thread with a Tail toggle. - fleet_view.py: Start/Stop/Restart/View-logs on the selected row, gated by mechanism, actions run off the GUI thread; success on the status line and failure additionally via a notifier dialog. Name-derived service/unit only; nothing reads the service env, runner.env, or a PAT. Tests (pytest-qt, offscreen) mock every shell-out/elevation/log seam. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SATRHKa6mDHDuirhP6QuwL
This was referenced Jul 24, 2026
Closed
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #266
Adds per-runner control + log viewing to the cockpit (Wave 1), building on the #265 fleet view.
Acceptance criteria
nssm(Windows NSSM) /wsl.exe -- systemctl --user(Linux), surfacing success and failure.runner/windows/logs/(service.out/err.log), Linuxjournalctl --user -u <unit>over WSL; off-GUI-thread LogViewer with Refresh + Tail.runaselevation (ADR-0006), never a silent no-op; systemd --user needs none.Verification
Local:
uv run pytestoffscreen = 95 passed (38 new pytest-qt tests). No new deps, uv.lock + verify.yml untouched. Safety: name-derived service/unit only; never reads the service env / runner.env / PAT.