Skip to content

chore: aligning vue composables to trigger eval events - #1804

Open
joker23 wants to merge 1 commit into
mainfrom
skz/SDK-2675/migrate-vue-sdk-variation-core-context-fix
Open

chore: aligning vue composables to trigger eval events#1804
joker23 wants to merge 1 commit into
mainfrom
skz/SDK-2675/migrate-vue-sdk-variation-core-context-fix

Conversation

@joker23

@joker23 joker23 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Note

Medium Risk
Changes when flag variation runs (init, identify, analytics impressions), including a deliberate double-eval edge case; scope is limited to the Vue SDK composable layer.

Overview
useVariationCore no longer batches re-evaluation through a Vue watch on provider context, initializedState, and a flagChanged counter. It now wires change:<key> and client.onContextChange directly to the same update handler, and only watches the flag key to swap listeners.

That aligns readiness and identify() updates with the client’s context notifications (including failed start() via a single context callback, avoiding a separate init-status path). When one identify() updates both context and the watched flag, two evaluations are possible and tests document that as accepted React-parity behavior.

Tests and makeMockClient add contextSubscriberCount and expand coverage for subscribe/unsubscribe, init complete/fail, and single- vs dual-trigger eval counts.

Reviewed by Cursor Bugbot for commit b3b744d. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26360 bytes
Compressed size limit: 29000
Uncompressed size: 129188 bytes

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 32077 bytes
Compressed size limit: 34000
Uncompressed size: 114525 bytes

@joker23

joker23 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

cursor[bot]

This comment was marked as resolved.

@joker23
joker23 marked this pull request as ready for review July 14, 2026 22:33
@joker23
joker23 requested a review from a team as a code owner July 14, 2026 22:33
devin-ai-integration[bot]

This comment was marked as resolved.

@joker23
joker23 force-pushed the skz/SDK-2675/migrate-vue-sdk-variation-core-context-fix branch from 1f6a8b1 to 5856f64 Compare July 23, 2026 17:55
@joker23
joker23 force-pushed the skz/SDK-2675/migrate-vue-sdk-variation-core-context-fix branch from 5856f64 to b3b744d Compare August 5, 2026 17:57
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.

1 participant