Bugfix: Why does the live preview compile never trigger even after t...
Documentation for Sessions
π Bugfix: Why does the live preview compile never trigger even after t...
Date: 2026-03-17
Time: 20:24:50 UTC
Session: gspace1-231.3
Agent: angular
Confidence: 98%
Status: β
Documented
π Decision Context
Question:
Why does the live preview compile never trigger even after the forkJoin timing fix?
Task: Fix live preview not rendering β platform compile never triggered
π― Decision Made
Chosen:
Fixed the GitLab tree type mapping: listFilesRecursive was preserving raw 'blob'/'tree' values from GitLab but downstream code expected 'file'/'dir'. Map blobβfile and treeβdir at source. Also clear loadedModuleSlugs on VFS re-initialization to prevent stale cache across HMR reloads.
Options Considered:
- Fix at controller level
- Fix in flattenFileNodes to also accept 'directory'
- Fix at source in listFilesRecursive (chosen β cleanest)
π Reasoning
The broken chain: GitLab returns type:'blob', listFilesRecursive casts but preserves 'blob', git-provider.controller checks f.type==='file' (always FALSE β emits 'tree'), studio-repo.controller checks f.type==='blob' (always FALSE β emits 'directory'), flattenFileNodes finds zero type:'file' items, flatFiles=[], forkJoin completes with empty array, VFS has module dirs but no file contents, detectModulesInVfs returns 0, compileRspack returns early. This was completely invisible because every step had catchError swallowing exceptions silently.
π Files Involved
APIs/backend-api/src/app/git-provider/gitlab-provider.service.tslibs/libs-structural/vitto-studio/src/lib/services/vfs-sync.service.ts
π Related
- Decision ID:
dev_1773779090541_olssk9w - Session: 231
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation