Skip to content

Proposal: host the existing companion bridge in app-owned Electron Chromium #236

Description

@Haz4rdovisk

Problem

Chat On Steroids currently depends on a user-installed Chrome/Edge/Brave process/profile for ChatGPT orchestration. Even when app-created chats are intended to stay in the background, their lifetime and placement still belong to an external browser process, and cold-start/recovery can cross an OS browser/profile boundary.

This is a follow-up to #42, but with a different architecture. #42 proposed a separate CDP/managed-browser transport; this proposal deliberately does not add a second browser transport.

Proposed architecture

Keep the existing companion-extension/bridge protocol and host its ChatGPT documents inside Electron's own Chromium:

  • Use one persistent Electron Session for ChatGPT login/cookies/storage.
  • Load the same bundled MV3 companion extension into that session.
  • Represent every logical ChatGPT tab as a real WebContentsView.
  • Expose a small chrome.tabs-shaped compatibility host (query/get/create/update/remove/reload plus lifecycle events) to the existing extension background worker.
  • Preserve the existing request-id, sender.tab.id, sender.documentId, navigation-epoch and recovery semantics. No active/recent/visible-tab fallback is introduced.
  • Keep background tabs alive with real non-zero layout geometry, mounted but parked offscreen; dock visibility is independent from browser lifetime.
  • Keep window.open/OAuth child documents in the same persistent Electron session.
  • Prewarm one hidden ChatGPT document at app startup so the companion can pair before the user opens the dock.
  • Remove the external Chrome/Edge/Brave selector and OS browser-launch path for app-controlled ChatGPT work.

The visible UI is only a resizable dock with pill-style logical tabs. Hiding it must never destroy, suspend or detach the live ChatGPT documents.

Compatibility intent

The goal is to change the browser host while preserving the existing orchestration contract. Workers, Goal/Loop, plugin refresh, recovery, model selection, Compact & Resume and session attribution should continue to use the same bridge semantics they use today.

A working implementation and deterministic regression coverage are prepared on a fork; the PR will document the host/lifecycle details and validation matrix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions