Goal:
Refactor Neo.applyDeltas(appName, deltas) to Neo.applyDeltas(windowId, deltas) to support multi-window applications correctly.
Context:
Currently, applyDeltas relies on appName to route DOM update messages. In multi-window scenarios where multiple windows share the same appName, this ambiguity prevents targeting specific windows for DOM updates. Switching to windowId (which is unique per window) resolves this.
Required Changes:
Update src/worker/App.mjs:
- Change
applyDeltas(appName, deltas) signature to applyDeltas(windowId, deltas).
- Update the message payload to send
windowId instead of appName.
Update Usages:
- Identify all call sites of
Neo.applyDeltas and update them to pass windowId.
- Key locations identified include:
src/plugin/Responsive.mjs (already partially addressed in previous steps, verify usage)
src/grid/Body.mjs
src/selection/HelixModel.mjs
src/selection/GalleryModel.mjs
src/table/Body.mjs
src/dialog/Base.mjs
src/plugin/Resizable.mjs
src/component/Helix.mjs
src/component/Base.mjs
src/mixin/VdomLifecycle.mjs
src/calendar/view/month/Component.mjs
src/calendar/view/week/EventDragZone.mjs
src/calendar/view/week/Component.mjs
src/calendar/view/week/plugin/DragDrop.mjs
Update Main Thread Handling:
- Update
src/Main.mjs (onUpdateDom) to handle the incoming windowId.
- Update
src/main/DeltaUpdates.mjs to use windowId for targeting the correct document/window context.
Notes:
- This is a breaking change for custom components or plugins that use
Neo.applyDeltas directly.
- Ensure backward compatibility or migration paths if necessary (though internal framework usage seems to be the primary consumer).
Goal: Refactor
Neo.applyDeltas(appName, deltas)toNeo.applyDeltas(windowId, deltas)to support multi-window applications correctly.Context: Currently,
applyDeltasrelies onappNameto route DOM update messages. In multi-window scenarios where multiple windows share the sameappName, this ambiguity prevents targeting specific windows for DOM updates. Switching towindowId(which is unique per window) resolves this.Required Changes:
Update
src/worker/App.mjs:applyDeltas(appName, deltas)signature toapplyDeltas(windowId, deltas).windowIdinstead ofappName.Update Usages:
Neo.applyDeltasand update them to passwindowId.src/plugin/Responsive.mjs(already partially addressed in previous steps, verify usage)src/grid/Body.mjssrc/selection/HelixModel.mjssrc/selection/GalleryModel.mjssrc/table/Body.mjssrc/dialog/Base.mjssrc/plugin/Resizable.mjssrc/component/Helix.mjssrc/component/Base.mjssrc/mixin/VdomLifecycle.mjssrc/calendar/view/month/Component.mjssrc/calendar/view/week/EventDragZone.mjssrc/calendar/view/week/Component.mjssrc/calendar/view/week/plugin/DragDrop.mjsUpdate Main Thread Handling:
src/Main.mjs(onUpdateDom) to handle the incomingwindowId.src/main/DeltaUpdates.mjsto usewindowIdfor targeting the correct document/window context.Notes:
Neo.applyDeltasdirectly.