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:

  1. Iframe embedding of Angular git-operations page
  2. WebSocket-based real-time sync with orchestrator
  3. Extension calls orchestrator directly (rejected — leaks infra topology)
  4. Separate shell-level tab instead of Level 2 Lit tab

💭 Reasoning

  1. 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


🔗 Related


Auto-generated by MCP Smart Consolidation