fix(touch): refresh device hits and defer pinch zoom save (#613)

Issue: #613
User-Visible: yes
This commit is contained in:
Claude
2026-09-23 05:35:41 +03:00
parent 59fdae817a
commit e95936cdce
50 changed files with 1009 additions and 666 deletions
+22
View File
@@ -271,6 +271,17 @@ const MUTANT_DEFINITIONS = [
replace: ' if (false && painted.length) return nearest(painted, point);',
}],
},
{
id: 'device-hit-scroll-observer-disabled',
guard: 'node demo/smoke_device_hit_capsules.mjs',
because: '#613 AC1/AC2: scroll inside a Home Assistant shadow-root ancestor must invalidate '
+ 'the client-coordinate hit index; document-level observation alone cannot see that event',
patches: [{
file: 'src/device-hit-owner.ts',
find: " source.addEventListener('scroll', handler, { passive: true });",
replace: " if (false) source.addEventListener('scroll', handler, { passive: true });",
}],
},
{
id: 'radar-sources-compared-as-text',
guard: 'node --test --test-name-pattern="#567" test/radar-editor.test.mjs',
@@ -7974,6 +7985,17 @@ const MUTANT_DEFINITIONS = [
replace: " if (this._mode === 'view' && ev.pointerType === 'touch' && false) return; // mutant: re-arm hold",
}],
},
{
id: 'touch-pinch-zoom-persists-per-frame',
guard: 'node demo/smoke_editor_gestures.mjs',
because: '#613 AC3/AC4: synchronous localStorage writes must happen once at the final '
+ 'terminal boundary, never on every direct or capture-path pointermove',
patches: [{
file: 'src/houseplan-card.ts',
find: ' private _markPinchZoomDirty(): void { this._pinchZoomDirty = true; }',
replace: ' private _markPinchZoomDirty(): void { this._saveZoom(); } // mutant: per-frame write',
}],
},
{
id: 'touch-pinch-contextmenu-guard-removed',
guard: 'node demo/smoke_editor_gestures.mjs',