From 6de443e833cdba634806c2d7e52310526a230da3 Mon Sep 17 00:00:00 2001 From: mitchross Date: Thu, 26 Mar 2026 00:29:06 -0400 Subject: [PATCH] Fix clock flickering from duplicate setInterval timers app.js and nav.html both started 1-second intervals updating the same #headerUtcTime element. Even though both used InterceptTime, their slightly different timing caused visible text flicker. Fix: app.js now sets window._navClockStarted before starting its interval, so nav.html's guard condition skips its duplicate. Also register InterceptTime.onChange listener in app.js for instant updates. Co-Authored-By: Claude Opus 4.6 (1M context) --- static/js/core/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/js/core/app.js b/static/js/core/app.js index 7734f5f..ffc3c04 100644 --- a/static/js/core/app.js +++ b/static/js/core/app.js @@ -465,7 +465,11 @@ function initApp() { // Start clock and init time settings initTimeSettings(); updateHeaderClock(); + window._navClockStarted = true; // Prevent nav.html from starting a duplicate interval setInterval(updateHeaderClock, 1000); + if (typeof InterceptTime !== 'undefined' && InterceptTime.onChange) { + InterceptTime.onChange(updateHeaderClock); + } // Load bias-T setting loadBiasTSetting();