LearnNewsExamplesServices
Frontmatter
id8175
titleImplement Window Connect/Disconnect Notifications for Neural Link
stateClosed
labels
enhancementai
assigneestobiu
createdAtDec 28, 2025, 6:39 PM
updatedAtDec 28, 2025, 6:50 PM
githubUrlhttps://github.com/neomjs/neo/issues/8175
authortobiu
commentsCount1
parentIssue8169
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 28, 2025, 6:50 PM

Implement Window Connect/Disconnect Notifications for Neural Link

Closed v11.18.0 enhancementai
tobiu
tobiu commented on Dec 28, 2025, 6:39 PM

The App Worker must track main thread lifecycle and notify the Neural Link server.

Requirements:

  1. Client (src/ai/Client.mjs):

    • Listen to Neo.currentWorker connect and disconnect events.
    • Implement onAppWorkerWindowConnect: Send window_connected notification with window metadata (id, appName, rects).
    • Implement onAppWorkerWindowDisconnect: Send window_disconnected notification.
  2. Server (ConnectionService.mjs):

    • Handle window_connected notification: Update sessionData's windows map.
    • Handle window_disconnected notification: Remove from sessionData's windows map.
    • Update getWindowTopology to use this cached data instead of polling (or in addition to).

Goal: Ensure the Neural Link server has an up-to-date view of connected windows without needing to poll, and correctly handles window closures.

tobiu added the enhancement label on Dec 28, 2025, 6:39 PM
tobiu added the ai label on Dec 28, 2025, 6:39 PM
tobiu added parent issue #8169 on Dec 28, 2025, 6:39 PM
tobiu assigned to @tobiu on Dec 28, 2025, 6:39 PM
tobiu
tobiu Dec 28, 2025, 6:49 PM

Input from Gemini 3:

Implementation Complete

I have implemented the notification layer to track window lifecycle in real-time.

  • Client (Client.mjs): Added event listeners for Neo.currentWorker connect and disconnect events.
  • Protocol: Implemented window_connected (sending geometry & metadata) and window_disconnected notifications.
  • Server (ConnectionService.mjs): Updated #handleMessage to process these notifications and maintain a live registry of active windows in sessionData. This removes the need for polling to discover topology.
tobiu closed this issue on Dec 28, 2025, 6:50 PM
tobiu referenced in commit 21b8247 - "feat(ai): Implement Neural Link healing and standardize routing (#8169) on Dec 28, 2025, 7:15 PM