Skip to content

Support encoded launcher paths and verify native messaging handoff - #1536

Draft
benceruleanlu wants to merge 4 commits into
bl/desktop-lifecycle-test-teardownfrom
bl/desktop-messaging-native-handoff
Draft

benceruleanlu wants to merge 4 commits into
bl/desktop-lifecycle-test-teardownfrom
bl/desktop-messaging-native-handoff

Conversation

@benceruleanlu

@benceruleanlu benceruleanlu commented Sep 16, 2026

Copy link
Copy Markdown
Member

Behavior

Compare the bundled launcher document by decoded filesystem path, after matching protocol and origin. Electron's loadFile leaves ~ literal while Node's pathToFileURL encodes it as %7E; Windows short paths such as RUNNER~1 previously failed eligibility and never requested launcher identity. Other files and protocols remain rejected, and configured HTTP development URLs retain exact origin/path matching.

Add a hermetic native Electron fixture using the production coordinator, document IPC and body-mode calculation, real WebContentsViews, shipped preloads/SDK, and production launcher CSP. Only external authentication/settings state is replaced. All HTTP(S) requests are intercepted and profiles are disposable. The fixture includes ~ in its path on every platform, explicitly establishes application/window focus after navigation, and reports readiness state when a test fails.

Documentation adds the native-host verification command and its coverage boundaries.

Validation

20 focused messaging tests pass, covering equivalent file encoding, rejected files/protocols/encoded separators, exact development URLs, eligibility, native links and identity races. The previous URL guard fails the equivalent-encoding regression and a native tilde-path reproduction. A separate mutation removing the coordinator's generation guard fails at the stale launcher identity assertion.

Both native cases passed three consecutive runs on macOS (6 tests, 10.2 seconds) with retries disabled, including fresh Electron startup between cases. The standalone local-ComfyUI and launcher SDK fixtures also passed. Native cases cover verified Firebase identity, revoking the previous surface before granting the next, one active grant, consent revocation, restored workflow input, and out-of-order identities after view/auth/consent changes. Synchronization uses deferred promises, DOM mutations, transition and focus events, without quiet-period sleeps.

Required pre-commit typechecks, lint, and formatting pass. At head 9fe0f8b2, full CI passed: 4,789 unit tests, 41 integration tests, and E2E on macOS (81), Linux (75), and Windows (80). All four messaging cases passed on their first attempt on every platform. Packaged/live campaign delivery remains release verification.

Change breakdown

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

Category Files Added Deleted Share of changed lines
Documentation 1 10 2 2.1%
Test code 4 540 0 95.7%
Product code 1 10 2 2.1%
Total 6 560 4 100%

Documentation paths

  • docs/customerio-messaging.md

Test code paths

  • e2e/customerio-host.test.ts
  • e2e/support/customerIoHostDependencies.ts
  • e2e/support/customerIoHostMain.ts
  • src/main/lib/customerIoMessaging.test.ts

Product code paths

  • src/main/lib/customerIoMessaging.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:48
@benceruleanlu benceruleanlu changed the title Verify Customer.io handoff across native Desktop views Support encoded launcher paths and verify native messaging handoff Sep 16, 2026

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