Skip to content

Keep Customer.io SDK lifecycle serialized through timeouts - #1534

Draft
benceruleanlu wants to merge 1 commit into
bl/desktop-launcher-messagingfrom
bl/desktop-messaging-sdk-lifecycle
Draft

benceruleanlu wants to merge 1 commit into
bl/desktop-launcher-messagingfrom
bl/desktop-messaging-sdk-lifecycle

Conversation

@benceruleanlu

Copy link
Copy Markdown
Member

Behavior

Keep one owner of Customer.io SDK operations when a network call exceeds the UI's wait limit. Expired operations revoke display immediately and retain ownership until they settle; a later account cannot overtake an unfinished identify/reset. A late successful operation reconciles the latest eligible session from a reset.

Fetch source settings before SDK construction so a network failure can retry safely. After construction, retain the single initialization promise, await actual SDK readiness, and quarantine a partial initialization failure until document reload. In-app identity and route hooks check current eligibility, and route changes now participate in the serialized lifecycle.

Validation

16 focused controller/adapter tests passed, including delayed loading, identify/reset timeouts, stale sessions, offline retry, and overlapping dismissals. The regressions fail on the previous controller. Both real-SDK Electron fixtures passed for local ComfyUI and launcher under production CSP, including display, dismissal, account changes, and immediate input restoration on revocation. Required pre-commit typechecks, lint, and formatting passed.

Change breakdown

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

Category Files Added Deleted Share of changed lines
Test code 2 263 2 44.4%
Product code 3 212 120 55.6%
Total 5 475 122 100%

Test code paths

  • src/renderer/src/customerIo/adapter.test.ts
  • src/renderer/src/customerIo/controller.test.ts

Product code paths

  • src/renderer/src/customerIo/adapter.ts
  • src/renderer/src/customerIo/controller.ts
  • src/renderer/src/customerIo/index.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:37
@benceruleanlu
benceruleanlu force-pushed the bl/desktop-messaging-sdk-lifecycle branch from 8ba0574 to 43b6ba5 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