feat: support waitForNetworkResults in FDv2 data manager#1280
feat: support waitForNetworkResults in FDv2 data manager#1280kinyoklion wants to merge 1 commit intomainfrom
Conversation
The FDv2 data manager now respects the waitForNetworkResults identify option. When false (the default for mobile), identify resolves as soon as cached data is delivered rather than waiting for network.
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/js-client-sdk-common size report |
|
bugbot 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 a2244e6. Configure here.
The FDv2 data manager now respects the waitForNetworkResults identify option. When false (the default for mobile), identify resolves as soon as cached data is delivered rather than waiting for network.
Requirements
Related issues
Provide links to any issues in this repository or elsewhere relating to this pull request.
Describe the solution you've provided
Provide a clear and concise description of what you expect to happen.
Describe alternatives you've considered
Provide a clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context about the pull request here.
Note
Medium Risk
Changes when the
identifypromise resolves (cached-first vs network-fresh), which can alter initialization timing and app control flow across platforms.Overview
FDv2DataManagerBasenow respectsLDIdentifyOptions.waitForNetworkResultsby tracking aminimumDataAvailabilitythreshold foridentifycompletion.When configured to not wait for network results,
identifycan resolve as soon as any initial data (e.g. cache) is delivered viadataCallback, while the data source continues initializing and applying subsequent updates as they arrive.Reviewed by Cursor Bugbot for commit a2244e6. Bugbot is set up for automated code reviews on this repo. Configure here.