From 8808cbfc0460454b83b7c9d3d943ed49735746c9 Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Fri, 14 Aug 2026 10:09:04 -0400 Subject: [PATCH] Give the Watchdog tab an assistant scoped to it, and Why? on every strike MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The page states what struck but never why, and the log that would say is the orchestrator's, not one per watchdog. Why? opens troubleshoot against it — read-only, because the page's contract is that it changes nothing. --- Plugin/unraid/pages/watchdog.php | 188 +++++++++++++++++++++++++++---- 1 file changed, 168 insertions(+), 20 deletions(-) diff --git a/Plugin/unraid/pages/watchdog.php b/Plugin/unraid/pages/watchdog.php index ab04717..8aef555 100644 --- a/Plugin/unraid/pages/watchdog.php +++ b/Plugin/unraid/pages/watchdog.php @@ -16,16 +16,25 @@ // Strictly read-only. There is no control on this page that clears a strike, restarts a // container, or resets a counter — those belong to the watchdog that owns the state. // +// That holds for the assistant too, and is why the Why? buttons open troubleshoot rather than +// repair. troubleshoot may read the machine and the orchestrator's log; it holds no conf_write +// and no way to act. A page whose stated contract is "changes nothing" must not carry the one +// profile that can — see include/ai_profiles.php for why that grant is deliberately narrow. +// // A node that fails to report renders as unavailable rather than healthy. Absence of data // is never drawn as an all-clear. // // RENDERS // Per-node cards: resource / docker / system / storage / network watchdog state, // strike pills, restart history, reboot and OOM counts +// Assistant card, scoped to the Watchdog tab +// Watchdog conf sections, via the shared settings renderer // // DEPENDS ON // api/watchdog.php polled every 30s → include/watchdog.php +// include/ai_chat.php → the shared chat component require_once dirname(__DIR__) . '/include/confui.php'; +require_once dirname(__DIR__) . '/include/ai_chat.php'; ?>