fix: support custom namespace prefix for electron IPC#1253
Conversation
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk-common size report |
4c9b14f to
5809629
Compare
|
@cursor review |
5809629 to
cc53988
Compare
|
@cursor review |
cc53988 to
9ce11d7
Compare
|
@cursor review |
|
@cursor review |
d81b6d3 to
846d62c
Compare
|
@cursor review |
846d62c to
3459aff
Compare
|
@cursor review |
3459aff to
909cbf5
Compare
There was a problem hiding this comment.
✅ 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.
6a561de to
c211d00
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ 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.
c211d00 to
451f17d
Compare
|
This is the wrong implementation |
b9ee2b6 to
029d5aa
Compare
029d5aa to
793a40c
Compare
This PR will implement support for running multiple LDClients with the same mobile key. We do this by adding an optional
namespaceoption 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
namespaceoption 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
ElectronClientnow derives an IPC namespace via newderiveNamespace()and registers all IPC handlers under that derived value; renderer-sideElectronRendererClient/createRendererClientaccept 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.tsplus sharedcreateMockLogger) 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.