Skip to content

feat: Add FDv2 State Debouncer#1148

Merged
kinyoklion merged 6 commits intomainfrom
rlamb/sdk-1924/state-debounce-manager
Mar 4, 2026
Merged

feat: Add FDv2 State Debouncer#1148
kinyoklion merged 6 commits intomainfrom
rlamb/sdk-1924/state-debounce-manager

Conversation

@kinyoklion
Copy link
Copy Markdown
Member

@kinyoklion kinyoklion commented Mar 3, 2026

Note

Low Risk
Purely additive code and tests; no existing behavior is modified, and the new manager is not referenced elsewhere yet.

Overview
Adds a new StateDebounceManager utility to the SDK client datasource layer to debounce/coalesce network availability, app lifecycle, and requested connection-mode changes into a single reconciliation callback after a configurable window (default 1000ms).

Includes comprehensive Jest coverage for timer reset/coalescing behavior, multi-dimension accumulation, custom debounce durations, and close() semantics (cancels pending work and makes setters no-ops).

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Once we merge some more PRs we can consolidate some of the unions.

@kinyoklion
Copy link
Copy Markdown
Member Author

bugbot review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@kinyoklion kinyoklion marked this pull request as ready for review March 3, 2026 23:53
@kinyoklion kinyoklion requested a review from a team as a code owner March 3, 2026 23:53
Comment thread packages/shared/sdk-client/src/datasource/StateDebounceManager.ts
Copy link
Copy Markdown
Contributor

@joker23 joker23 left a comment

Choose a reason for hiding this comment

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

just a a nit comment

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment thread packages/shared/sdk-client/src/datasource/StateDebounceManager.ts
@kinyoklion kinyoklion merged commit da3f72e into main Mar 4, 2026
40 of 41 checks passed
@kinyoklion kinyoklion deleted the rlamb/sdk-1924/state-debounce-manager branch March 4, 2026 20:35
@github-actions github-actions bot mentioned this pull request Mar 4, 2026
joker23 pushed a commit that referenced this pull request Mar 4, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>akamai-edgeworker-sdk-common: 2.0.16</summary>

##
[2.0.16](akamai-edgeworker-sdk-common-v2.0.15...akamai-edgeworker-sdk-common-v2.0.16)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from ^2.18.1 to ^2.18.2
</details>

<details><summary>akamai-server-base-sdk: 3.0.17</summary>

##
[3.0.17](akamai-server-base-sdk-v3.0.16...akamai-server-base-sdk-v3.0.17)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^2.0.15 to
^2.0.16
    * @launchdarkly/js-server-sdk-common bumped from ^2.18.1 to ^2.18.2
</details>

<details><summary>akamai-server-edgekv-sdk: 1.4.19</summary>

##
[1.4.19](akamai-server-edgekv-sdk-v1.4.18...akamai-server-edgekv-sdk-v1.4.19)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^2.0.15 to
^2.0.16
    * @launchdarkly/js-server-sdk-common bumped from ^2.18.1 to ^2.18.2
</details>

<details><summary>browser: 0.1.11</summary>

##
[0.1.11](browser-v0.1.10...browser-v0.1.11)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-client-sdk bumped from 4.3.0 to 4.3.1
</details>

<details><summary>browser-telemetry: 1.0.27</summary>

##
[1.0.27](browser-telemetry-v1.0.26...browser-telemetry-v1.0.27)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/js-client-sdk bumped from 4.3.0 to 4.3.1
</details>

<details><summary>cloudflare-server-sdk: 2.7.16</summary>

##
[2.7.16](cloudflare-server-sdk-v2.7.15...cloudflare-server-sdk-v2.7.16)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/js-server-sdk-common-edge bumped from 2.6.14 to 2.6.15
</details>

<details><summary>fastly-server-sdk: 0.2.8</summary>

##
[0.2.8](fastly-server-sdk-v0.2.7...fastly-server-sdk-v0.2.8)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.18.1 to 2.18.2
</details>

<details><summary>jest: 1.0.6</summary>

##
[1.0.6](jest-v1.0.5...jest-v1.0.6)
(2026-03-04)


### Dependencies

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

<details><summary>js-client-sdk: 4.3.1</summary>

##
[4.3.1](js-client-sdk-v4.3.0...js-client-sdk-v4.3.1)
(2026-03-04)


### Bug Fixes

