Handoff: Session 104.2 — Chrome Extension Two-Embeddable Architecture

Complete test plan for the Chrome extension dual-panel portal, Agent Observatory, bridge adapter, and production fixes

Handoff: Session 104.2 — Chrome Extension Two-Embeddable Architecture

Author: Coding Agent (Claude Code / editor2) Date: 2026-02-10 Session: 104.2 For: Testing Director (Cowork / gspace1) Scope: 6-phase implementation — production fix, centralized config, bridge adapter, Agent Observatory, embed wrappers, dual-panel extension portal


What Changed (Executive Summary)

Session 104.2 delivered a 6-phase overhaul of the Chrome extension and two new embeddable components:

Phase What Key Files
A Fixed isDev detection (was always true in prod), switched to allowlist, created prod manifest content/inject.js, manifest.prod.json, scripts/build-prod.sh
B Centralized all extension URLs into shared/env-config.js (single source of truth) shared/env-config.js, background/service-worker.js
C Created vanilla JS bridge adapter matching embeddable-bridge protocol (rate limiting, heartbeat, origin validation) shared/bridge-adapter.js, content/inject.js, sidepanel/sidepanel.js
D Agent Observatory — real-time window into AI agent activity (SSE + WebSocket unified view) agent-observatory/ (3 files), observatory-page/ (3 files), app.routes.ts
E Universal embed wrappers: <gograb-ai-panel> and <gograb-observatory> for any Angular app gograb-ai-panel.component.ts, gograb-observatory.component.ts, index.ts
F Dual-panel Chrome extension portal — tab switching (sidepanel) + mode toggle (floating panel) + cross-panel orchestration sidepanel.html, sidepanel.js, inject.js, panel.css, service-worker.js

Test Environment Requirements

Services That Must Be Running

Service Port Health Check Required For
gograb-space 6200 http://localhost:6200 Extension context (host app detection)
gograb-ai 6400 http://localhost:6400 Observatory + Studio iframe content
backend-api 3000 curl http://localhost:3000/api/health Auth sync, general API
backend-ai-api 3001 curl http://localhost:3001/ai-api/health SSE events, orchestration
backend-vitto-api 3003 curl http://localhost:3003/health Vitto SSE for Observatory

Extension Setup

  1. Go to chrome://extensions
  2. Enable Developer Mode
  3. Load unpacked → select apps/gograb-ai-extension/
  4. Open the extension side panel (click extension icon → "Open Side Panel")

Pre-Test: Verify Auth


Test Plan

Section 1: Phase A — Production Fix Verification

Goal: Confirm isDev is correctly detected and the extension works on both localhost and production domains.

Test 1.1: isDev on localhost

Test 1.2: isDev on production domains (if accessible)

Test 1.3: Allowlist enforcement

Test 1.4: Production manifest


Section 2: Phase B — Centralized Configuration

Test 2.1: ExtensionEnv availability

Test 2.2: Service worker env caching


Section 3: Phase C — Bridge Adapter

Goal: Confirm the new ExtensionBridgeAdapter replaces raw postMessage and speaks the full BridgeMessage protocol.

Test 3.1: Bridge initialization (floating panel)

Test 3.2: Bridge initialization (side panel)

Test 3.3: Message format verification

Test 3.4: Heartbeat

Test 3.5: Rate limiting


Section 4: Phase D — Agent Observatory

Goal: Verify the new /observatory route loads and displays real-time agent activity.

Test 4.1: Observatory route (standalone)

Test 4.2: Observatory route (embedded compact)

Test 4.3: Observatory route (with auth)

Test 4.4: VittoMonitorService SSE connection

Test 4.5: OrchestrationClientService WebSocket

Test 4.6: Observatory with active task


Section 5: Phase E — Universal Embed Wrappers

Goal: Verify the <gograb-ai-panel> and <gograb-observatory> components work when dropped into any Angular app.

Test 5.1: Component exports

Test 5.2: Panel component URL construction

Test 5.3: Observatory component URL construction


Section 6: Phase F — Dual-Panel Chrome Extension Portal

Goal: Verify the extension side panel has Studio/Observatory tabs and the floating panel has a mode toggle.

Test 6.1: Side panel tab bar

Test 6.2: Side panel tab switching — Studio → Observatory

Test 6.3: Side panel tab switching — Observatory → Studio

Test 6.4: Side panel tab persistence

Test 6.5: Floating panel mode toggle button

Test 6.6: Floating panel mode toggle — Studio → Observatory

Test 6.7: Floating panel mode toggle — Observatory → Studio

Test 6.8: Floating panel mode persistence

Test 6.9: Cross-panel orchestration routing

Test 6.10: Panel header doesn't overlap iframe content


