Skip to content

chore: Make the React contract test WebSocket extend the shared base - #2137

Open
joker23 wants to merge 1 commit into
skz/SDK-2010/contract-test-ws-basefrom
skz/SDK-2046/react-ws-conform
Open

joker23 wants to merge 1 commit into
skz/SDK-2010/contract-test-ws-basefrom
skz/SDK-2046/react-ws-conform

Conversation

@joker23

@joker23 joker23 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Makes the React contract-test WebSocket a thin subclass of the shared base. This removes the duplicated dispatch loop.

Devin Review


Note

Overview
Refactors the React contract-test harness so TestHarnessWebSocket subclasses the shared BaseTestHarnessWebSocket from @launchdarkly/js-contract-test-utils/client, matching the browser contract-test pattern.

The local WebSocket connect/reconnect loop, getCapabilities response, and command dispatch for createClient, runCommand, and deleteClient are removed from the React app. Those behaviors now live in the base class; React only wires three hooks—createClient, getCommandHandler, and deleteClient—to the existing callbacks and command-handler map.

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

@joker23
joker23 added this pull request to stack #2138 October 29, 2026 19:18
@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 34386 bytes
Compressed size limit: 35000
Uncompressed size: 122562 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

Copy link
Copy Markdown
Contributor

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

@joker23
joker23 marked this pull request as ready for review October 29, 2026 21:15
@joker23
joker23 requested a review from a team as a code owner October 29, 2026 21:15

@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: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

This branch has not been deployed

No deployments
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