Implementation: How to wire route auto-registration from module generation p...

Documentation for Sessions

⚙️ Implementation: How to wire route auto-registration from module generation p...

Date: 2026-02-23
Time: 12:59:00 UTC
Session: gspace1-137.4
Agent: angular
Confidence: 95%
Status: ✅ Documented


📋 Decision Context

Question:

How to wire route auto-registration from module generation pipeline?

Task: WS5: Route Generation - Wire RouteRegistrationService to generation pipeline


🎯 Decision Made

Chosen:

Listen for ModuleGeneratedEvent on EventBus in BootstrapInitializerService, call RouteRegistrationService.registerModuleRoutes() on event

Options Considered:

  1. Wire in BootstrapInitializerService via EventBus listener
  2. Wire in AppComponent with a manual refresh button
  3. Wire in VibeUniverseGeneratorComponent directly
  4. Use an interval to poll RouteRegistrationService

💭 Reasoning

The RouteRegistrationService already exists and handles injection of dynamic routes into Angular Router via Router.resetConfig(). The ModuleGeneratedEvent (created in WS4) fires when workflow completes. Wiring these together in the BootstrapInitializerService (which already manages module lifecycle) creates a clean event-driven pipeline: generation completes -> event fires -> routes re-registered -> navigation updates. No polling or manual triggers needed.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation