Bugfix: Why does the Vitto Studio preview never update after platfor...

Documentation for Sessions

🐛 Bugfix: Why does the Vitto Studio preview never update after platfor...

Date: 2026-03-17
Time: 17:05:36 UTC
Session: gspace1-230.9
Agent: angular
Confidence: 95%
Status: ✅ Documented


📋 Decision Context

Question:

Why does the Vitto Studio preview never update after platform generation via chat?

Task: Not specified


🎯 Decision Made

Chosen:

Three-part fix: (1) Forward module-gen.started/completed/failed events from VittoChatEngineService to StudioGenerationListenerService via new moduleGenEvents$ Subject, (2) Subscribe in StudioDockShellComponent to route these events to genListener.handleEvent(), (3) Add polling fallback (200s delay + 15s interval) that polls GET /vitto-api/module-generation/active/:spaceId when SSE forwarding dies due to 180s task timeout

Options Considered:


💭 Reasoning

Root cause: When generation is triggered via Vitto chat, SSE events flow through VittoChatEngineService. The engine has a NON_PHASE_EVENTS filter that silently DROPS module-gen.completed/failed/started events — they never reach StudioGenerationListenerService, so filesReadyForReview$ never fires and the dock-shell never switches to rspack preview mode. Second issue: the Vitto task times out at 180s but the pipeline takes ~250s, so the SSE forwarding subscription dies before module-gen.completed is even emitted. The polling fallback covers this gap.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation