diff --git a/Plugin/unraid/Varaverk.page b/Plugin/unraid/Varaverk.page index c75725c..f568e0a 100644 --- a/Plugin/unraid/Varaverk.page +++ b/Plugin/unraid/Varaverk.page @@ -138,9 +138,24 @@ if ($_vv_ai) $validTabs[] = 'ai'; if (!in_array($tab, $validTabs)) $tab = 'monitor'; $tabLabels = ['monitor' => 'Monitor', 'scheduler' => 'Scheduler', 'docker' => 'Docker', 'watchdog' => 'Watchdog', 'partnership' => 'Partnership', 'fallback' => 'FallBack', 'arrs' => 'Arrs', 'rsync' => 'Rsync', 'auth' => 'Auth Stack', 'settings' => 'Settings', 'ai' => 'AI']; + +// Cache stamp for the stylesheet and script below. Both are served straight off the plugin +// directory at a path that never changes, so a browser holding an old copy keeps using it after +// a git pull. This page's own markup is generated fresh every request, so the two fall out of +// step: markup from the new commit rendering against a stylesheet from the old one. That is not +// a theoretical failure — it broke the Monitor AI row on 2026-08-09, when placement moved from +// inline spans into the stylesheet and only half of that arrived in the browser. +// +// mtime rather than a hand-bumped version: it changes on exactly the event that matters, a pull +// rewriting the file, and cannot be forgotten. Falling back to time() when the stat fails errs +// toward re-fetching rather than toward the stale copy that caused the problem. +$_vv_asset_rev = []; +foreach (['css/varaverk.css', 'js/varaverk.js'] as $_vv_a) { + $_vv_asset_rev[$_vv_a] = @filemtime(__DIR__ . '/' . $_vv_a) ?: time(); +} ?> - +