From 90774f1442ec4e29385f32293701fbfa892940fa Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Fri, 14 Aug 2026 22:32:55 -0400 Subject: [PATCH] Put the AI toggles and findings on the pages they act on The five AI_ASSIST_ switches and the findings they produce were reachable only from the AI tab, which is a long way from the page a finding is about. Nothing was synchronised because nothing needed to be: findings are one file per finding, and every surface is a view over that store with actions going to the same endpoint. Acting on the Watchdog tab shows on the AI tab because they are not two copies. The strip reloads rather than editing its own row, which is the only way they could have drifted apart. Each strip shows one page's kinds. Actions are whatever the server offers for that row, so Move appears on media findings without this card knowing what a move is. --- Plugin/unraid/include/confui.php | 79 ++++++++++++++++++++++++++++++++ Plugin/unraid/pages/arrs.php | 9 ++++ Plugin/unraid/pages/watchdog.php | 8 ++++ 3 files changed, 96 insertions(+) diff --git a/Plugin/unraid/include/confui.php b/Plugin/unraid/include/confui.php index 52ea3f8..bbd49ed 100644 --- a/Plugin/unraid/include/confui.php +++ b/Plugin/unraid/include/confui.php @@ -64,6 +64,85 @@ // fatals on the one page that included this without it, which is what took the AI tab blank. require_once __DIR__ . '/confform.php'; +// ── A findings strip for one subject page ───────────────────────────────────────────────────── +// The AI tab owns the full findings card — every kind, every action, the repair banner. This is +// the same store seen through a keyhole: one page's kinds, on the page that page is about. +// +// There is no synchronisation to build and none was built. Findings are one file per finding under +// AI_DATA_DIR; every surface is a view over that store and every action goes to the same endpoint, +// so acting on the Watchdog tab is visible on the AI tab because they are not two copies. The only +// thing that could desynchronise them is caching the list, which is why this does not. +// +// Gated on vv_ai_ui_on() like every other AI surface: on a node without the model there is nothing +// producing findings, and a permanently empty card is a worse answer than no card. +function vv_ai_findings_strip(string $prefix, array $kinds, string $title): void { + if (!vv_ai_ui_on()) return; + $k = json_encode(array_values($kinds), JSON_UNESCAPED_SLASHES); + ?> + + +