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.
This commit is contained in:
@@ -155,6 +155,15 @@ require_once dirname(__DIR__) . '/include/ai_chat.php';
|
||||
// constant is what tells the assistant where to send someone, and this is what the page actually
|
||||
// draws. The two disagreeing means being given directions to a card that is not there.
|
||||
vv_conf_ui_card('vv-cf-arrs', 'arr|sonarr|radarr|lidarr|media|play state|emby|jellyfin|plex', 'Media settings');
|
||||
|
||||
// Same card as the Watchdog and AI tabs carry — one conf value, three views. AI_ASSIST_DISCOVERY
|
||||
// is the switch that decides whether the classification triage runs at all, and this is the page
|
||||
// it produces findings about.
|
||||
vv_conf_ui_card('vv-cf-ms-ai', 'AI Feature Toggles', 'AI features');
|
||||
|
||||
// Misfiled media, with the Move action attached. Same store the AI tab reads, so a series moved
|
||||
// from either surface is gone from both.
|
||||
vv_ai_findings_strip('vv-ms-fnd', ['media_misfiled'], 'Media findings');
|
||||
?>
|
||||
<script>
|
||||
(function() {
|
||||
|
||||
@@ -253,6 +253,14 @@ $_vv_wd_installed = vv_wd_installed_containers();
|
||||
// only from the Settings tab's catch-all, which is a long way to go for a setting named
|
||||
// after the page you are already looking at.
|
||||
vv_conf_ui_card('vv-cf-watchdog', 'watchdog', 'Watchdog settings');
|
||||
|
||||
// The same AI switches the AI tab carries, on the page they act on. One conf value behind both,
|
||||
// written through the same guarded path, so the two cards cannot disagree — a toggle flipped here
|
||||
// is flipped there because there is only one of it.
|
||||
vv_conf_ui_card('vv-cf-wd-ai', 'AI Feature Toggles', 'AI features');
|
||||
|
||||
// Findings this page's watchdogs produced, actionable here rather than only on the AI tab.
|
||||
vv_ai_findings_strip('vv-wd-fnd', ['watchdog_strike'], 'Watchdog findings');
|
||||
?>
|
||||
<script>
|
||||
(function() {
|
||||
|
||||
Reference in New Issue
Block a user