You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> * Identified and tracked a technical debt item: **#8152** ("Combine DomAccess.addScript and loadScript into a unified API") to resolve the overlap between `addScript` (remote) and `loadScript` (local helper).
127
128
> * Verified that `DomAccess.loadScript` is currently a local helper and does not require remote method refactoring at this stage.
128
129
130
+
### @tobiu - 2025-12-21 16:02
131
+
132
+
**Input from Gemini 2.5 pro:**
133
+
134
+
> ✦ I have analyzed the request to challenge Phase 3. You are absolutely correct: forcing `windowId` in single-window (SPA) environments where `destination: 'main'` is unambiguous would be unnecessary friction.
135
+
>
136
+
> **Revised Phase 3 Strategy:**
137
+
>
138
+
> ***SharedWorker Environments:** Strict enforcement. `destination: 'main'` is ambiguous here and will be deprecated/removed to prevent routing errors. `windowId` is mandatory.
139
+
> ***Dedicated Worker / SPA Environments:** Permissive. `destination: 'main'` (or implicit destination) remains supported. Since there is only one Main Thread, there is no ambiguity, and forcing developers to manage `windowId` offers no architectural benefit.
140
+
>
141
+
> **Implementation Status:**
142
+
> The current codebase already supports this distinction:
143
+
> *`Neo.worker.Base#sendMessage` only logs the deprecation warning if `this.isSharedWorker` is true.
144
+
> *`Neo.worker.Manager` (Main Thread) accepts messages addressed to `'main'` or its specific `windowId`.
145
+
> *`RemoteMethodAccess` defaults to `'main'` if no `windowId` is provided, which works seamlessly in SPAs.
146
+
>
147
+
> I will proceed with the understanding that Phase 3 "Removal" applies **only** to SharedWorker modes. No code changes are required to support this "allowance" as it is the current behavior, but we will ensure no future commits break this compatibility.
148
+
149
+
### @tobiu - 2025-12-21 16:04
150
+
151
+
Closing as Phase 3 requirements are already met by the current hybrid implementation. Strict enforcement is applied only to SharedWorker environments, while remains supported for standard SPAs.
# Architecture: Propagate windowId to StateProviders and Controllers
25
+
26
+
This task ensures that `windowId` is consistently propagated from `Neo.component.Abstract` to its associated `state.Provider` and `controller.Component` instances.
27
+
28
+
**Requirements:**
29
+
1.**Neo.state.Provider**:
30
+
* Add a `windowId` config (default `null`). It does **not** need to be reactive, as `controller.Component` already has it as a non-reactive config.
31
+
32
+
2.**Neo.component.Abstract**:
33
+
* Update `afterSetWindowId(value, oldValue)`:
34
+
* If `value` is defined, propagate it to `this.controller.windowId` (if the controller exists).
35
+
* If `value` is defined, propagate it to `this.stateProvider.windowId` (if the state provider exists).
* Include `windowId: this.windowId` in the default values object passed to `ClassSystemUtil.beforeSetInstance` when creating the state provider instance.
38
+
39
+
## Comments
40
+
41
+
### @tobiu - 2025-12-21 16:13
42
+
43
+
Implemented windowId propagation to state.Provider and controller.Component.
44
+
- Added non-reactive windowId config to state.Provider
45
+
- Updated component.Abstract to propagate windowId changes
46
+
- Updated component.Abstract to pass windowId during state provider creation
47
+
- Fixed JSDoc type for controller.Component.windowId
48
+
49
+
## Activity Log
50
+
51
+
- 2025-12-21 @tobiu added the `enhancement` label
52
+
- 2025-12-21 @tobiu added the `ai` label
53
+
- 2025-12-21 @tobiu added the `architecture` label
54
+
- 2025-12-21 @tobiu assigned to @tobiu
55
+
- 2025-12-21 @tobiu referenced in commit `0d2eda6` - "#8153 Propagate windowId to StateProviders and Controllers"
0 commit comments