fix: address room fit code review

Issue: #152
User-Visible: no
This commit is contained in:
Sergey Matyunin
2026-09-04 11:20:41 +03:00
parent 6eea4d1c7a
commit 3a1f2b2d86
22 changed files with 192 additions and 160 deletions
+15
View File
@@ -1518,6 +1518,21 @@ const MUTANT_DEFINITIONS = [
+ 'this._cameraTransition.target?.viewBox || view, disp))',
}],
},
{
id: 'room-fit-persists-zoom',
guard: 'node demo/smoke_room_fit.mjs',
because: 'room focus is session-only and must not leak its zoom into LS_ZOOM on '
+ 'completion or cancellation (#152 AC15)',
patches: [{
file: 'src/houseplan-card.ts',
find: " if (state.reason !== 'room') this._saveZoom();",
replace: ' this._saveZoom();',
}, {
file: 'src/houseplan-card.ts',
find: " if (presentedZoom !== undefined && reason !== 'room') this._saveZoom();",
replace: ' if (presentedZoom !== undefined) this._saveZoom();',
}],
},
{
id: 'camera-anchor-from-presented',
guard: 'node demo/smoke_smooth_zoom.mjs',