Implementation: How to wire frontend UI components to backend SSE module gen...

Documentation for Sessions

⚙️ Implementation: How to wire frontend UI components to backend SSE module gen...

Date: 2026-02-04
Time: 04:42:48 UTC
Session: editor2-86.3
Agent: angular
Confidence: 95%
Status: ✅ Documented


📋 Decision Context

Question:

How to wire frontend UI components to backend SSE module generation?

Task: Wire SSE module generation to UI components


🎯 Decision Made

Chosen:

Update both ModuleGenerationPanelComponent and AIPanelComponent to use GenerationRouterService.generateModuleWithProgress() for SSE streaming

Options Considered:

  1. Keep using local mock generation
  2. Direct HTTP POST to backend
  3. SSE streaming via GenerationRouterService
  4. WebSocket streaming

💭 Reasoning

SSE streaming provides real-time progress updates from PhaseOrchestratorService (4-phase generation), enabling better UX with phase/progress indicators. The GenerationRouterService already has the SSE infrastructure built (Session 71), so wiring the UI was straightforward. Added universeId input to AIPanelComponent, injected GenerationRouterService, and updated both components to subscribe to SSE progress events. Preserved all downstream logic (module registration, drag-drop outputs, outcome tracking).


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation