Architecture: How should the VSCode extension render git operations native...
Documentation for Sessions
🏗️ Architecture: How should the VSCode extension render git operations native...
Date: 2026-03-24
Time: 15:20:24 UTC
Session: gspace1-259.4
Agent: angular
Confidence: 92%
Status: ✅ Documented
📋 Decision Context
Question:
How should the VSCode extension render git operations natively — port Angular components to Lit, proxy through ai-api, or embed an iframe?
Task: S259: VSCode extension git features — native git-graph tab with role-based repo access and clone integration
🎯 Decision Made
Chosen:
Port git-graph and git-operations UI to Lit as a new Level 2 webview tab ("Repositories"). Import pure-TS utils directly (lane assignment, SVG renderer, formatters, types, role config). Rewrite Angular components to Lit. Backend: new GitProxyController + GitProxyService on ai-api using SelfHostedProvider pattern (native fetch + existing SANDBOX_SERVER_URL/SANDBOX_API_KEY env vars). Clone integration inside git-graph via vscode.commands.executeCommand('git.clone', url).
Options Considered:
- Iframe embedding of Angular git-operations page
- WebSocket-based real-time sync with orchestrator
- Extension calls orchestrator directly (rejected — leaks infra topology)
- Separate shell-level tab instead of Level 2 Lit tab
💭 Reasoning
- Iframe embedding would require a running Angular dev server and CORS setup — fragile and defeats the purpose of native IDE integration. 2) The git-operations library has clean layering: pure-TS utils (no Angular deps) can be imported directly via esbuild path aliases already configured. Only the 7 Angular components need Lit rewrites. 3) ai-api already has SANDBOX_SERVER_URL and SANDBOX_API_KEY env vars for the orchestrator (SelfHostedProvider pattern), and BACKEND_API_URL + BACKEND_API_INTERNAL_TOKEN for backend-api (PlatformOrchestrationService pattern). No new infra needed. 4) JWT already carries platformRole and spaceId — role-based filtering is free. 5) Clone UX naturally belongs inside the git-graph (already has clone dropdown inputs), not as a separate command. 6) vitto-api's BackendApiClientService.getSpace/getSpaceUniverses pattern confirms the inter-service pattern is established and works.
📁 Files Involved
APIs/backend-ai-api/src/app/infrastructure/services/sandbox/self-hosted.provider.tsAPIs/backend-ai-api/src/app/workflow/services/platform-orchestration.service.tslibs/libs-structural/git-operations/src/lib/components/git-graph/git-graph.component.tslibs/libs-structural/git-operations/src/lib/components/git-graph/git-graph-lane.util.tslibs/libs-structural/git-operations/src/lib/components/git-graph/git-graph-renderer.util.tslibs/libs-structural/git-operations/src/lib/models/git-operations-role.config.tsapps/vitto-vscode-extension/src/panels/webview/app.tsapps/vitto-vscode-extension/src/panels/main-panel.ts
🔗 Related
- Decision ID:
dev_1774365624085_z3sl1rm - Session: 259
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation