Skip to content

Conversation

@joker23
Copy link
Contributor

@joker23 joker23 commented Jan 27, 2026

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

sdk-1708

Describe the solution you've provided

  • added a new hidden property to BrowserIdentifyOptions to store parsed bootstrap data
  • IF that bootstrap data is already parsed, then we will used that instead of reprocessing
  • This PR should only affect the initialization flow where we preload the bootstrap data (processing it) so it could be used before client is initialized

Note

Prevents duplicate parsing of bootstrap data during initialization and ensures parsed flags are reused across start() and identify().

  • Adds hidden bootstrapParsed to BrowserIdentifyOptions; BrowserClient.start() parses once, presets flags, and passes parsed data to BrowserDataManager
  • BrowserDataManager consumes bootstrapParsed when available (falls back to parsing), and now updates status using DataSourceState.Initializing
  • Tests added: verifies bootstrap parsed exactly once and that subsequent identify() with new bootstrap data replaces flag values

Written by Cursor Bugbot for commit 4b9b3c3. This will update automatically on new commits. Configure here.

@joker23 joker23 requested a review from a team as a code owner January 27, 2026 18:48
@github-actions
Copy link
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25394 bytes
Compressed size limit: 26000
Uncompressed size: 124693 bytes

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

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

) {
try {
this.dataSourceStatusManager.requestStateUpdate('INITIALIZING');
this.dataSourceStatusManager.requestStateUpdate(DataSourceState.Initializing);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sneaking this in if reviewers don't mind... End value is the same, but looks better this way imo

@joker23 joker23 force-pushed the skz/sdk-1708/browser-bootstrap-parsing branch from 30fc40e to f34277e Compare January 27, 2026 18:57
@joker23 joker23 force-pushed the skz/sdk-1708/browser-bootstrap-parsing branch from f34277e to 4b9b3c3 Compare January 27, 2026 19:01
@github-actions
Copy link
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 23331 bytes
Compressed size limit: 25000
Uncompressed size: 81050 bytes

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