195.2 Frontend Ui Analysis
Documentation for Sessions
S195.2 — Frontend UI Analysis: Required Updates Across All 4 Apps
Status: Analysis Complete, Implementation Deferred to S195.3
This document catalogs all frontend changes needed to fully leverage the S195 Vitto Intelligence Upgrade backend work.
Critical Path (Must Do)
1. libs/libs-ai/vitto-chat/src/lib/services/vitto-chat-engine.service.ts — DONE
- Pass
userRoleandroleLevelin POST to/engine/message - Read from
UserContextService.userType()andUserContextService.roleLevel()
2. libs/libs-ai/vitto-chat/src/lib/services/user-context.service.ts — DONE
- Add
roleLevelSignalwith auto-derivation fromuserType - Add
defaultRoleLevel()static method - Accept
roleLevelinsetContext()config
3. Host App setContext() Callers — NEEDS UPDATE
Each app that hosts Vitto chat must pass roleLevel when calling userContext.setContext():
| App | File | Status |
|---|---|---|
| gograb-ai | apps/gograb-ai/src/app/ — look for setContext() calls |
Auto-derived from userType (works without change) |
| gograb-space | apps/gograb-space/src/app/ |
Auto-derived (works) |
| gograb-admin | apps/gograb-admin/src/app/ |
Auto-derived (works) |
| gograb-dev | apps/gograb-dev/src/app/ |
Auto-derived (works) |
Note: The defaultRoleLevel() auto-derivation means all apps work WITHOUT explicit changes. The roleLevel is inferred from userType. Apps can override with explicit roleLevel when they have richer auth context.
Executive Instructions UI — New Feature (S195.3)
Location: libs/libs-ai/vitto-hub/src/lib/components/vitto-settings/
The VittoSettingsComponent already has role-gated sections. Add a new section for executives:
Proposed Component: executive-instructions-panel.component.ts
Features:
- Table listing active instructions (sorted by priority)
- Create form: instruction text, category dropdown, scope dropdown, priority slider
- Edit inline
- Deactivate (soft delete) with confirmation
- Only visible when
userRole === 'executive'(roleLevel >= 90)
API Calls (all to backend-vitto-api):
GET /vitto/executive/instructions?spaceId=XPOST /vitto/executive/instructionsPUT /vitto/executive/instructions/:idDELETE /vitto/executive/instructions/:id
Route: Add as subsection of /vitto/settings or as new tab in the Vitto Hub sidebar under "Governance"
App-by-App Analysis
gograb-ai (Primary AI App)
Current Vitto Integration:
- Main chat:
/vitto/chatroute - Hub:
/vitto/*routes (brain, persona, settings, observatory, skills, etc.) - Panel:
/panelstandalone chat view
S195 Impact:
- Chat already works (role auto-derived)
- Settings page needs executive instructions section (new component)
- Hub governance tab could show space profiles (from SpaceIntelligenceService)
Recommended S195.3 Work:
- Create
ExecutiveInstructionsPanelComponentin vitto-hub - Add to vitto-settings as role-gated tab
- Add "Space Profile" card to observatory dashboard (shows maturity, modules, patterns)
gograb-space (Platform Builder App)
Current Vitto Integration:
- Vitto routes available via
/space/:spaceSlug/vitto - Studio integration for module generation
S195 Impact:
- Chat works (role auto-derived as
space_builder→ roleLevel=40) - Studio module generation now uses live codebase index + generation context (backend change, no frontend needed)
- Space profiles auto-created on first generation
Recommended S195.3 Work:
- No immediate changes needed
- Future: Show generation history + quality scores in Studio UI
gograb-admin (Admin App)
Current Vitto Integration:
/vitto-chatroute for admin chat- Minimal Vitto features
S195 Impact:
- Chat works (role auto-derived as
admin→ roleLevel=60) - Admin gets knowledge graph context in prompts (roleLevel >= 60)
Recommended S195.3 Work:
- No immediate changes needed
- Future: Add executive instructions management for admin-level users
gograb-dev (Developer App)
Current Vitto Integration:
/vitto-chatroute for dev testing- Full developer tools
S195 Impact:
- Chat works (role auto-derived as
developer→ roleLevel=80) - Developer gets full context (knowledge graph + learning intelligence + codebase)
Recommended S195.3 Work:
- No immediate changes needed
Summary
| Component | S195.2 Status | S195.3 Required |
|---|---|---|
| Chat engine (vitto-chat lib) | DONE | - |
| User context (vitto-chat lib) | DONE | - |
| Backend API (vitto-api) | DONE | - |
| Host app callers | Auto-derived, WORKS | Explicit roleLevel from auth (optional) |
| Executive Instructions UI | NOT STARTED | New component in vitto-hub |
| Space Profile Dashboard | NOT STARTED | Observatory card (optional) |
| Generation History UI | NOT STARTED | Studio enhancement (optional) |
Bottom line: All 4 apps work with S195.2 backend changes without any frontend modifications, thanks to the defaultRoleLevel() auto-derivation. The remaining frontend work (executive instructions UI, space profile dashboard) is new feature development for S195.3.