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:

  1. Fix only userRole (minimal)
  2. Fix userRole + normalize order (medium)
  3. 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


🔗 Related


Auto-generated by MCP Smart Consolidation