mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-30 19:58:50 +00:00
The cached config (LS_CFG) painted its first frames with _zoom=1 because the saved per-space zoom was applied only by _restoreZoom()'s rAF after the server config round-trip - the plan visibly jumped to the saved scale. - setConfig now arms _zoom from LS_ZOOM for the resolved space before the first view computation (view mode, no established view only); - _restoreZoom applies the view synchronously when the stage is already measured (space tabs, kiosk carousel, editor exit included); the rAF path remains only for an unmeasured stage, where updated() already fits with the correct zoom before the first paint. New smoke_zoom_flash.mjs samples every rAF frame from the first possible moment with a primed config cache, saved zoom 1.8 and a 350 ms server delay: a visible stage with a default-scale viewBox fails the run (22 such frames before the fix, 0 after).
Synthetic demo home
A fully fictional house (plans, devices, states) used for README screenshots, the demo GIF and headless smoke tests — so no real home data ever appears in public materials.
srv/demo.html— self-contained host page:<ha-icon>/<ha-card>stubs and a fakehass(registries, states,callWS,callService, floors).srv/assets/— generated plan SVGs andicons.js(node demo/gen_icons.mjs, needs the repo's devDependencies). The card bundle is copied fromdist/:cp dist/houseplan-card.js demo/srv/assets/.serve.mjs— playwright launcher (route interception, no web server).smoke_*.mjs— feature smoke tests; run with a Chromium installed viaPLAYWRIGHT_BROWSERS_PATH=<dir> npx playwright install chromium-headless-shell.
Note for sandboxed sessions: /tmp does not survive; this directory is the
persistent home of the harness (docs/DEVELOPMENT.md has the LD_LIBRARY_PATH recipe).