Pattern: How should vitto-studio dock panels share git state with the...

Documentation for Sessions

🎨 Pattern: How should vitto-studio dock panels share git state with the...

Date: 2026-03-23
Time: 18:22:46 UTC
Session: gspace1-258.12
Agent: angular
Confidence: 85%
Status: ✅ Documented


📋 Decision Context

Question:

How should vitto-studio dock panels share git state with the Graph panel using a different data source (Hetzner direct vs backend-api)?

Task: Not specified


🎯 Decision Made

Chosen:

Dual-service bridge: Graph panel uses GitOperationsStateService (Hetzner direct for commit graph) while syncing branch switches bidirectionally with GitStateService (backend-api for Branches/History/Diff panels). Branch switch in either panel propagates to the other via effect().

Options Considered:

  1. Merge both into one service (breaks provider abstraction)
  2. Graph panel uses GitStateService only (no parentShas, no graph lanes)
  3. Dual-service bridge with branch sync (chosen)
  4. Replace GitStateService entirely with GitOperationsStateService (too risky, touches 10+ consumers)

💭 Reasoning

GitStateService reads from backend-api which routes through the git provider abstraction (Hetzner/Local/GitLab). GitOperationsStateService reads directly from Hetzner via /sandbox-api proxy. They serve different purposes: GitStateService is the studio's canonical git state (used by toolbar, deploy, history), while GitOperationsStateService provides the rich commit graph with parentShas. Merging them would break the provider abstraction. The bridge pattern keeps both independent while syncing the one shared concern: active branch.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation