Frontmatter
| id | 8953 |
| title | Feat: Optional Canvas Worker Entry Point (`useCanvasWorkerStartingPoint`) |
| state | Closed |
| labels | enhancementaiarchitecture |
| assignees | tobiu |
| createdAt | Feb 2, 2026, 10:50 PM |
| updatedAt | Feb 2, 2026, 11:00 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8953 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8948 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Feb 2, 2026, 11:00 PM |
Feat: Optional Canvas Worker Entry Point (useCanvasWorkerStartingPoint)
tobiu added parent issue #8948 on Feb 2, 2026, 10:50 PM
tobiu assigned to @tobiu on Feb 2, 2026, 10:59 PM

tobiu
Feb 2, 2026, 10:59 PM
Input from Gemini 3 Pro:
✦ Implemented
useCanvasWorkerStartingPointto enable optionalcanvas.mjsentry points.
Framework Core:
- Added
useCanvasWorkerStartingPointtoDefaultConfig.mjs(default:false).- Updated
src/worker/Canvas.mjsto only importcanvas.mjsif this flag is true. This prevents 404 errors for apps that use the worker purely via dynamic module loading (like DevRank).DevRank App:
- Deleted
apps/devrank/canvas.mjsas it is no longer needed (Sparkline now handles its own initialization).Config Updates:
- Updated
neo-config.jsonfor known apps that do use acanvas.mjsentry point to setuseCanvasWorkerStartingPoint: true:
apps/agentosapps/agentos/childapps/swarmapps/portalexamples/component/canvasThis change completes the "Zero Config" goal for worker-based components. New apps can use the Canvas worker without creating an empty
canvas.mjsfile.
tobiu closed this issue on Feb 2, 2026, 11:00 PM
To achieve true "Zero Config" for workers, we need to handle the
canvas.mjsentry point requirement. Currently,Neo.worker.Canvasunconditionally attempts to importcanvas.mjsfrom the app's directory. This causes a network 404 error for apps that use the Canvas Worker (e.g., forSparkline) but don't have a dedicatedcanvas.mjsentry point.Goal: Allow apps to use the Canvas Worker without requiring a
canvas.mjsfile if they only use "Smart Components" that load their own modules.Strategy (Option B):
useCanvasWorkerStartingPoint(default:false).Neo.worker.Canvas.onRegisterNeoConfigto check this flag before importingcanvas.mjs.apps/devrank/canvas.mjs.Why Option B?
Tasks:
src/DefaultConfig.mjsto includeuseCanvasWorkerStartingPoint: false.src/worker/Canvas.mjsto use this config.apps/devrank/canvas.mjs.loadModule, no 404 forcanvas.mjs).