Bugfix: How to fix Chrome extension side panel showing different UI ...
Documentation for Sessions
🐛 Bugfix: How to fix Chrome extension side panel showing different UI ...
Date: 2026-03-03
Time: 17:49:38 UTC
Session: gspace1-168.2
Agent: angular
Confidence: 95%
Status: ✅ Documented
📋 Decision Context
Question:
How to fix Chrome extension side panel showing different UI (missing tabs, wrong quick actions) compared to the full gograb-ai app?
Task: Session 168: Fix chat UI consistency between Chrome extension and gograb-ai app
🎯 Decision Made
Chosen:
Three-part fix: (1) Pass userRole in sidepanel.js buildFrameUrl, (2) Normalize plugin registration order with capabilities before suggestions in both surfaces, (3) Send contextType and appType from sidepanel sendContextToApp and content script sendContextToPanel. Plus: SPA route detection via history.pushState monkey-patch, appType field on VittoRichContext, and a createStandardPluginSet factory to prevent future drift.
Options Considered:
- Fix only userRole (minimal)
- Fix userRole + normalize order (medium)
- Full fix with SPA detection + preset factory (comprehensive)
💭 Reasoning
The root bug was sidepanel.js not passing authStatus.userRole to the iframe URL even though the service worker stores and returns it. This caused the panel to default to platform_user, stripping all generation tabs, capabilities, teach, prompts. Secondary issue: plugin order differed between surfaces (capabilities vs suggestions first), causing different quick action chips. Third issue: context updates from extension lacked contextType field, so panel couldn't update capabilities/suggestions dynamically. The preset factory ensures both surfaces always use identical plugin composition logic.
📁 Files Involved
apps/vitto-chrome-extension/sidepanel/sidepanel.jsapps/vitto-chrome-extension/content/inject.jsapps/gograb-ai/src/app/pages/vitto-chat-panel/vitto-chat-panel.component.tsapps/gograb-ai/src/app/pages/vitto-chat/vitto-chat-page.component.tslibs/libs-ai/vitto-chat/src/lib/types/chat.types.tslibs/libs-ai/vitto-chat/src/lib/plugins/plugin-presets.ts
🔗 Related
- Decision ID:
dev_1772560178316_srij9jl - Session: 168
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation