Bugfix: Studio preview shows 'Ready when you are' forever after gene...
Documentation for Sessions
🐛 Bugfix: Studio preview shows 'Ready when you are' forever after gene...
Date: 2026-03-17
Time: 16:01:23 UTC
Session: gspace1-230.3
Agent: angular
Confidence: 95%
Status: ✅ Documented
📋 Decision Context
Question:
Studio preview shows 'Ready when you are' forever after generation completes — what's the root cause?
Task: S230: Review and fix platform generation pipeline
🎯 Decision Made
Chosen:
Three-part fix: (1) handleCompleted() now reads moduleNames from top-level event data instead of nonexistent result.executeResult.modules path, (2) Always emit filesReadyForReview$ after VFS refresh even when SSE event lacks inline files — this triggers dock-shell to switch preview to rspack mode, (3) Forward moduleNames/summary/deployResult in module-gen.plugin.ts tool.progress wrapper so frontend receives complete event data.
Options Considered:
- No alternatives documented
💭 Reasoning
Root cause chain: (A) module-gen.completed event sends {moduleNames, totalModules, ...} at top level, but handleCompleted() looked for result.executeResult.modules which doesn't exist — targeted refresh never worked. (B) filesReadyForReview$ only fired in Path 1 (inline files) but never in Path 2 (VFS refresh) — the dock-shell switches to rspack preview mode ONLY when filesReadyForReview$ fires, so preview stayed in 'idle' showing 'Ready when you are'. (C) module-gen.plugin.ts forwarding selectively picked fields and omitted moduleNames — even after fixing the handler, the data wouldn't arrive.
📁 Files Involved
libs/libs-structural/vitto-studio/src/lib/services/studio-generation-listener.service.tsAPIs/backend-vitto-api/src/app/tools/plugins/module-gen.plugin.ts
🔗 Related
- Decision ID:
dev_1773763282984_5fufv60 - Session: 230
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation