Patch release. Bandwidth optimisation for mobile users via AbortController on tile + data fetches, cleanup of phantom dependencies, and a doc-block above the markercluster race workaround.
No new features, no behaviour changes for existing configs. The [3.6.1] wind-source registry stays Experimental.
Changed
AbortController on tile + data fetches (#159)
Radar tiles, wildfire perimeter fetches, NWS alerts (+ per-zone shape fetches), and the RainViewer JSON metadata call now cancel their HTTP requests when superseded by a fresh fetch, when the card tears down, or when Leaflet unloads the tile (pan-out-of-view / zoom).
Previously the generation-counter trick discarded stale responses but the browser still downloaded the full payload first. On mobile or rate-limited connections a low-zoom continental pan can trigger dozens of tile requests that immediately get superseded — those now show as (canceled) in DevTools Network instead of completing.
Steady-state playback is unchanged (tiles recycle across frames without unloading → no abort, correct). src/wind-grid-fetcher.ts intentionally not instrumented — its request-coalescing makes correct cancellation tricky and the 60 s cache TTL already provides similar bandwidth conservation. Revisit when 3.7's layer-control panel adds explicit per-card cancellation.
Internal
- Phantom dependencies removed.
randombytes,safe-buffer,tslib,tsutilswere listed independenciesbut not imported anywhere insrc/,tests/, or the rollup config.tslibcorrectly stays as a transitive (viacustom-card-helpersandrollup-plugin-typescript2); the other three drop fromnode_modulesentirely. Companion to theserialize-javascriptsecurity bump that landed in 3.6.1. - Markercluster init-race workaround documented. The
requestAnimationFrame+ try/catch in_setupResizeObservernow carries a doc-block explicitly warning future contributors not to "simplify" it. The pattern works around a framework limitation inleaflet.markercluster(no lifecycle hook for "cluster tree ready"); replacing it with a synchronous call re-triggers the_topClusterLevel._boundsundefined crash from #110 on the resize path. - Tests: 440 → 455. New
tests/fetch-abort.test.tspins theAbortController/AbortSignalcontract the error-handler branches depend on, the abort-previous-on-supersession pattern, andwireAbortLifecycle+createFetchTileintegration via minimal layer stubs (consistent with the project's "stub Leaflet, test the helpers" convention).
Code review pass
Three deferred items from a code review pass are tracked in docs/todo.md: TypeScript module augmentation for Leaflet (3.8 health pass), Web Worker for the DWD pixel filter (only after profiling shows main-thread spikes), and WindGridFetcher cancellation via consumer reference-counting (pair with 3.7 layer-control).
Upgrade notes
No config changes. Drop-in patch over 3.6.1. HACS users with auto-update will see this as a routine update.
Full Changelog: v3.6.1...v3.6.2