mirror of
https://github.com/smittix/intercept.git
synced 2026-07-20 07:18:11 -07:00
fix: first-load rendering for Waterfall CSS and WebSDR globe
- Waterfall: load waterfall.css eagerly in <head> instead of lazily on mode switch; the lazy inject raced with the panel becoming visible, leaving unstyled HTML for up to 20 s on cold cache - WebSDR: await a requestAnimationFrame before calling Globe()(mapEl) so the browser has committed the display:flex layout and clientWidth/ clientHeight are non-zero; previously the globe WebGL renderer was created at 0×0 (especially on warm-cache refreshes) and could not recover via the deferred resize calls - Bump version to 2.22.2 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
All notable changes to iNTERCEPT will be documented in this file.
|
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
|
## [2.22.1] - 2026-02-23
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -7,10 +7,18 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
# Application version
|
# Application version
|
||||||
VERSION = "2.22.1"
|
VERSION = "2.22.2"
|
||||||
|
|
||||||
# Changelog - latest release notes (shown on welcome screen)
|
# Changelog - latest release notes (shown on welcome screen)
|
||||||
CHANGELOG = [
|
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",
|
"version": "2.22.1",
|
||||||
"date": "February 2026",
|
"date": "February 2026",
|
||||||
|
|||||||
@@ -51,6 +51,17 @@ async function initWebSDR() {
|
|||||||
if (!mapEl) return;
|
if (!mapEl) return;
|
||||||
|
|
||||||
const globeReady = await ensureWebsdrGlobeLibrary();
|
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)) {
|
if (globeReady && initWebsdrGlobe(mapEl)) {
|
||||||
websdrMapType = 'globe';
|
websdrMapType = 'globe';
|
||||||
} else if (typeof L !== 'undefined' && await initWebsdrLeaflet(mapEl)) {
|
} else if (typeof L !== 'undefined' && await initWebsdrLeaflet(mapEl)) {
|
||||||
|
|||||||
@@ -66,6 +66,7 @@
|
|||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/components/function-strip.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/components/function-strip.css') }}">
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/components/toast.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/components/toast.css') }}">
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/components/ux-platform.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/components/ux-platform.css') }}">
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/modes/waterfall.css') }}?v={{ version }}&r=wfdeck19">
|
||||||
<script>
|
<script>
|
||||||
window.INTERCEPT_MODE_STYLE_MAP = {
|
window.INTERCEPT_MODE_STYLE_MAP = {
|
||||||
aprs: "{{ url_for('static', filename='css/modes/aprs.css') }}",
|
aprs: "{{ url_for('static', filename='css/modes/aprs.css') }}",
|
||||||
@@ -78,8 +79,7 @@
|
|||||||
gps: "{{ url_for('static', filename='css/modes/gps.css') }}",
|
gps: "{{ url_for('static', filename='css/modes/gps.css') }}",
|
||||||
subghz: "{{ url_for('static', filename='css/modes/subghz.css') }}?v={{ version }}&r=subghz_layout9",
|
subghz: "{{ url_for('static', filename='css/modes/subghz.css') }}?v={{ version }}&r=subghz_layout9",
|
||||||
bt_locate: "{{ url_for('static', filename='css/modes/bt_locate.css') }}?v={{ version }}&r=btlocate4",
|
bt_locate: "{{ url_for('static', filename='css/modes/bt_locate.css') }}?v={{ version }}&r=btlocate4",
|
||||||
spaceweather: "{{ url_for('static', filename='css/modes/space-weather.css') }}",
|
spaceweather: "{{ url_for('static', filename='css/modes/space-weather.css') }}"
|
||||||
waterfall: "{{ url_for('static', filename='css/modes/waterfall.css') }}?v={{ version }}&r=wfdeck19"
|
|
||||||
};
|
};
|
||||||
window.INTERCEPT_MODE_STYLE_LOADED = {};
|
window.INTERCEPT_MODE_STYLE_LOADED = {};
|
||||||
window.ensureModeStyles = function(mode) {
|
window.ensureModeStyles = function(mode) {
|
||||||
|
|||||||
Reference in New Issue
Block a user