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
2 lines
1.1 KiB
JavaScript
2 lines
1.1 KiB
JavaScript
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="f3b9d9068e440e59a8abb9e4390a828ab8a3ffeb691e2d0777997c1e56c3c467";try{await import("./houseplan-assets/houseplan-card-Bit484fR.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale entry: the main chunk is unavailable",e)}
|