Skip to content

Commit eb5942a

Browse files
committed
ticket sync
1 parent 0d2eda6 commit eb5942a

File tree

3 files changed

+98
-9
lines changed

3 files changed

+98
-9
lines changed

.github/.sync-metadata.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"lastSync": "2025-12-21T15:57:10.392Z",
3-
"releasesLastFetched": "2025-12-21T15:57:10.404Z",
2+
"lastSync": "2025-12-21T16:14:36.580Z",
3+
"releasesLastFetched": "2025-12-21T16:14:36.592Z",
44
"pushFailures": [],
55
"issues": {
66
"3789": {
@@ -13108,11 +13108,11 @@
1310813108
"contentHash": "100e88745642c2013d5b4468bb8e3c3303dc1b3c49d0192960a46b6d59bc0a4f"
1310913109
},
1311013110
"8149": {
13111-
"state": "OPEN",
13111+
"state": "CLOSED",
1311213112
"path": "/Users/Shared/github/neomjs/neo/.github/ISSUE/issue-8149.md",
13113-
"closedAt": null,
13114-
"updatedAt": "2025-12-21T11:46:02Z",
13115-
"contentHash": "167222a3e6b1fa43d286ff3ce3babbb2e24a51c575c788d60fc85859397e5e64"
13113+
"closedAt": "2025-12-21T16:04:16Z",
13114+
"updatedAt": "2025-12-21T16:04:16Z",
13115+
"contentHash": "3eeffb166d1637aba323670e397b9f600859ac502352fe337df567f866c8af0f"
1311613116
},
1311713117
"8150": {
1311813118
"state": "CLOSED",
@@ -13134,6 +13134,13 @@
1313413134
"closedAt": null,
1313513135
"updatedAt": "2025-12-21T11:37:41Z",
1313613136
"contentHash": "c44224be52f30e4884eba525d766ac12b855711bf8d56bf4e2b6860695f8e9a2"
13137+
},
13138+
"8153": {
13139+
"state": "CLOSED",
13140+
"path": "/Users/Shared/github/neomjs/neo/.github/ISSUE/issue-8153.md",
13141+
"closedAt": "2025-12-21T16:13:13Z",
13142+
"updatedAt": "2025-12-21T16:13:13Z",
13143+
"contentHash": "fe02368ab231fe0590308f2dfe3a93dcf92298c0455dcaf8955684c3f9ff2e3f"
1313713144
}
1313813145
},
1313913146
"releases": {

.github/ISSUE/issue-8149.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: 8149
33
title: 'Architecture: Migrate from ''main'' destination to explicit Window IDs'
4-
state: OPEN
4+
state: CLOSED
55
labels:
66
- enhancement
77
- epic
@@ -10,16 +10,17 @@ labels:
1010
assignees:
1111
- tobiu
1212
createdAt: '2025-12-19T22:27:50Z'
13-
updatedAt: '2025-12-21T11:46:02Z'
13+
updatedAt: '2025-12-21T16:04:16Z'
1414
githubUrl: 'https://github.com/neomjs/neo/issues/8149'
1515
author: tobiu
16-
commentsCount: 2
16+
commentsCount: 4
1717
parentIssue: null
1818
subIssues: []
1919
subIssuesCompleted: 0
2020
subIssuesTotal: 0
2121
blockedBy: []
2222
blocking: []
23+
closedAt: '2025-12-21T16:04:16Z'
2324
---
2425
# Architecture: Migrate from 'main' destination to explicit Window IDs
2526

@@ -126,6 +127,29 @@ Neo.currentWorker.sendMessage('uuid-123', {action: 'foo'});
126127
> * 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).
127128
> * Verified that `DomAccess.loadScript` is currently a local helper and does not require remote method refactoring at this stage.
128129
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.
152+
129153
## Activity Log
130154

131155
- 2025-12-19 @tobiu added the `enhancement` label
@@ -147,4 +171,5 @@ Neo.currentWorker.sendMessage('uuid-123', {action: 'foo'});
147171
- 2025-12-21 @tobiu referenced in commit `7d4709e` - "#8149 ensuring all "main.addon" related remote calls pass windowId"
148172
- 2025-12-21 @tobiu referenced in commit `51df23a` - "#8149 ensuring all "main.DomAccess" related remote calls pass windowId"
149173
- 2025-12-21 @tobiu referenced in commit `93dea5a` - "#8149 ensuring all "main.DomEvents" related remote calls pass windowId"
174+
- 2025-12-21 @tobiu closed this issue
150175

.github/ISSUE/issue-8153.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
id: 8153
3+
title: 'Architecture: Propagate windowId to StateProviders and Controllers'
4+
state: CLOSED
5+
labels:
6+
- enhancement
7+
- ai
8+
- architecture
9+
assignees:
10+
- tobiu
11+
createdAt: '2025-12-21T16:09:18Z'
12+
updatedAt: '2025-12-21T16:13:13Z'
13+
githubUrl: 'https://github.com/neomjs/neo/issues/8153'
14+
author: tobiu
15+
commentsCount: 1
16+
parentIssue: null
17+
subIssues: []
18+
subIssuesCompleted: 0
19+
subIssuesTotal: 0
20+
blockedBy: []
21+
blocking: []
22+
closedAt: '2025-12-21T16:13:13Z'
23+
---
24+
# 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).
36+
* Update `beforeSetStateProvider(value, oldValue)`:
37+
* 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"
56+
- 2025-12-21 @tobiu closed this issue
57+

0 commit comments

Comments
 (0)