refactor: keep room warm-draft construction in the lazy editor (#762)

Issue: #762
User-Visible: no
This commit is contained in:
Matysh
2026-10-01 21:00:48 +00:00
committed by claude[bot]
parent e2d38d4e16
commit 6149bcf866
4 changed files with 20 additions and 13 deletions
+4
View File
@@ -489,6 +489,10 @@ still recognised in stored config but no longer served
render, including the card-local header offset for pending chrome (#762).
Adoption completion lives in the lazy editor graph: it only executes after
that runtime is ready; View retains just cancellation and camera comparison.
The room draft payload is also built by the installed editor runtime.
This moves existing room-state reads across the already-defined editor port;
it adds no room state. #762 records the resulting host-reference/ported-private
counts in the monolith baseline, without widening its tolerance bands.
## Second card: houseplan-space-card (read-only)
+2 -2
View File
@@ -1,8 +1,8 @@
{
"delegates": 154,
"portMembers": 347,
"hostRefs": 4885,
"portPrivates": 94,
"hostRefs": 4925,
"portPrivates": 103,
"harnessPrivates": 100,
"bundleBytes": 2605172
}
+1 -11
View File
@@ -3432,17 +3432,7 @@ export class HouseplanCard extends LitElement {
const data = this[`_${kind}Dialog`];
if (data) return at(kind, data);
}
if (this._roomDialog) {
return at('room', {
editId: this._roomEditId, fill: this._roomFill, customFill: this._roomCustomFill,
tempMin: this._roomTempMin, tempMax: this._roomTempMax, tempSrc: this._roomTempSrc,
humSrc: this._roomHumSrc, srcOpen: this._roomSrcOpen, srcFilter: this._roomSrcFilter,
nameScale: this._roomNameScale, labelScale: this._roomLabelScale,
areaSel: this._areaSel, nameSel: this._nameSel,
pendingSplit: this._pendingSplit, wallFaceBatch: this._wallFaceBatch,
path: this._path,
});
}
if (this._roomDialog) return at('room', this._editorRuntimeOrThrow().warmRoomDraft());
if (this._spaceDialog) return this._spaceDialog.busy ? null : at('space', this._spaceDialog);
return null;
}
+13
View File
@@ -922,6 +922,19 @@ public finishWarmModeAdoption(request: number): void {
public resumeWarmMode(mode: 'view' | 'plan' | 'devices' | 'decor', animate: boolean): void {
resumeWarmMode(this.host as unknown as WarmModeHost, mode, () => this.host._setMode(mode, animate, true));
}
/** An open room editor implies an installed runtime; View never constructs this payload. */
public warmRoomDraft() {
const host = this.host;
return {
editId: host._roomEditId, fill: host._roomFill, customFill: host._roomCustomFill,
tempMin: host._roomTempMin, tempMax: host._roomTempMax, tempSrc: host._roomTempSrc,
humSrc: host._roomHumSrc, srcOpen: host._roomSrcOpen, srcFilter: host._roomSrcFilter,
nameScale: host._roomNameScale, labelScale: host._roomLabelScale,
areaSel: host._areaSel, nameSel: host._nameSel,
pendingSplit: host._pendingSplit, wallFaceBatch: host._wallFaceBatch,
path: host._path,
};
}
public _setMode(mode: 'view' | 'plan' | 'devices' | 'decor', animate = true): void {
if (mode !== this.host._mode) this.host._cancelDangerConfirm();