mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
Field report from the dacha: the wall switch "Гостиная основной свет", whose controls name three virtual light sources, periodically ignored taps — no toggle, no glow — until its settings dialog was opened once with no changes. "Periodically" was every fresh tab: the #337 lazy split left _toggleIntent (and the confirm-line helpers) on the card as stubs delegating into the editor runtime, so a plain View tap on a cold tab threw `Houseplan editor runtime is not loaded` synchronously inside the click handler. Opening any editor surface loaded the runtime and "healed" the tab for its lifetime. The View card now owns toggle resolution: _toggleIntent calls resolveToggleIntent directly (device-toggle.ts was already in the initial graph; the card owns _planHass/_fullRegistryHass/_virtualLights), and _toggleStateText/_toggleConfirmationStateText/_toggleConfirmationLines moved with it. The editor runtime delegates back to the host — one source of truth, editor consumers (dialog preview, hint lines) unchanged. Every product smoke preloads the runtime, so none of them could see this class of regression. The new smoke_cold_view_toggle mirrors the field config on a genuinely cold tab: a real switch drives three passive virtual lamps with one tap, a controlled lamp drives its switch back, tap_confirm renders its state lines and confirms, and the editor chunk is never requested. A registry mutant restores the old delegation and is killed by that smoke. Issue: #357 User-Visible: yes
54 KiB
900x850px
54 KiB
900x850px