Bugfix: How to fix Bug 10 — page crash/hang at 100% completion when ...

Documentation for Sessions

🐛 Bugfix: How to fix Bug 10 — page crash/hang at 100% completion when ...

Date: 2026-02-24
Time: 05:14:19 UTC
Session: gspace1-138.5
Agent: angular
Confidence: 95%
Status: ✅ Documented


📋 Decision Context

Question:

How to fix Bug 10 — page crash/hang at 100% completion when autoSyncModulesToCanvas() firstValueFrom() calls never resolve?

Task: S139 platform generation pipeline completion


🎯 Decision Made

Chosen:

Added timeout(10000) + catchError(→ EMPTY) with defaultValue:null to both firstValueFrom() calls (replaceTree + hydrateFromModules). Also fixed manifest-null guard to set pendingAutoSync=true so the existing retry effect can pick it up.

Options Considered:


💭 Reasoning

The root cause was two naked firstValueFrom() calls with no timeout — if the underlying observables never emit (e.g. replaceTree or hydrateFromModules fails silently), the async function hangs forever, blocking the Angular change detection loop and triggering Chrome's "Page Unresponsive" dialog. timeout(10000) gives a 10-second grace period, catchError degrades gracefully (logs error, auto-sync shows warning toast), and defaultValue:null prevents EmptyError. The pendingAutoSync guard was already false for null manifest (skipped silently instead of retrying) — fixing it to set pendingAutoSync=true means the existing retry effect (lines 739-760) will re-attempt when the manifest signal updates.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation