Skip to content

Coordinate Customer.io messaging across Desktop window surfaces - #1532

Draft
benceruleanlu wants to merge 1 commit into
bl/desktop-messaging-environmentfrom
bl/desktop-messaging-surfaces
Draft

benceruleanlu wants to merge 1 commit into
bl/desktop-messaging-environmentfrom
bl/desktop-messaging-surfaces

Conversation

@benceruleanlu

Copy link
Copy Markdown
Member

Behavior

Move Customer.io ownership from an installation attachment to the host window. The coordinator grants messaging to the visible local ComfyUI document or the launcher panel, revoking the previous surface first. It follows lazy panel creation/destruction and ComfyUI view replacement, validates the exact launcher document URL, and retires listeners at window close.

Launcher identity comes from the authenticated Cloud API's optional Firebase provenance field; canonical IDs are never substituted. Consent, onboarding/progress takeovers, visibility, credential changes, navigation, and stale asynchronous lookups gate delivery. The first-use mode broadcast now reaches the matching host even when it is not the first window in the registry. Embedded Cloud retains its existing messaging integration.

This layer supplies the main-process policy; the next layer connects the launcher preload and CSP.

Validation

14 messaging tests passed, covering document handshakes, legacy grants, stale lookup rejection, credential changes, consent, handoff ordering, view replacement and external navigation. Another 103 focused host/auth tests passed (attachment, panel lifecycle, close helpers, detach and Firebase consensus). Required pre-commit typechecks, lint and formatting passed. Renderer and packaged/live campaign verification follow in later layers.

Change breakdown

Changed lines = additions + deletions. No merge-only changes.

Category Files Added Deleted Share of changed lines
Product code 7 248 97 65.1%
Test code 1 181 4 34.9%
Total 8 429 101 100%

Product code paths

  • src/main/host/attach.ts
  • src/main/host/createHostWindow.ts
  • src/main/host/panelView.ts
  • src/main/index.ts
  • src/main/lib/customerIoDocument.ts
  • src/main/lib/customerIoMessaging.ts
  • src/main/lib/ipc/registerSettingsHandlers.ts

Test code paths

  • src/main/lib/customerIoMessaging.test.ts

No generated or vendored files changed.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

@benceruleanlu
benceruleanlu added this pull request to stack #1529 September 16, 2026 03:25
@benceruleanlu
benceruleanlu force-pushed the bl/desktop-messaging-surfaces branch from e002d57 to 4f20255 Compare September 16, 2026 03:47

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant