Repository navigation
Conversation
setConnectionMode only reached the debounce through setRequestedMode, which ignores an unchanged mode. An override that matched the foreground mode after a network-driven offline never applied, and a cleared override had the same gap. setConnectionMode now requests a reconcile when the override changes and returns early when it does not, so repeated calls cannot hold back pending mode changes.
Contributor
|
@launchdarkly/js-sdk-common size report |
Contributor
|
@launchdarkly/js-client-sdk-common size report |
Contributor
|
@launchdarkly/js-client-sdk size report |
joker23
added a commit
that referenced
this pull request
Nov 19, 2026
joker23
added a commit
that referenced
this pull request
Nov 20, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: Prevent repeated setConnectionMode calls from delaying FDv2 mode changes
Summary
In the FDv2 data manager,
setConnectionModereached the debounce only throughsetRequestedMode, which ignores a mode that did not change. After the network moved the data system offline, an override that matched the foreground mode was recorded but never applied, so the data system stayed offline. Clearing an override had the same gap.setConnectionModenow requests a reconcile through the newStateDebounceManager.requestReconcile()when the override changes. A repeated call with the same override returns early, so it cannot keep restarting the debounce window and hold back a pending network or lifecycle change. The override no longer goes through the requested mode, because mode resolution already reads the override first.This affects every SDK that uses the shared FDv2 data manager: browser, React Native, node-client and Electron.
Additional context
The Electron SDK stack (above #2027) has regression tests for this against the real data manager. They land with its FDv2 layer after this merges.