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
@changeset-bot
Copy link

changeset-bot bot commented Oct 3, 2025

🦋 Changeset detected

Latest commit: 2ef04a7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@firebase/remote-config Minor
firebase Minor
@firebase/remote-config-compat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another 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 (8209266)Merge (e72fa8e)Diff
    browser39.0 kB41.4 kB+2.40 kB (+6.1%)
    main40.2 kB42.6 kB+2.40 kB (+6.0%)
    module39.0 kB41.4 kB+2.40 kB (+6.1%)
  • bundle

    TypeBase (8209266)Merge (e72fa8e)Diff
    remote-config (getAndFetch)59.4 kB60.9 kB+1.51 kB (+2.5%)
  • firebase

    TypeBase (8209266)Merge (e72fa8e)Diff
    firebase-compat.js809 kB811 kB+1.43 kB (+0.2%)
    firebase-remote-config-compat.js38.7 kB40.1 kB+1.43 kB (+3.7%)
    firebase-remote-config.js43.5 kB45.0 kB+1.48 kB (+3.4%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/KLyyupqxvD.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 (8209266)Merge (e72fa8e)Diff
      size23.5 kB25.0 kB+1.51 kB (+6.4%)
      size-with-ext-deps50.0 kB51.5 kB+1.51 kB (+3.0%)

      Dependency

      TypeBase (8209266)Merge (e72fa8e)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 (8209266)Merge (e72fa8e)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 (8209266)Merge (e72fa8e)Diff
      size24.2 kB25.7 kB+1.51 kB (+6.3%)
      size-with-ext-deps50.7 kB52.2 kB+1.51 kB (+3.0%)

      Dependency

      TypeBase (8209266)Merge (e72fa8e)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 (8209266)Merge (e72fa8e)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 (8209266)Merge (e72fa8e)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 (8209266)Merge (e72fa8e)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 (8209266)Merge (e72fa8e)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 (8209266)Merge (e72fa8e)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 (8209266)Merge (e72fa8e)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 (8209266)Merge (e72fa8e)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 (8209266)Merge (e72fa8e)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 (8209266)Merge (e72fa8e)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 (8209266)Merge (e72fa8e)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 (8209266)Merge (e72fa8e)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/21Y9G5ummL.html

@athiramanu athiramanu requested a review from nk-1983 October 3, 2025 06:47
Copy link

@jenh jenh left a comment

Choose a reason for hiding this comment

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

Note: @nk-1983 also approved this CL, but it didn't get firebase-tw approval due to a group sync issue (should be resolved now!).

Copy link
Contributor

@hsubox76 hsubox76 left a comment

Choose a reason for hiding this comment

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

Add a changeset to ensure this will be published. Use yarn changeset and follow the dialog. It's fine if you mess up, you can edit the file after it's created. The bump should be minor. Manually add "firebase: minor" to the file after it's created - see https://g3doc.corp.google.com/firebase/jscore/g3doc/contributing/changeset.md?cl=head

* Bug fixes

* yarn format fail

* update event name

* Ensure user property is parsed

* Add firebase prefix to exp
@athiramanu athiramanu requested review from a team as code owners October 28, 2025 01:27
@github-actions
Copy link
Contributor

github-actions bot commented Oct 28, 2025

Changeset File Check ✅

  • No modified packages are missing from the changeset file.
  • No changeset formatting errors detected.

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.

6 participants