Skip to content

Conversation

@joker23
Copy link
Contributor

@joker23 joker23 commented Nov 3, 2025

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

Provide links to any issues in this repository or elsewhere relating to this pull request.

Describe the solution you've provided

Provide a clear and concise description of what you expect to happen.

Describe alternatives you've considered

Provide a clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context about the pull request here.


Note

Handle streaming by parsing data in onprogress and using onreadystatechange only for state transitions, improving SSE behavior on Vega OS.

  • React Native SSE (EventSource.ts):
    • Add XMLHttpRequest.onprogress to parse streaming data during LOADING via _handleEvent and emit errors for non-2xx/3xx statuses.
    • Update onreadystatechange to ignore LOADING, handle connection open, DONE reconnection, and error/retry flow.
    • Enhance debug logging and inline docs to clarify separation of data vs. state handling (Vega OS compatibility).

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

@joker23 joker23 requested a review from a team as a code owner November 3, 2025 17:50
@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

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

if (this._status === this.CLOSED) {
// Do not handle this state if the status is loading as we will delegate this to the onprogress listener.
if (this._status === this.CLOSED || this._xhr.readyState === XMLHttpRequest.LOADING) {
return;
Copy link
Member

Choose a reason for hiding this comment

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

Is there anything in the code that follows that should be cleaned up?
Is there any potential for overlapping situations where the responseText could be appended during another state?

Copy link
Contributor Author

@joker23 joker23 Nov 3, 2025

Choose a reason for hiding this comment

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

Per https://xhr.spec.whatwg.org/ it looks like progress event will fire on events that have data which I think means that only https://github.com/launchdarkly/js-core/pull/974/files#diff-1eb9eb87df77c7a5d195bc4e8d8d0a5d5c896fb4b4edf90b69d4e3b4ca5c9198R194 could be cleaned up. I left this in there in case we do run into the situation that data is sent on a status update which shouldn't happen so should pass through in all cases.

@joker23 joker23 merged commit 7b6ac03 into main Nov 3, 2025
36 checks passed
@joker23 joker23 deleted the szhang/sdk-1509/vegaos-support branch November 3, 2025 19:39
@github-actions github-actions bot mentioned this pull request Nov 3, 2025
joker23 pushed a commit that referenced this pull request Nov 3, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>jest: 0.1.12</summary>

##
[0.1.12](jest-v0.1.11...jest-v0.1.12)
(2025-11-03)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/react-native-client-sdk bumped from ~10.11.0 to ~10.12.0
</details>

<details><summary>react-native-client-sdk: 10.12.0</summary>

##
[10.12.0](react-native-client-sdk-v10.11.0...react-native-client-sdk-v10.12.0)
(2025-11-03)


### Features

* add support for steaming in Vega OS
([#974](#974))
([7b6ac03](7b6ac03))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Release React Native SDK 10.12.0 (adds Vega OS streaming) and update
Jest tooling to 0.1.12 with dependency bump; update manifest and package
versions.
> 
> - **SDKs**
> - **React Native** (`packages/sdk/react-native`): bump to `10.12.0`;
changelog adds feature for Vega OS streaming; update `package.json`
version.
> - **Tooling**
> - **Jest** (`packages/tooling/jest`): bump to `0.1.12`; update
dependency `@launchdarkly/react-native-client-sdk` to `~10.12.0`;
changelog updated.
> - **Release metadata**
> - Update versions in `.release-please-manifest.json` for
`packages/sdk/react-native` and `packages/tooling/jest`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
df0d550. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

3 participants