LearnNewsExamplesConnect
Frontmatter
assigneesneo-gpt-euclid
createdAtAug 31, 2026, 12:58 AM
updatedAtAug 31, 2026, 3:43 AM
githubUrlhttps://github.com/neomjs/neo/issues/17899
authorneo-opus-vega
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtAug 31, 2026, 3:43 AM

The deprecated 'main' destination still carries importAddon, grid registrations and startWorker

neo-opus-vega
neo-opus-vega commented on Aug 31, 2026, 12:58 AM

Context

While producing the AC-2 live receipt for #17895 (apps/workstation, SharedWorkers, race-free CDP auto-attach with live console previews), the instrument surfaced the REMAINING tail of the #8149 'main'-destination migration: ~50 deprecation warnings on a single workstation boot, none of them from the dock namespace #17895 fixed.

Live latest-open sweep: checked latest 20 open issues at 2026-08-30T22:57Z; no equivalent found. Prior art: #8149 (the migration, introduced the warning), #8366 (registerRemote exemption), #17895 (the dock-namespace instance, fixed).

The Problem

Captured caller inventory (CDP arg previews, one workstation boot + one splitter drag):

  • Neo.Main.importAddon — 6 dispatches with destination=main
  • Neo.main.addon.GridDragScroll.register — 2
  • Neo.main.addon.GridRowScrollPinning.register — 2
  • Neo.main.addon.GridHorizontalScrollSync.register — 2
  • Neo.worker.Manager.startWorker — ~35 (!)

Every one is a remote-method call whose data carries no windowId, so RemoteMethodAccess#generateRemote cannot swap the destination and SharedWorker port resolution falls to the last-resort first port. Consequences mirror #17895: correct-by-coincidence in a single window plus console spam; wrong-realm dispatch the moment a second window connects — grid addon registrations in particular are per-window main-thread state, so a torn-out grid would register its scroll sync against the wrong window.

The startWorker volume (~35 on one boot) additionally smells like a retry or per-instance loop worth understanding while fixing the routing — count it as an observation, not a diagnosis.

The Architectural Reality

generateRemote (src/worker/mixin/RemoteMethodAccess.mjs) swaps destination from 'main' to data.windowId only when the caller provides one. The fix pattern is established by #17895 (windowId: host.windowId at the call sites) and by the Gallery.mjs promiseMessage(me.windowId, ...) idiom. Grid addon register calls originate in grid components that know their windowId; importAddon and startWorker callers need a per-site look at which realm they actually intend.

The Fix

Per caller family: pass the intended realm's windowId in the call data (component callers: their own windowId), or route via promiseMessage(windowId, ...) where the call is hand-built. Reproduce the receipt instrument from #17895's PR (workstation boot under CDP auto-attach) and drive it to zero deprecation warnings.

Decision Record impact: none (completes the #8149 contract).

Acceptance Criteria

  • AC-1: a workstation boot + one dock/grid interaction emits zero destination "main" is deprecated warnings (CDP or equivalent browser-plane receipt).
  • AC-2: grid addon registrations carry the owning grid's windowId (unit arm on the payload seam, #17895-style).
  • AC-3: the startWorker dispatch volume is explained in the PR (fixed if a defect, documented if by design).
  • AC-4: full unit suite green in fully-parallel mode.

Out of Scope

  • The dock namespace (#17895, fixed) and the deprecation mechanism itself.
  • The dead-port rejection contract (#17894).

Related

#8149 (migration prior art), #8366, #17895 (fix pattern + instrument), #17888 (adjacent SharedWorker work).

Origin Session ID: b51135ac-ec45-4689-ac45-0e99fb073069 Retrieval Hint: "deprecated main destination tail importAddon startWorker grid addon registrations"

tobiu referenced in commit e072b1e - "fix(worker): route main-thread calls to owning windows (#17899) (#17903)" on Aug 31, 2026, 3:43 AM
tobiu closed this issue on Aug 31, 2026, 3:43 AM