From c8d2eaeb85fb9a34bd9620f8dc4270e87c3f6d42 Mon Sep 17 00:00:00 2001 From: Chuck Date: Sat, 23 May 2026 16:18:37 -0400 Subject: [PATCH] Cancel HTMX fallback timers when htmx:ready fires The 5-second setTimeout fallbacks for plugins and overview were firing before the htmx:ready event arrived, logging spurious warnings. Each timer now self-cancels via htmx:ready so the fallback only triggers when HTMX genuinely fails to load. Co-Authored-By: Claude Sonnet 4.6 --- web_interface/templates/v3/base.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web_interface/templates/v3/base.html b/web_interface/templates/v3/base.html index 1e76b82e..2e75073d 100644 --- a/web_interface/templates/v3/base.html +++ b/web_interface/templates/v3/base.html @@ -448,7 +448,7 @@ } // Fallback if HTMX doesn't load within 5 seconds - setTimeout(() => { + var _pluginsFallbackTimer = setTimeout(() => { if (typeof htmx === 'undefined') { console.warn('HTMX not loaded after 5 seconds, using direct fetch for plugins'); // Load plugins tab content directly regardless of active tab, @@ -456,6 +456,7 @@ loadPluginsDirect(); } }, 5000); + window.addEventListener('htmx:ready', function() { clearTimeout(_pluginsFallbackTimer); }, { once: true });