Bugfix: Why were Vitto Command Hub components showing incorrect/empt...
Documentation for Sessions
🐛 Bugfix: Why were Vitto Command Hub components showing incorrect/empt...
Date: 2026-02-17
Time: 18:21:55 UTC
Session: gspace1-111.4
Agent: angular
Confidence: 100%
Status: ✅ Documented
📋 Decision Context
Question:
Why were Vitto Command Hub components showing incorrect/empty data?
Task: Fix Vitto Command Hub data display issues across all components
🎯 Decision Made
Chosen:
Fixed 7 confirmed bugs: field mapping mismatches between backend response shapes and frontend parsing. Memory used 'content' but backend returns 'summary'; stats used 'total' but backend returns 'totalMemories'; IDs used '_id' but backend returns 'memoryId'; Observatory components parsed .data but backends return .approvals/.entries; Cost Dashboard called non-existent /agents/metrics endpoint; added getMcpStatus() for real data from McpStatusController.
Options Considered:
- No alternatives documented
💭 Reasoning
Root cause was systematic: frontend components were written assuming a generic { data: [...] } wrapper, but each backend endpoint uses its own named response shape (approvals, entries, memories, etc.). The Cost Dashboard called a non-existent endpoint (/agents/metrics) when the real data lives at /ai/mcp/status. The memory field mapping bugs (summary vs content, memoryId vs _id, totalMemories vs total) were invisible — cards rendered with empty text, stats showed 0, and edit/delete operations would fail silently.
📁 Files Involved
libs/libs-ai/vitto-hub/src/lib/components/memory-manager/memory-manager.component.tslibs/libs-ai/vitto-hub/src/lib/components/cost-dashboard/cost-dashboard.component.tslibs/libs-ai/vitto-hub/src/lib/components/cost-dashboard/cost-dashboard.component.htmllibs/libs-ai/vitto-hub/src/lib/components/observatory-panel/observatory-approvals.component.tslibs/libs-ai/vitto-hub/src/lib/components/observatory-panel/observatory-audit.component.tslibs/libs-ai/vitto-hub/src/lib/components/observatory-panel/observatory-panel.component.tslibs/libs-ai/vitto-hub/src/lib/services/vitto-api.service.ts
🔗 Related
- Decision ID:
dev_1771352515553_59idyoh - Session: 111
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation