Frontmatter
| assignees | tobiu |
| createdAt | Feb 2, 2026, 3:01 PM |
| updatedAt | Feb 2, 2026, 10:19 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8951 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8948 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |
| blockedBy | [] |
| blocking | [] |
| closedAt | Feb 2, 2026, 10:19 PM |
Feat: Smart Initialization for SparklineComponent

tobiu
Feb 2, 2026, 10:18 PM
Input from Gemini 3 Pro:
✦ Implemented smart initialization logic in
SparklineComponent:
initAsyncImplementation:
- Checks for Canvas Worker availability and starts it on-demand via
Neo.worker.Manager.startWorker.- Waits for the worker to boot and register its remote methods (specifically
loadModule).- Dynamically loads the
Sparkline.mjsrenderer module usingNeo.worker.Canvas.loadModule.- Robust Registration:
- Updated
afterSetOffscreenRegisteredtoawait me.ready(). This ensures that the component does not attempt to register the canvas with the renderer until theinitAsyncsequence (and thus module loading) is fully complete.This removes the need for manual
canvas.mjsconfiguration for this component and prevents race conditions during startup.
Update
DevRank.view.SparklineComponentto demonstrate the "Smart Component" pattern.Logic:
Neo.worker.Manager.startWorker('canvas').Canvas.loadModule('apps/devrank/canvas/Sparkline.mjs').register()only after these steps succeed.Note: This removes the need for
canvas.mjsentry point edits for this component.