Skip to content

feat(cockpit): runner control actions + log viewing (#266) - #282

Merged
dngioidev merged 1 commit into
mainfrom
feat/266-control-actions
Jul 24, 2026
Merged

feat(cockpit): runner control actions + log viewing (#266)#282
dngioidev merged 1 commit into
mainfrom
feat/266-control-actions

Conversation

@dngioidev

Copy link
Copy Markdown
Owner

Closes #266

Adds per-runner control + log viewing to the cockpit (Wave 1), building on the #265 fleet view.

Acceptance criteria

  • AC1 start/stop/restart a selected runner service — nssm (Windows NSSM) / wsl.exe -- systemctl --user (Linux), surfacing success and failure.
  • AC2 view + tail logs — Windows runner/windows/logs/ (service.out/err.log), Linux journalctl --user -u <unit> over WSL; off-GUI-thread LogViewer with Refresh + Tail.
  • AC3 explicit privilege handling — NSSM mutations trigger per-action UAC runas elevation (ADR-0006), never a silent no-op; systemd --user needs none.

Verification

Local: uv run pytest offscreen = 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.

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
@dngioidev
dngioidev merged commit b16ad30 into main Jul 24, 2026
6 checks passed
@dngioidev
dngioidev deleted the feat/266-control-actions branch July 24, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Runner UI — control actions: start / stop / restart + log viewing

1 participant