Goal
Create a new core manager, Neo.manager.Window, in the App Worker to track the geometry and state of all connected browser windows. This is the foundational "God View" required for cross-window interactions like drag-and-drop.
Responsibilities
- Registry: Maintain a collection of all connected windows, keyed by
windowId.
- Geometry Tracking: Store the
screenX, screenY, outerWidth, and outerHeight for each window.
- Updates: Provide a method (e.g.,
updateWindowRect(windowId, rect)) that can be called by the Main Thread (via DOM listeners or polling) to keep the worker state in sync.
- Intersection API: Provide a method
getWindowAt(screenX, screenY) that returns the windowId of the window at the given global coordinates.
Implementation Details
- Namespace:
src/manager/Window.mjs
- Singleton: This should be a global singleton in the App Worker.
- Integration: It should listen for
connect / disconnect events to manage the registry automatically.
Acceptance Criteria
Neo.manager.Window exists and is accessible in the App Worker.
- It correctly tracks the list of active windows.
- (Mock/Test) Updating a window's rect updates the internal state.
getWindowAt(x, y) correctly identifies the target window based on the stored geometry.
Goal
Create a new core manager,
Neo.manager.Window, in the App Worker to track the geometry and state of all connected browser windows. This is the foundational "God View" required for cross-window interactions like drag-and-drop.Responsibilities
windowId.screenX,screenY,outerWidth, andouterHeightfor each window.updateWindowRect(windowId, rect)) that can be called by the Main Thread (via DOM listeners or polling) to keep the worker state in sync.getWindowAt(screenX, screenY)that returns thewindowIdof the window at the given global coordinates.Implementation Details
src/manager/Window.mjsconnect/disconnectevents to manage the registry automatically.Acceptance Criteria
Neo.manager.Windowexists and is accessible in the App Worker.getWindowAt(x, y)correctly identifies the target window based on the stored geometry.