Skip to content

Conversation

athiramanu
Copy link

@athiramanu athiramanu commented Oct 3, 2025

This change is part of the feature to support Web Experiments in Remote Config. Changes can be broken down as below:

  • Introduces the experiment details in the fetch response type
  • Extracts experiments received from the fetch response and saves in indexedDB
  • Sets the experiment and variant received as user property

Design doc (internal): go/experiments-web

athiramanu and others added 3 commits September 27, 2025 16:42
* feat: Process experiment metadata in RC fetch response

* [Fix] Storage cache is not updating when there are no experiments in response

* Add result of running yarn docgen:all

* Address review comments

* Fix yarn format failures

* yarn docgen changes added

* Export firebaseExperimentDescription

---------

Co-authored-by: Athira M <[email protected]>
* feat: Process experiment metadata in RC fetch response

* [Fix] Storage cache is not updating when there are no experiments in response

* Add result of running yarn docgen:all

* feat: Process experiment metadata in RC fetch response

* feat: Add ABT support for remote config

* [Fix] Storage cache is not updating when there are no experiments in response

* Merge conflict fix

* Yarn format fix

* Fix merge conflicts

* Address review comments

* Fix yarn format failures

* yarn docgen changes added

* Export firebaseExperimentDescription

* Address review comments

---------

Co-authored-by: Athira M <[email protected]>
* feat: Process experiment metadata in RC fetch response

* feat: Add ABT support for remote config

* feat: Integrate firebase internal analytics with ABT

* [Fix] Storage cache is not updating when there are no experiments in response

* feat: Process experiment metadata in RC fetch response

* [Fix] Storage cache is not updating when there are no experiments in response

* Add result of running yarn docgen:all

* feat: Process experiment metadata in RC fetch response

* feat: Add ABT support for remote config

* [Fix] Storage cache is not updating when there are no experiments in response

* Merge conflict fix

* Yarn format fix

* Fix merge conflicts

* Integrate ABT with Firebase analytics to add experiment as UP

* Fix yarn format errors

* Address review comments

* Fix yarn format failures

* yarn docgen changes added

* Export firebaseExperimentDescription

* Address review comments

* Address review comments

* Add unit tests

* Add error handling

* Remove log

---------

Co-authored-by: Athira M <[email protected]>
@athiramanu athiramanu requested review from a team and erikeldridge as code owners October 3, 2025 06:20
Copy link

changeset-bot bot commented Oct 3, 2025

⚠️ No Changeset found

Latest commit: fa63f97

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 3, 2025

Size Report 1

Affected Products

  • @firebase/remote-config

    TypeBase (ccbf7ba)Merge (0495bbf)Diff
    browser39.0 kB41.5 kB+2.45 kB (+6.3%)
    main40.2 kB42.7 kB+2.45 kB (+6.1%)
    module39.0 kB41.5 kB+2.45 kB (+6.3%)
  • bundle

    TypeBase (ccbf7ba)Merge (0495bbf)Diff
    remote-config (getAndFetch)59.4 kB60.9 kB+1.49 kB (+2.5%)
  • firebase

    TypeBase (ccbf7ba)Merge (0495bbf)Diff
    firebase-compat.js809 kB811 kB+1.40 kB (+0.2%)
    firebase-remote-config-compat.js38.7 kB40.1 kB+1.40 kB (+3.6%)
    firebase-remote-config.js43.5 kB45.0 kB+1.45 kB (+3.3%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/ttQOuuVghm.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 3, 2025

Size Analysis Report 1

Affected Products

  • @firebase/remote-config

    • activate

      Size

      TypeBase (ccbf7ba)Merge (0495bbf)Diff
      size23.5 kB25.0 kB+1.48 kB (+6.3%)
      size-with-ext-deps50.0 kB51.5 kB+1.49 kB (+3.0%)

      Dependency

      TypeBase (ccbf7ba)Merge (0495bbf)Diff
      classes

      12 dependencies

      CachingClient
      EventEmitter
      InMemoryStorage
      IndexedDbStorage
      RealtimeHandler
      RemoteConfig
      RemoteConfigAbortSignal
      RestClient
      RetryingClient
      Storage
      StorageCache
      VisibilityMonitor

      13 dependencies

      CachingClient
      EventEmitter
      Experiment
      InMemoryStorage
      IndexedDbStorage
      RealtimeHandler
      RemoteConfig
      RemoteConfigAbortSignal
      RestClient
      RetryingClient
      Storage
      StorageCache
      VisibilityMonitor

      + Experiment

    • ensureInitialized

      Size

      TypeBase (ccbf7ba)Merge (0495bbf)Diff
      size23.1 kB23.5 kB+347 B (+1.5%)
      size-with-ext-deps49.6 kB50.0 kB+347 B (+0.7%)
    • fetchAndActivate

      Size

      TypeBase (ccbf7ba)Merge (0495bbf)Diff
      size24.2 kB25.6 kB+1.48 kB (+6.1%)
      size-with-ext-deps50.7 kB52.1 kB+1.49 kB (+2.9%)

      Dependency

      TypeBase (ccbf7ba)Merge (0495bbf)Diff
      classes

      12 dependencies

      CachingClient
      EventEmitter
      InMemoryStorage
      IndexedDbStorage
      RealtimeHandler
      RemoteConfig
      RemoteConfigAbortSignal
      RestClient
      RetryingClient
      Storage
      StorageCache
      VisibilityMonitor

      13 dependencies

      CachingClient
      EventEmitter
      Experiment
      InMemoryStorage
      IndexedDbStorage
      RealtimeHandler
      RemoteConfig
      RemoteConfigAbortSignal
      RestClient
      RetryingClient
      Storage
      StorageCache
      VisibilityMonitor

      + Experiment

    • fetchConfig

      Size

      TypeBase (ccbf7ba)Merge (0495bbf)Diff
      size23.7 kB24.1 kB+347 B (+1.5%)
      size-with-ext-deps50.2 kB50.6 kB+347 B (+0.7%)
    • getAll

      Size

      TypeBase (ccbf7ba)Merge (0495bbf)Diff
      size24.3 kB24.7 kB+347 B (+1.4%)
      size-with-ext-deps50.8 kB51.1 kB+347 B (+0.7%)
    • getBoolean

      Size

      TypeBase (ccbf7ba)Merge (0495bbf)Diff
      size24.2 kB24.5 kB+347 B (+1.4%)
      size-with-ext-deps50.7 kB51.0 kB+347 B (+0.7%)
    • getNumber

      Size

      TypeBase (ccbf7ba)Merge (0495bbf)Diff
      size24.2 kB24.5 kB+347 B (+1.4%)
      size-with-ext-deps50.7 kB51.0 kB+347 B (+0.7%)
    • getRemoteConfig

      Size

      TypeBase (ccbf7ba)Merge (0495bbf)Diff
      size23.9 kB24.3 kB+347 B (+1.5%)
      size-with-ext-deps57.3 kB57.7 kB+347 B (+0.6%)
    • getString

      Size

      TypeBase (ccbf7ba)Merge (0495bbf)Diff
      size24.2 kB24.5 kB+347 B (+1.4%)
      size-with-ext-deps50.7 kB51.0 kB+347 B (+0.7%)
    • getValue

      Size

      TypeBase (ccbf7ba)Merge (0495bbf)Diff
      size24.1 kB24.5 kB+347 B (+1.4%)
      size-with-ext-deps50.6 kB51.0 kB+347 B (+0.7%)
    • isSupported

      Size

      TypeBase (ccbf7ba)Merge (0495bbf)Diff
      size23.3 kB23.6 kB+347 B (+1.5%)
      size-with-ext-deps49.7 kB50.1 kB+347 B (+0.7%)
    • onConfigUpdate

      Size

      TypeBase (ccbf7ba)Merge (0495bbf)Diff
      size23.3 kB23.6 kB+347 B (+1.5%)
      size-with-ext-deps49.7 kB50.1 kB+347 B (+0.7%)
    • setCustomSignals

      Size

      TypeBase (ccbf7ba)Merge (0495bbf)Diff
      size23.6 kB24.0 kB+347 B (+1.5%)
      size-with-ext-deps50.1 kB50.5 kB+347 B (+0.7%)
    • setLogLevel

      Size

      TypeBase (ccbf7ba)Merge (0495bbf)Diff
      size23.3 kB23.6 kB+347 B (+1.5%)
      size-with-ext-deps49.8 kB50.1 kB+347 B (+0.7%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/q9vXwtFG7C.html

@athiramanu athiramanu requested a review from nk-1983 October 3, 2025 06:47
// months.
timeToLiveMillis: string;

// A repeated of Remote Config parameter keys that this experiment is
Copy link

Choose a reason for hiding this comment

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

This doesn't seem to read correctly.

Copy link
Author

Choose a reason for hiding this comment

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

Updated. Let me know whether it makes sense now


## FetchResponse.experiments

A/B Test and Rollout experiment metadata.
Copy link

Choose a reason for hiding this comment

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

Metadata for A/B testing and Remote Config Rollout experiments

Copy link
Author

Choose a reason for hiding this comment

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

Done

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