* **js-client-sdk:** switching context does not update streaming
connection
([#1153](#1153))
([b894ac2](b894ac2))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-client-sdk-common bumped from 1.20.0 to 1.21.0
</details>

<details><summary>js-client-sdk-common: 1.21.0</summary>

##
[1.21.0](js-client-sdk-common-v1.20.0...js-client-sdk-common-v1.21.0)
(2026-03-04)


### Features

* Add fdv2 mode configuration types and validation.
([#1135](#1135))
([6ee156c](6ee156c))
* Add FDv2 polling initializer/synchronizer
([#1130](#1130))
([6777fc6](6777fc6))
* Add FDv2 State Debouncer
([#1148](#1148))
([da3f72e](da3f72e))
* Add FDv2 streaming initializer/synchronizer
([#1131](#1131))
([6602bbc](6602bbc))
* Add FDv2DataSource composite data source orchestrator
([#1141](#1141))
([f02ae5a](f02ae5a))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-sdk-common bumped from 2.22.0 to 2.23.0
</details>

<details><summary>js-sdk-common: 2.23.0</summary>

##
[2.23.0](js-sdk-common-v2.22.0...js-sdk-common-v2.23.0)
(2026-03-04)


### Features

* Add isNullish utility to validators.
([#1137](#1137))
([0064365](0064365))
* Add oneOf validator to common validators.
([#1139](#1139))
([606fcf1](606fcf1))
</details>

<details><summary>js-server-sdk-common: 2.18.2</summary>

##
[2.18.2](js-server-sdk-common-v2.18.1...js-server-sdk-common-v2.18.2)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-sdk-common bumped from 2.22.0 to 2.23.0
</details>

<details><summary>js-server-sdk-common-edge: 2.6.15</summary>

##
[2.6.15](js-server-sdk-common-edge-v2.6.14...js-server-sdk-common-edge-v2.6.15)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.18.1 to 2.18.2
</details>

<details><summary>node-server-sdk: 9.10.9</summary>

##
[9.10.9](node-server-sdk-v9.10.8...node-server-sdk-v9.10.9)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.18.1 to 2.18.2
</details>

<details><summary>node-server-sdk-dynamodb: 6.2.21</summary>

##
[6.2.21](node-server-sdk-dynamodb-v6.2.20...node-server-sdk-dynamodb-v6.2.21)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/node-server-sdk bumped from 9.10.8 to 9.10.9
  * peerDependencies
    * @launchdarkly/node-server-sdk bumped from >=9.4.3 to >=9.10.9
</details>

<details><summary>node-server-sdk-otel: 1.3.9</summary>

##
[1.3.9](node-server-sdk-otel-v1.3.8...node-server-sdk-otel-v1.3.9)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/node-server-sdk bumped from 9.10.8 to 9.10.9
  * peerDependencies
    * @launchdarkly/node-server-sdk bumped from >=9.4.3 to >=9.10.9
</details>

<details><summary>node-server-sdk-redis: 4.2.21</summary>

##
[4.2.21](node-server-sdk-redis-v4.2.20...node-server-sdk-redis-v4.2.21)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/node-server-sdk bumped from 9.10.8 to 9.10.9
  * peerDependencies
    * @launchdarkly/node-server-sdk bumped from >=9.4.3 to >=9.10.9
</details>

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

##
[10.14.1](react-native-client-sdk-v10.14.0...react-native-client-sdk-v10.14.1)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-client-sdk-common bumped from 1.20.0 to 1.21.0
</details>

<details><summary>server-sdk-ai: 0.16.5</summary>

##
[0.16.5](server-sdk-ai-v0.16.4...server-sdk-ai-v0.16.5)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.18.1 to 2.18.2
  * peerDependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.x to 2.18.2
</details>

<details><summary>server-sdk-ai-langchain: 0.5.1</summary>

##
[0.5.1](server-sdk-ai-langchain-v0.5.0...server-sdk-ai-langchain-v0.5.1)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/server-sdk-ai bumped from ^0.16.4 to ^0.16.5
  * peerDependencies
* @launchdarkly/server-sdk-ai bumped from ^0.15.0 || ^0.16.0 to ^0.16.5
</details>

<details><summary>server-sdk-ai-openai: 0.5.1</summary>

##
[0.5.1](server-sdk-ai-openai-v0.5.0...server-sdk-ai-openai-v0.5.1)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.18.1 to 2.18.2
    * @launchdarkly/server-sdk-ai bumped from ^0.16.4 to ^0.16.5
  * peerDependencies
* @launchdarkly/server-sdk-ai bumped from ^0.15.0 || ^0.16.0 to ^0.16.5
</details>

<details><summary>server-sdk-ai-vercel: 0.5.1</summary>

##
[0.5.1](server-sdk-ai-vercel-v0.5.0...server-sdk-ai-vercel-v0.5.1)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/server-sdk-ai bumped from ^0.16.4 to ^0.16.5
  * peerDependencies
* @launchdarkly/server-sdk-ai bumped from ^0.15.0 || ^0.16.0 to ^0.16.5
</details>

<details><summary>shopify-oxygen-sdk: 0.1.6</summary>

##
[0.1.6](shopify-oxygen-sdk-v0.1.5...shopify-oxygen-sdk-v0.1.6)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.18.1 to 2.18.2
</details>

<details><summary>vercel-server-sdk: 1.3.41</summary>

##
[1.3.41](vercel-server-sdk-v1.3.40...vercel-server-sdk-v1.3.41)
(2026-03-04)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/js-server-sdk-common-edge bumped from 2.6.14 to 2.6.15
</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]
> **Medium Risk**
> Broad cross-package version and dependency updates can create
integration/compatibility issues for downstream consumers despite being
mostly release metadata changes.
> 
> **Overview**
> This PR is a **release-please** rollup that bumps versions across many
packages and updates the release manifest, `package.json`s, and
`CHANGELOG.md` entries accordingly.
> 
> Notable shipped changes called out in changelogs include a
`@launchdarkly/js-client-sdk` patch to fix streaming reconnection when
switching context, plus shared package updates (e.g., new validator
helpers in `@launchdarkly/js-sdk-common` and new FDv2
config/types/initializers in `@launchdarkly/js-client-sdk-common`) that
cascade version bumps through dependent SDKs
(Akamai/Cloudflare/Fastly/Vercel, AI providers, telemetry, and store
adapters).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
3ad499b. 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.

2 participants