You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Medium Risk
New public flag-evaluation API affects UI behavior, listener lifecycle, and impression timing; risk is mitigated by broad tests but worth reviewing readiness and duplicate-eval edge cases on identify.
Overview
Adds reactive Vue composables for LaunchDarkly flag evaluation, replacing the previous scaffold TODO on the public composables barrel.
Value composables (useBoolVariation, useStringVariation, useNumberVariation, useJsonVariation) and matching detail composables share useVariationCore, which returns a readonly ref, skips client evaluation until isReady(), re-evaluates on change:<key>, context/identify, and initialization state, supports reactive flag keys (ref/getter), and tears down change listeners on unmount.
Detail variants surface LDEvaluationDetailTyped and synthesize a CLIENT_NOT_READY reason before the client is ready without calling the SDK.
Exports are wired through composables/index.ts. Tests cover provider/plugin integration, single-evaluation-on-mount (impressions), readiness/failure paths, and reactive key re-subscription; makeMockClient is adjusted for handler tracking and init-status ready behavior. plugin.test.ts adds a useBoolVariation smoke test under LDVuePlugin.
Reviewed by Cursor Bugbot for commit d469468. Bugbot is set up for automated code reviews on this repo. Configure here.
@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26365 bytes
Compressed size limit: 29000
Uncompressed size: 129044 bytes
@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 38739 bytes
Compressed size limit: 39000
Uncompressed size: 212244 bytes
@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179579 bytes
Compressed size limit: 200000
Uncompressed size: 831422 bytes
@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 31978 bytes
Compressed size limit: 34000
Uncompressed size: 114243 bytes
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 1 additional finding.
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
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.
Note
Medium Risk
New public flag-evaluation API affects UI behavior, listener lifecycle, and impression timing; risk is mitigated by broad tests but worth reviewing readiness and duplicate-eval edge cases on identify.
Overview
Adds reactive Vue composables for LaunchDarkly flag evaluation, replacing the previous scaffold TODO on the public composables barrel.
Value composables (
useBoolVariation,useStringVariation,useNumberVariation,useJsonVariation) and matching detail composables shareuseVariationCore, which returns a readonly ref, skips client evaluation untilisReady(), re-evaluates onchange:<key>, context/identify, and initialization state, supports reactive flag keys (ref/getter), and tears downchangelisteners on unmount.Detail variants surface
LDEvaluationDetailTypedand synthesize aCLIENT_NOT_READYreason before the client is ready without calling the SDK.Exports are wired through
composables/index.ts. Tests cover provider/plugin integration, single-evaluation-on-mount (impressions), readiness/failure paths, and reactive key re-subscription;makeMockClientis adjusted for handler tracking and init-statusreadybehavior.plugin.test.tsadds auseBoolVariationsmoke test underLDVuePlugin.Reviewed by Cursor Bugbot for commit d469468. Bugbot is set up for automated code reviews on this repo. Configure here.