fix: keep SVG compositor stable during pinch (#579)

Issue: #579
User-Visible: yes
This commit is contained in:
Sergey Matyunin
2026-09-14 22:28:09 +03:00
parent 0cbc7aff7a
commit 216990e469
55 changed files with 637 additions and 369 deletions
+24
View File
@@ -8024,6 +8024,30 @@ const MUTANT_DEFINITIONS = [
replace: '',
}],
},
{
id: 'live-pinch-compositor-demoted-on-budget-refresh',
guard: 'node --test --test-name-pattern="#579" test/live-viewport.test.mjs',
because: '#579: a budgeted viewBox refresh must re-anchor the picture without removing '
+ 'the scene transform, will-change or overflow. Demoting and promoting the SVG during '
+ 'an active pinch produces white or transparent frames in HA Companion WebView',
patches: [{
file: 'src/live-viewport.ts',
find: ' const keepSceneLayer = options.keepSceneLayer === true;',
replace: ' const keepSceneLayer = false; // mutant: demote at every identity refresh',
}],
},
{
id: 'live-pinch-compositor-demoted-on-active-lit-commit',
guard: 'node demo/smoke_live_pan_coverage.mjs',
because: '#579: a full Lit update can land before the fingers are released. It may '
+ 're-anchor viewBox, but it must preserve the same promoted scene lifecycle until the '
+ 'terminal commit or the WebView flashes between compositor ownership paths',
patches: [{
file: 'src/live-interaction-runtime.ts',
find: ' commitHouseplanViewport(this.host, this.active());',
replace: ' commitHouseplanViewport(this.host);',
}],
},
{
id: 'live-pan-rewrites-viewbox-every-frame',
guard: 'node demo/smoke_live_pan_viewbox.mjs',
+9
View File
@@ -27,6 +27,15 @@
/** @type {SmokeLink[]} */
export const SMOKE_LINKS = [
{
symbols: [
'commitHouseplanViewport', 'isIdentityLiveLayerProjection', 'paintLiveViewport',
],
smokes: ['smoke_live_pan_coverage.mjs'],
because: '#579: the production-bundle witness observes promotion through budgeted viewBox '
+ 'refreshes and active Lit commits via scene style attributes; it intentionally does not '
+ 'call the viewport helpers whose compositor lifecycle it guards',
},
{
symbols: ['_renderDevice', '_renderOpenings'],
smokes: ['smoke_space_switch_transitions.mjs'],