Pool reverted, shared fetch caches added
A deep investigation into the Home Assistant frontend source (hui-card.ts:195 on the dev branch) confirmed that the helios-card rebuild on every editor preview commit is hard-coded with no opt-out hook. Cross-shadow-root DOM transplant of the MapLibre container reliably broke rendering (black basemap, missing timeline / solar arc overlays), because the moved node loses the previous shadow root's CSS scoping AND lands in a freshly-mounted parent whose layout has not yet resolved a non-zero height, hitting the standard "container at 0 px causes black canvas" failure mode.
What this release changes
- Reverted the engine pool entirely (alphas 8 through 11). Every helios-card instance owns its engine, creates it on mount, destroys it on disconnect. The editor preview pane re-allocates a WebGL context per
config-changedcommit, exactly the trade-offapexcharts-card,mini-graph-cardandMushroomaccept too. The live dashboard tile is untouched,hui-cardtakes the_updateElementbranch whenpreview === falseand the engine survives every editor commit. - Buildings GeoJSON cached at module scope for 30 minutes, keyed by
(homeLat, homeLon, radius, clusterRadius). A fresh engine after a slider commit picks up the cached payload synchronously and skips the network + parse round-trip. - LiDAR raster + shadow features cached at module scope for 30 minutes, keyed by
(homeLat, homeLon, radius, rasterSize, providerId). The multi-megabyte typed-array decode that the IGN COG provider performs is paid once per session, not once per commit. - OpenFreeMap basemap tiles continue to ride the browser HTTP cache, no code change needed.
Removed: HeliosEngine.reparentInto, HeliosEngine.getMapContainer, the pool API on init.ts (registerEngineInPool / claimEngineFromPool / releaseEngineFromPool), the preview field on InitHost.
What you will see
- No more black basemap when entering edit mode.
- No more missing timeline or solar arc in the preview pane.
- A brief MapLibre re-render in the editor preview on each commit (same as every other heavy custom card). The basemap loads from browser cache. Buildings and LiDAR populate from the shared cache, the user-visible delay is just the WebGL initialisation.
- The dashboard tile rendering stays smooth across editor commits.
Installation
Pick v1.8.2-alpha.12 in HACS (show beta versions toggle), or download helios.js from this release and drop it under config/www/community/helios/ replacing the existing bundle. Refresh the dashboard.