Skip to content

fix: support custom namespace prefix for electron IPC#1253

Merged
joker23 merged 3 commits into
mainfrom
skz/sdk-1907/electron-multi-env
Apr 16, 2026
Merged

fix: support custom namespace prefix for electron IPC#1253
joker23 merged 3 commits into
mainfrom
skz/sdk-1907/electron-multi-env

Conversation

@joker23

@joker23 joker23 commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

This PR will implement support for running multiple LDClients with the same mobile key. We do this by adding an optional namespace option that will prefix IPC namespace to guard against any collisions when running 2 clients at once.


Note

Medium Risk
Changes how IPC channel names are derived for the Electron SDK and updates renderer/main wiring; misconfiguration or mismatched namespaces could break renderer↔main communication for existing multi-client setups.

Overview
Adds an optional namespace option to the Electron SDK to isolate IPC channel names so multiple clients can run in the same process even when sharing the same credential.

Main-process ElectronClient now derives an IPC namespace via new deriveNamespace() and registers all IPC handlers under that derived value; renderer-side ElectronRendererClient/createRendererClient accept the same optional namespace to connect to the matching channels.

Updates option validation and migration docs, and refactors/adds tests (including a new ElectronIPC.test.ts plus shared createMockLogger) to cover namespace derivation and the updated IPC wiring.

Reviewed by Cursor Bugbot for commit 793a40c. Bugbot is set up for automated code reviews on this repo. Configure here.


Open with Devin

@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25623 bytes
Compressed size limit: 29000
Uncompressed size: 125843 bytes

@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 31681 bytes
Compressed size limit: 34000
Uncompressed size: 112864 bytes

@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179425 bytes
Compressed size limit: 200000
Uncompressed size: 830054 bytes

@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 37184 bytes
Compressed size limit: 38000
Uncompressed size: 204411 bytes

@joker23 joker23 force-pushed the skz/sdk-1907/electron-multi-env branch 3 times, most recently from 4c9b14f to 5809629 Compare April 8, 2026 17:57
@joker23

joker23 commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

cursor[bot]

This comment was marked as resolved.

@joker23 joker23 force-pushed the skz/sdk-1907/electron-multi-env branch from 5809629 to cc53988 Compare April 8, 2026 19:28
Comment thread packages/sdk/electron/src/deriveNamespace.ts Outdated
@joker23

joker23 commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

cursor[bot]

This comment was marked as resolved.

@joker23 joker23 force-pushed the skz/sdk-1907/electron-multi-env branch from cc53988 to 9ce11d7 Compare April 8, 2026 20:06
@joker23

joker23 commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

cursor[bot]

This comment was marked as resolved.

@joker23

joker23 commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

cursor[bot]

This comment was marked as resolved.

@joker23 joker23 force-pushed the skz/sdk-1907/electron-multi-env branch from d81b6d3 to 846d62c Compare April 8, 2026 21:04
@joker23

joker23 commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

cursor[bot]

This comment was marked as resolved.

@joker23 joker23 force-pushed the skz/sdk-1907/electron-multi-env branch from 846d62c to 3459aff Compare April 8, 2026 21:14
@joker23

joker23 commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

@joker23 joker23 force-pushed the skz/sdk-1907/electron-multi-env branch from 3459aff to 909cbf5 Compare April 8, 2026 21:14

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 3459aff. Configure here.

@joker23 joker23 force-pushed the skz/sdk-1907/electron-multi-env branch from 6a561de to c211d00 Compare April 9, 2026 20:03
@joker23

joker23 commented Apr 9, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit c211d00. Configure here.

@joker23 joker23 marked this pull request as ready for review April 9, 2026 20:37
@joker23 joker23 requested a review from a team as a code owner April 9, 2026 20:37
@joker23 joker23 force-pushed the skz/sdk-1907/electron-multi-env branch from c211d00 to 451f17d Compare April 9, 2026 20:40

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional findings.

Open in Devin Review

@joker23

joker23 commented Apr 9, 2026

Copy link
Copy Markdown
Contributor Author

This is the wrong implementation

@joker23 joker23 closed this Apr 9, 2026
@joker23 joker23 reopened this Apr 9, 2026
@joker23 joker23 marked this pull request as draft April 9, 2026 22:00
@joker23 joker23 changed the title chore: support running multiple clients with same client id fix: support custom namespace prefix for electron IPC Apr 13, 2026
@joker23 joker23 force-pushed the skz/sdk-1907/electron-multi-env branch 6 times, most recently from b9ee2b6 to 029d5aa Compare April 14, 2026 19:54
@joker23 joker23 marked this pull request as ready for review April 14, 2026 19:58
@joker23 joker23 force-pushed the skz/sdk-1907/electron-multi-env branch from 029d5aa to 793a40c Compare April 15, 2026 17:09
@joker23 joker23 merged commit 5561e9d into main Apr 16, 2026
45 checks passed
@joker23 joker23 deleted the skz/sdk-1907/electron-multi-env branch April 16, 2026 22:00
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.

2 participants