LearnNewsExamplesServices
Frontmatter
id8948
titleEpic: Dynamic Worker Architecture & Import Protocol
stateClosed
labels
epicdeveloper-experienceaiarchitecture
assigneestobiu
createdAtFeb 2, 2026, 2:59 PM
updatedAtFeb 2, 2026, 11:54 PM
githubUrlhttps://github.com/neomjs/neo/issues/8948
authortobiu
commentsCount1
parentIssuenull
subIssues
8949 Feat: `Manager.startWorker` Remote Method
8950 Refactor: Move `loadModule` to `Neo.worker.Base`
8951 Feat: Smart Initialization for SparklineComponent
8952 Bug: Dynamic Worker Start triggers Double App Init & Canvas Race Condition
8953 Feat: Optional Canvas Worker Entry Point (`useCanvasWorkerStartingPoint`)
8954 Feat: Generic Sparkline Component & Grid Column
8955 Feat: Migrate Sparkline Renderer to `src/canvas` & Enforce Defaults
subIssuesCompleted7
subIssuesTotal7
blockedBy[]
blocking[]
closedAtFeb 2, 2026, 11:54 PM

Epic: Dynamic Worker Architecture & Import Protocol

Closed v12.0.0 epicdeveloper-experienceaiarchitecture
tobiu
tobiu commented on Feb 2, 2026, 2:59 PM

This epic covers the implementation of a "Dynamic Import Protocol" and "Auto-Initializing Workers" to significantly improve the Developer Experience (DX) for worker-based components (like Sparkline, Canvas).

Goal: Enable developers to drop in advanced, worker-backed components without requiring manual configuration (useCanvasWorker: true) or boilerplate code (canvas.mjs).

Strategy:

  1. On-Demand Worker Start: The Main Thread (Neo.worker.Manager) will expose a method to start workers (e.g., 'canvas') dynamically if they are not already running.
  2. Dynamic Module Loading: The Neo.worker.Base class will expose a loadModule method, allowing any worker to import scripts (renderers) at runtime.
  3. Smart Component Logic: Components will orchestrate this process: "Start Worker" -> "Load Renderer" -> "Register".

Roadmap:

  • Feat: Manager.startWorker: Implement the main thread logic to spawn workers on demand.
  • Refactor: worker.Base.loadModule: Centralize module loading logic in the base worker class.
  • Feat: Smart Initialization: Update SparklineComponent (as a PoC) to auto-initialize its environment.
  • Feat: Generic Sparkline Column: Create a Neo.grid.column.Sparkline that wraps this logic for easy grid integration.
tobiu added the epic label on Feb 2, 2026, 2:59 PM
tobiu added the developer-experience label on Feb 2, 2026, 2:59 PM
tobiu added the ai label on Feb 2, 2026, 2:59 PM
tobiu added the architecture label on Feb 2, 2026, 2:59 PM
tobiu added sub-issue #8949 on Feb 2, 2026, 3:00 PM
tobiu added sub-issue #8950 on Feb 2, 2026, 3:00 PM
tobiu added sub-issue #8951 on Feb 2, 2026, 3:01 PM
tobiu assigned to @tobiu on Feb 2, 2026, 3:29 PM
tobiu added sub-issue #8952 on Feb 2, 2026, 10:31 PM
tobiu cross-referenced by #8952 on Feb 2, 2026, 10:39 PM
tobiu added sub-issue #8953 on Feb 2, 2026, 10:50 PM
tobiu added sub-issue #8954 on Feb 2, 2026, 11:39 PM
tobiu added sub-issue #8955 on Feb 2, 2026, 11:54 PM
tobiu
tobiu Feb 2, 2026, 11:54 PM

Input from Gemini 3 Pro:

✦ I have successfully completed the Dynamic Worker Architecture & Import Protocol epic.

Achievements:

  1. Dynamic Worker Orchestration: Implemented Neo.worker.Manager.startWorker (#8949) to allow on-demand spawning of workers (e.g., 'canvas') from the main thread.
  2. Protocol Standardization: Centralized module loading in Neo.worker.Base (#8950), enabling any worker to dynamically import scripts.
  3. Zero-Config Components: Created Neo.component.Sparkline (#8954) and Neo.canvas.Sparkline (#8955) as a fully autonomous pair. The component orchestrates the worker start, module load, and renderer registration automatically.
  4. Grid Integration: Delivered Neo.grid.column.Sparkline for seamless usage in data grids.
  5. Robustness: Solved race conditions (#8952) and made the canvas worker entry point optional (#8953), ensuring existing apps remain stable while new features are "opt-in".

Outcome: Developers can now simply use {type: 'sparkline', dataField: '...'} in a grid column, and the framework handles the entire multi-threaded complexity (starting the worker, loading the renderer, syncing state) transparently. This significantly improves the Developer Experience (DX) for advanced visualizations.

tobiu closed this issue on Feb 2, 2026, 11:54 PM
tobiu cross-referenced by #8930 on Feb 3, 2026, 12:03 AM