Section 7: Cross-Cutting Concerns

Test 7.1: Auth flow end-to-end

Test 7.2: Context forwarding

Test 7.3: Bridge adapter in both contexts

Test 7.4: Error resilience


Files Changed (Complete Reference)

Chrome Extension (apps/gograb-ai-extension/)

File Phase Change Type
content/inject.js A, C, D, F Edit: isDev fix, allowlist, bridge adapter, mode toggle, panel header
manifest.prod.json A NEW: Production manifest without localhost
scripts/build-prod.sh A NEW: Store build script
shared/env-config.js B NEW: Centralized URL config (ExtensionEnv)
shared/bridge-adapter.js C NEW: Vanilla JS bridge adapter (BridgeMessage protocol)
background/service-worker.js B, F Edit: env-config, AI_ORCHESTRATE_REQUEST handler
sidepanel/sidepanel.html C, F Edit: script tags, tab bar HTML + CSS
sidepanel/sidepanel.js C, F Edit: bridge adapter, tab switching, buildFrameUrl, switchTab, loadTabContent
styles/panel.css F Edit: panel header, mode toggle button, iframe offset
manifest.json C Edit: Added bridge-adapter.js to content_scripts

Angular Libraries

File Phase Change Type
libs/libs-ai/gograb-ai-lib/.../agent-observatory/agent-observatory.component.ts D NEW: Unified observatory component (SSE + WS)
libs/libs-ai/gograb-ai-lib/.../agent-observatory/agent-observatory.component.html D NEW: Compact + full mode templates
libs/libs-ai/gograb-ai-lib/.../agent-observatory/agent-observatory.component.scss D NEW: Dark theme, dual-mode styles
libs/libs-ai/gograb-ai-lib/.../components/index.ts D Edit: Export AgentObservatoryComponent
libs/libs-ux/embeddable-bridge/.../gograb-ai-panel.component.ts E NEW: Universal AI panel embed wrapper
libs/libs-ux/embeddable-bridge/.../gograb-observatory.component.ts E NEW: Universal observatory embed wrapper
libs/libs-ux/embeddable-bridge/src/index.ts E Edit: Export new components

Angular Apps

File Phase Change Type
apps/gograb-ai/src/app/pages/observatory/observatory-page.component.ts D NEW: Embeddable page wrapper
apps/gograb-ai/src/app/pages/observatory/observatory-page.component.html D NEW: Template
apps/gograb-ai/src/app/pages/observatory/observatory-page.component.scss D NEW: Styles
apps/gograb-ai/src/app/app.routes.ts D Edit: Added /observatory route

Build Verification

Before testing, confirm the builds succeed:

# Extension: vanilla JS — just reload in chrome://extensions after changes
# Click the refresh icon on the extension card

# Angular builds (only needed if testing Observatory route):
npx nx build libs-ux-embeddable-bridge
npx nx build gograb-ai --configuration=development

# Or just ensure the dev server is running:
# gograb-ai on port 6400 (gspace1 testing port)

Known Limitations

  1. Observatory requires Vitto API (port 3003) — If not running, the SSE connection won't establish. The component should show "disconnected" gracefully, not crash.

  2. OrchestrationClientService is a singleton — It auto-connects to /command-center WebSocket. The Observatory doesn't control its lifecycle. If the WebSocket is already connected from another component, the Observatory reuses it.

  3. Floating panel mode toggle is NOT a split view — The floating panel shows either Studio OR Observatory, never both simultaneously. Only the side panel can show them via tab switching (also one at a time).

  4. Cross-panel orchestration depends on MCP connector being initialized in the service worker. If globalThis.mcpConnector is null, the orchestration request returns an error.

  5. Embed wrappers (<gograb-ai-panel>, <gograb-observatory>) use FRONTEND_PORTS.gograbAi which defaults to port 5400 (editor2). For gspace1 testing, the actual port might differ — the components detect localhost and use the appropriate port from @libs-foundational/api-config.


Verification Checklist (Quick Pass)

Use this for a rapid smoke test. Detailed tests are in the sections above.


Report Template

When done testing, please create E2E-TEST-REPORT-SESSION-104.md in this folder using this structure:

---
title: "E2E Test Report - Session 104.2 - Chrome Extension Two-Embeddable Architecture"
session: 104
status: ✅ Complete / ⚠️ Issues Found
---

# E2E Test Report — Session 104.2

| # | Test | Result | Notes |
|---|------|--------|-------|
| 1 | isDev on localhost | ✅/❌ | ... |
| 2 | Side panel tab switching | ✅/❌ | ... |
| ... | ... | ... | ... |

## Issues Found
[Describe any issues with screenshots]

## Handoffs for Coding Agent
[If fixes needed, create specific handoffs]