Architecture: Deployment E2E: How should Quick Deploy connect to Cloudflar...
Documentation for Sessions
🏗️ Architecture: Deployment E2E: How should Quick Deploy connect to Cloudflar...
Date: 2026-02-26
Time: 12:55:04 UTC
Session: gspace1-142.19
Agent: angular
Confidence: 92%
Status: ✅ Documented
📋 Decision Context
Question:
Deployment E2E: How should Quick Deploy connect to Cloudflare and GitLab? What is the status flow?
Task: Not specified
🎯 Decision Made
Chosen:
Quick Deploy triggers cloud deploy asynchronously (local preview immediate, cloud background)
Options Considered:
- Quick Deploy remains local-only, cloud deploy is separate action
- Quick Deploy triggers cloud deploy synchronously (blocks until uploaded)
- Quick Deploy triggers cloud deploy asynchronously (local preview immediate, cloud background)
💭 Reasoning
ROOT CAUSE of original bug: PlatformDeploymentService.deployPlatform() only did router.resetConfig() + storage.put(). It never called DeploymentService or CloudflarePagesService. Result: local routes worked until page refresh, Launch Station showed DRAFT, no cloud URL existed. FIX: After router.resetConfig() succeeds, PlatformDeploymentService now (a) updates MongoDB status to 'deployed' via SpaceService.updateUniverse(), (b) calls DeploymentService.deployUniverse() which triggers Cloudflare Pages upload. The cloud deploy is fire-and-forget — the local preview works immediately while Cloudflare processes in background. DeploymentResult now includes cloudUrl field. DeploymentModalComponent shows the cloud preview URL when available. GITLAB PATH: New endpoint POST /api/:tenantId/deployment/:universeId/deploy-gitlab creates a GitLab repo, pushes .gitlab-ci.yml, and triggers the pipeline. This is a separate action in Launch Station ('Deploy via GitLab CI/CD' button). STATUS FLOW: Generate → Quick Deploy (local router + cloud background) → cloudUrl available → Launch Station shows real status. WHAT WOULD MAKE THIS WRONG: If Cloudflare upload consistently fails, the user sees 'deployed' status but no working cloud URL. The failure is logged but not surfaced in the UI beyond the missing URL. REMAINING GAP: No SSE subscription in the Quick Deploy flow for real-time cloud upload progress.
📁 Files Involved
libs/libs-space/universe-canvas/src/lib/services/platform-deployment.service.tslibs/libs-structural/deployment-system/src/lib/services/deployment.service.tslibs/libs-structural/launch-station-lib/src/lib/components/launch-dashboard/launch-dashboard.component.tsAPIs/backend-api/src/app/deployment/deployment.controller.ts
🔗 Related
- Decision ID:
dev_1772110504859_26f4yi6 - Session: 142
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation