diff --git a/CHANGELOG.md b/CHANGELOG.md index da4a874..c018d85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to iNTERCEPT will be documented in this file. +## [2.22.2] - 2026-02-23 + +### Fixed +- Waterfall control panel rendered as unstyled text for up to 20 seconds on first visit — CSS is now loaded eagerly with the rest of the page assets +- WebSDR globe failed to render on first page load — initialization now waits for a layout frame before mounting the WebGL renderer, ensuring the container has non-zero dimensions + +--- + ## [2.22.1] - 2026-02-23 ### Fixed diff --git a/config.py b/config.py index 9396b78..f2ac362 100644 --- a/config.py +++ b/config.py @@ -7,10 +7,18 @@ import os import sys # Application version -VERSION = "2.22.1" +VERSION = "2.22.2" # Changelog - latest release notes (shown on welcome screen) CHANGELOG = [ + { + "version": "2.22.2", + "date": "February 2026", + "highlights": [ + "Waterfall control panel no longer shows as unstyled text on first visit", + "WebSDR globe renders correctly on first page load without requiring a refresh", + ] + }, { "version": "2.22.1", "date": "February 2026", diff --git a/static/js/modes/websdr.js b/static/js/modes/websdr.js index 280dbde..de4bcfe 100644 --- a/static/js/modes/websdr.js +++ b/static/js/modes/websdr.js @@ -51,6 +51,17 @@ async function initWebSDR() { if (!mapEl) return; const globeReady = await ensureWebsdrGlobeLibrary(); + + // Wait for a paint frame so the browser computes layout after the + // display:flex change in switchMode. Without this, Globe()(mapEl) can + // run before clientWidth/clientHeight are non-zero (especially when + // scripts are served from cache and resolve before the first layout pass). + await new Promise(resolve => requestAnimationFrame(resolve)); + + // If the mode was switched away while scripts were loading, abort so + // websdrInitialized stays false and we retry cleanly next time. + if (!mapEl.clientWidth || !mapEl.clientHeight) return; + if (globeReady && initWebsdrGlobe(mapEl)) { websdrMapType = 'globe'; } else if (typeof L !== 'undefined' && await initWebsdrLeaflet(mapEl)) { diff --git a/templates/index.html b/templates/index.html index 0ca2dfc..c09744c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -66,6 +66,7 @@ +