Skip to content

test: Make the Vue and React Native contract test WebSocket extend the shared base - #2141

Merged
joker23 merged 3 commits into
mainfrom
skz/SDK-3426/vue-rn-ws-conform
Nov 3, 2026
Merged

joker23 merged 3 commits into
mainfrom
skz/SDK-3426/vue-rn-ws-conform

Conversation

@joker23

@joker23 joker23 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Makes the Vue and React Native contract-test WebSockets thin subclasses of the shared base. This removes their duplicated dispatch loops.
  • Adds optional capabilities and onConnectionChange options to the shared base. Defaults keep the browser and React behavior unchanged.
  • The base now stops reconnecting after disconnect(). React Native already did this. The browser and React entities gain it.

Note

Overview
Vue and React Native contract-test harness WebSockets no longer implement their own connect/reconnect and command dispatch loops. They extend the shared TestHarnessWebSocket base and only supply SDK-specific client lifecycle hooks (createClient, getCommandHandler, deleteClient) plus a per-SDK CAPABILITIES list passed into the base constructor.

The shared base gains an optional onConnectionChange callback (used by React Native) and error logging when client creation or commands fail. Reconnect behavior after disconnect() is centralized on the base (guarded by _intentionalClose), matching what React Native already did locally. TestHarnessWebSocketOptions is exported from the contract-test-utils client entry.

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

@joker23
joker23 added this pull request to stack #2138 October 30, 2026 21:16
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 34474 bytes
Compressed size limit: 35000
Uncompressed size: 122974 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 32220 bytes
Compressed size limit: 32500
Uncompressed size: 152548 bytes

@github-actions

github-actions Bot commented Oct 30, 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: 26066 bytes
Compressed size limit: 44000
Uncompressed size: 168326 bytes

@joker23
joker23 force-pushed the skz/SDK-3426/vue-rn-ws-conform branch 2 times, most recently from 13f0e39 to 7247f61 Compare October 30, 2026 22:24
@joker23
joker23 force-pushed the skz/SDK-3426/vue-rn-ws-conform branch 2 times, most recently from 0d093cc to 6739dae Compare November 2, 2026 14:40
Base automatically changed from skz/SDK-2046/react-ws-conform to main November 2, 2026 15:10
@joker23
joker23 force-pushed the skz/SDK-3426/vue-rn-ws-conform branch from 6739dae to 30ff88a Compare November 2, 2026 15:10
@joker23
joker23 force-pushed the skz/SDK-3426/vue-rn-ws-conform branch from 30ff88a to 8f673e3 Compare November 2, 2026 15:15
@joker23 joker23 changed the title feat: Make the Vue and React Native contract test WebSocket extend the shared base test: Make the Vue and React Native contract test WebSocket extend the shared base Nov 2, 2026
@joker23
joker23 marked this pull request as ready for review November 2, 2026 16:01
@joker23
joker23 requested a review from a team as a code owner November 2, 2026 16:01

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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 bugs or issues to report.

Devin Review

@joker23
joker23 merged commit c4e8f8b into main Nov 3, 2026
68 of 70 checks passed
@joker23
joker23 deleted the skz/SDK-3426/vue-rn-ws-conform branch November 3, 2026 15:35
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