Bugfix: Session 181: Why was Vitto completely blind to the user's cu...

Documentation for Sessions

🐛 Bugfix: Session 181: Why was Vitto completely blind to the user's cu...

Date: 2026-03-06
Time: 14:42:29 UTC
Session: gspace1-183.2
Agent: angular
Confidence: 97%
Status: ✅ Documented


📋 Decision Context

Question:

Session 181: Why was Vitto completely blind to the user's current page in web chat?

Task: Fix Vitto chat intelligence — page awareness, screenshots, web prompt


🎯 Decision Made

Chosen:

Three-part fix: (1) Wire pageContext into sendMessageViaVitto POST body, (2) Upgrade buildWebSystemPrompt to full intelligence parity with channel prompt, (3) Add capture_user_screen tool via WebSocket for real visual awareness

Options Considered:

  1. Wire pageContext only (quick fix)
  2. Upgrade web prompt only (medium fix)
  3. Full three-part fix: pageContext + prompt parity + screen capture tool (chosen)
  4. Remove screenshot tools entirely and rely on text context only

💭 Reasoning

Root cause was a silent data loss chain: sendMessageViaVitto() sent {message, spaceId} but omitted pageContext — the controller accepted it, the engine used it, but frontend never populated it. This meant the LLM had zero page awareness on the primary (tool-enabled) pipeline. Additionally, buildWebSystemPrompt was a stripped-down version with no semantic recall, no learning intelligence, no awareness hub, no emotional arc — features the WhatsApp channel got. The web panel — where users actually interact with Vitto — was a second-class citizen. Finally, browser_screenshot used server-side Playwright with no page loaded, returning blank screenshots. Created capture_user_screen tool that requests viewport capture from user's actual browser via LocalBridge WebSocket.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation