LearnNewsExamplesServices
Frontmatter
id9503
titleTimelineCanvas regression: Canvas not showing due to SharedCanvas getCanvasId() mismatch with componentId
stateClosed
labels
bugai
assigneestobiu
createdAtMar 17, 2026, 7:20 PM
updatedAtMar 17, 2026, 7:21 PM
githubUrlhttps://github.com/neomjs/neo/issues/9503
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 17, 2026, 7:21 PM

TimelineCanvas regression: Canvas not showing due to SharedCanvas getCanvasId() mismatch with componentId

Closed v12.1.0 bugai
tobiu
tobiu commented on Mar 17, 2026, 7:20 PM

When fixing issue #9479 to implement Triangular Communication for OffscreenCanvas transfers, we changed how Canvas.mjs registers callbacks. Previously, it relied purely on the nodeId in Neo.main.DomAccess.transferCanvasToWorker({nodeId}). However, SharedCanvas overrides getCanvasId() to return the inner <canvas> tag's id, whereas me.id refers to the div wrapper. Because we didn't pass componentId down through the triangular communication (Main -> Canvas Worker -> App Worker), onCanvasRegistered({nodeId}) in worker/App.mjs was using nodeId (the inner canvas) to look up the component via Neo.get(). This lookup failed for SharedCanvas instances like TimelineCanvas, because their componentId is different from the nodeId of the <canvas> tag. This PR fixes the issue by explicitly passing componentId from Canvas.mjs to Main, then to Canvas Worker, and back to App Worker, ensuring Neo.get(componentId) resolves correctly.

tobiu added the bug label on Mar 17, 2026, 7:20 PM
tobiu added the ai label on Mar 17, 2026, 7:20 PM
tobiu assigned to @tobiu on Mar 17, 2026, 7:20 PM
tobiu referenced in commit 481fddf - "bug: Fix TimelineCanvas regression by passing componentId through triangular communication (#9503)" on Mar 17, 2026, 7:20 PM
tobiu closed this issue on Mar 17, 2026, 7:21 PM