Skip to content

Support Customer.io messages inside local ComfyUI on Desktop - #1527

Draft
benceruleanlu wants to merge 6 commits into
mainfrom
bl/desktop-customerio-in-app
Draft

benceruleanlu wants to merge 6 commits into
mainfrom
bl/desktop-customerio-in-app

Conversation

@benceruleanlu

@benceruleanlu benceruleanlu commented Sep 16, 2026

Copy link
Copy Markdown
Member

Behavior

Customer.io messages can now appear inside the local ComfyUI page in Desktop. The main process enables the browser SDK only for a focused, visible local ComfyUI panel with telemetry consent and a confirmed Firebase identity. Signing out, changing accounts, hiding the panel, or revoking consent clears the messaging session and removes visible messages.

The integration uses the existing Cloud Customer.io source and Firebase UID, with desktop/local-workflow as the campaign page target. The SDK runs without Node access and uses its own in-memory browser storage. Native message links open externally while preserving the workflow. Launcher, onboarding, remote installs, and embedded Cloud are excluded from this Desktop integration.

The fixture returns stable delivery IDs across queue polls and waits through a second poll before dismissing. Lifecycle-view tests unmount their wrappers so the existing placeholder timer cannot outlive happy-dom's environment.

Validation

  • 70 focused unit tests passed: eligibility, frame validation, link handling, authentication consensus, asynchronous identity changes, preload, and installation attachment.
  • The real bundled SDK passed the isolated macOS Electron fixture: rendering, opened metrics, dismissal, account switching, session revocation, workflow interaction, and unchanged login storage. The fixture holds a persistent message view-log request open and proves revoked messaging releases workflow input before that request completes. All network responses were intercepted; no live campaign was used.
  • The lifecycle teardown regression passed with 21 tests, and the stable-polling Electron fixture passed with retries disabled.
  • Electron production bundle build passed.
  • Required pre-commit checks passed: all four typecheck targets, repository lint, and formatting.

Before release, validate a restricted live Customer.io campaign and packaged macOS/Windows behavior. Audit campaigns without page restrictions because those may also match Desktop. Runtime overrides and campaign targeting are documented in docs/customerio-messaging.md.

Change breakdown

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

Category Files Added Deleted Share of changed lines
Documentation 1 68 0 5.4%
Test code 6 525 2 42.2%
Build/configuration 5 50 1 4.1%
Lockfiles 1 170 0 13.6%
Product code 13 434 0 34.7%
Total 26 1247 3 100%

Documentation paths

  • docs/customerio-messaging.md

Test code paths

  • e2e/customerio.test.ts
  • src/main/lib/customerIoMessaging.test.ts
  • src/main/lib/firebaseAuthIdentity.test.ts
  • src/preload/comfyPreload.test.ts
  • src/renderer/src/customerIo/controller.test.ts
  • src/renderer/src/panel/ComfyLifecycleView.test.ts

Build/configuration paths

  • electron.vite.config.ts
  • package.json
  • scripts/customerio-script.ts
  • tsconfig.node.json
  • vitest.config.ts

Lockfiles paths

  • pnpm-lock.yaml

Product code paths

  • src/main/host/attach.ts
  • src/main/host/createHostWindow.ts
  • src/main/host/registry.ts
  • src/main/lib/customerIoEvents.ts
  • src/main/lib/customerIoMessaging.ts
  • src/main/lib/firebaseAuthIdentity.ts
  • src/main/lib/ipc/registerSettingsHandlers.ts
  • src/preload/comfyPreload.ts
  • src/preload/customerIoPreload.ts
  • src/preload/customerIoScript.d.ts
  • src/renderer/src/customerIo/controller.ts
  • src/renderer/src/customerIo/index.ts
  • src/shared/customerIo.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.

@socket-security

socket-security Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​customerio/​cdp-analytics-browser@​0.5.1193100859780
Addedcustomerio-gist-web@​3.26.010010010096100

View full report

@benceruleanlu
benceruleanlu added this pull request to stack #1529 September 16, 2026 03:05

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