Skip to content

Remote Config Realtime for Web #9221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

tusharkhandelwal8
Copy link

This change introduces Realtime Remote Config for the Firebase JavaScript SDK, bringing near-instant configuration updates to web applications. This feature aligns the Web SDK with the functionality already available for mobile platforms since June 2023.

Key Changes:

  • Instant Updates: Web apps can now receive new configuration values almost instantly after they are published, eliminating the need for periodic polling.
  • New onConfigUpdate API: Developers can use a new onConfigUpdate object to define how their application handles and applies these real-time updates, mirroring the familiar API pattern from other platforms.
  • Improved Efficiency: This push-based system is more efficient than the older polling method, reducing unnecessary network requests and improving performance.

Relevant Internal Links:
Project Proposal: go/rc-realtime-for-web
API Proposal: go/realtime-rc-web-api-review
Design Document: go/rc-realtime-web-design

* added the api-definition, interfaces, realtime connection and backoffLogic

* Added TODO and comments

* resolved the comment about the spacing problem

* Fix check failures

* Fix yarn failures

* Convert backoff time from seconds to minutes

* Manage HTTP connections based on tab visibility (#9202)

* Added the visibilityMonitor

* minor changes

* resolving the spacing problem
Copy link

changeset-bot bot commented Aug 21, 2025

🦋 Changeset detected

Latest commit: 3e5477b

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

This PR includes changesets to release 4 packages
Name Type
@firebase/remote-config Minor
firebase Minor
@firebase/remote-config-types 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 Aug 21, 2025

Size Report 1

Affected Products

  • @firebase/ai

    TypeBase (9b63cd6)Merge (9296353)Diff
    browser45.9 kB46.0 kB+57 B (+0.1%)
    main49.0 kB49.1 kB+57 B (+0.1%)
    module45.9 kB46.0 kB+57 B (+0.1%)
  • @firebase/remote-config

    TypeBase (9b63cd6)Merge (9296353)Diff
    browser22.7 kB39.0 kB+16.3 kB (+71.6%)
    main23.9 kB40.2 kB+16.4 kB (+68.7%)
    module22.7 kB39.0 kB+16.3 kB (+71.6%)
  • bundle

    TypeBase (9b63cd6)Merge (9296353)Diff
    remote-config (getAndFetch)47.8 kB59.4 kB+11.7 kB (+24.4%)
  • firebase

    TypeBase (9b63cd6)Merge (9296353)Diff
    firebase-ai.js35.7 kB35.7 kB+46 B (+0.1%)
    firebase-compat.js800 kB810 kB+10.5 kB (+1.3%)
    firebase-remote-config-compat.js27.9 kB38.7 kB+10.8 kB (+38.5%)
    firebase-remote-config.js32.2 kB43.5 kB+11.3 kB (+35.1%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 21, 2025

Size Analysis Report 1

Affected Products

  • @firebase/ai

    • ImagenModel

      Size

      TypeBase (9b63cd6)Merge (9296353)Diff
      size9.19 kB9.24 kB+50 B (+0.5%)
      size-with-ext-deps26.8 kB26.9 kB+50 B (+0.2%)
    • getImagenModel

      Size

      TypeBase (9b63cd6)Merge (9296353)Diff
      size9.35 kB9.40 kB+50 B (+0.5%)
      size-with-ext-deps27.0 kB27.1 kB+50 B (+0.2%)
  • @firebase/remote-config

    • activate

      Size

      TypeBase (9b63cd6)Merge (9296353)Diff
      size12.1 kB23.5 kB+11.4 kB (+94.6%)
      size-with-ext-deps38.3 kB50.0 kB+11.7 kB (+30.6%)

      Dependency

      TypeBase (9b63cd6)Merge (9296353)Diff
      classes

      CachingClient
      InMemoryStorage
      IndexedDbStorage
      RemoteConfig
      RestClient
      RetryingClient
      Storage
      StorageCache

      12 dependencies

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

      + EventEmitter
      + RealtimeHandler
      + RemoteConfigAbortSignal
      + VisibilityMonitor

      variables

      11 dependencies

      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      name
      version

      20 dependencies

      API_KEY_HEADER
      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      INSTALLATIONS_AUTH_TOKEN_HEADER
      MAXIMUM_FETCH_ATTEMPTS
      NO_BACKOFF_TIME_IN_MILLIS
      NO_FAILED_REALTIME_STREAMS
      ORIGINAL_RETRIES
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      REALTIME_DISABLED_KEY
      REALTIME_RETRY_INTERVAL
      TEMPLATE_VERSION_KEY
      name
      version

      + API_KEY_HEADER
      + INSTALLATIONS_AUTH_TOKEN_HEADER
      + MAXIMUM_FETCH_ATTEMPTS
      + NO_BACKOFF_TIME_IN_MILLIS
      + NO_FAILED_REALTIME_STREAMS
      + ORIGINAL_RETRIES
      + REALTIME_DISABLED_KEY
      + REALTIME_RETRY_INTERVAL
      + TEMPLATE_VERSION_KEY

      External Dependency

      ModuleBase (9b63cd6)Merge (9296353)Diff
      @firebase/util

      ErrorFactory
      FirebaseError
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      ErrorFactory
      FirebaseError
      assert
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      + assert

    • ensureInitialized

      Size

      TypeBase (9b63cd6)Merge (9296353)Diff
      size11.8 kB23.1 kB+11.4 kB (+96.3%)
      size-with-ext-deps38.0 kB49.6 kB+11.6 kB (+30.6%)

      Dependency

      TypeBase (9b63cd6)Merge (9296353)Diff
      classes

      CachingClient
      InMemoryStorage
      IndexedDbStorage
      RemoteConfig
      RestClient
      RetryingClient
      Storage
      StorageCache

      12 dependencies

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

      + EventEmitter
      + RealtimeHandler
      + RemoteConfigAbortSignal
      + VisibilityMonitor

      variables

      11 dependencies

      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      name
      version

      20 dependencies

      API_KEY_HEADER
      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      INSTALLATIONS_AUTH_TOKEN_HEADER
      MAXIMUM_FETCH_ATTEMPTS
      NO_BACKOFF_TIME_IN_MILLIS
      NO_FAILED_REALTIME_STREAMS
      ORIGINAL_RETRIES
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      REALTIME_DISABLED_KEY
      REALTIME_RETRY_INTERVAL
      TEMPLATE_VERSION_KEY
      name
      version

      + API_KEY_HEADER
      + INSTALLATIONS_AUTH_TOKEN_HEADER
      + MAXIMUM_FETCH_ATTEMPTS
      + NO_BACKOFF_TIME_IN_MILLIS
      + NO_FAILED_REALTIME_STREAMS
      + ORIGINAL_RETRIES
      + REALTIME_DISABLED_KEY
      + REALTIME_RETRY_INTERVAL
      + TEMPLATE_VERSION_KEY

      External Dependency

      ModuleBase (9b63cd6)Merge (9296353)Diff
      @firebase/util

      ErrorFactory
      FirebaseError
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      ErrorFactory
      FirebaseError
      assert
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      + assert

    • fetchAndActivate

      Size

      TypeBase (9b63cd6)Merge (9296353)Diff
      size12.8 kB24.2 kB+11.3 kB (+88.1%)
      size-with-ext-deps39.1 kB50.7 kB+11.6 kB (+29.6%)

      Dependency

      TypeBase (9b63cd6)Merge (9296353)Diff
      classes

      CachingClient
      InMemoryStorage
      IndexedDbStorage
      RemoteConfig
      RemoteConfigAbortSignal
      RestClient
      RetryingClient
      Storage
      StorageCache

      12 dependencies

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

      + EventEmitter
      + RealtimeHandler
      + VisibilityMonitor

      variables

      11 dependencies

      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      name
      version

      20 dependencies

      API_KEY_HEADER
      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      INSTALLATIONS_AUTH_TOKEN_HEADER
      MAXIMUM_FETCH_ATTEMPTS
      NO_BACKOFF_TIME_IN_MILLIS
      NO_FAILED_REALTIME_STREAMS
      ORIGINAL_RETRIES
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      REALTIME_DISABLED_KEY
      REALTIME_RETRY_INTERVAL
      TEMPLATE_VERSION_KEY
      name
      version

      + API_KEY_HEADER
      + INSTALLATIONS_AUTH_TOKEN_HEADER
      + MAXIMUM_FETCH_ATTEMPTS
      + NO_BACKOFF_TIME_IN_MILLIS
      + NO_FAILED_REALTIME_STREAMS
      + ORIGINAL_RETRIES
      + REALTIME_DISABLED_KEY
      + REALTIME_RETRY_INTERVAL
      + TEMPLATE_VERSION_KEY

      External Dependency

      ModuleBase (9b63cd6)Merge (9296353)Diff
      @firebase/util

      ErrorFactory
      FirebaseError
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      ErrorFactory
      FirebaseError
      assert
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      + assert

    • fetchConfig

      Size

      TypeBase (9b63cd6)Merge (9296353)Diff
      size12.5 kB23.7 kB+11.2 kB (+90.0%)
      size-with-ext-deps38.7 kB50.2 kB+11.5 kB (+29.7%)

      Dependency

      TypeBase (9b63cd6)Merge (9296353)Diff
      classes

      CachingClient
      InMemoryStorage
      IndexedDbStorage
      RemoteConfig
      RemoteConfigAbortSignal
      RestClient
      RetryingClient
      Storage
      StorageCache

      12 dependencies

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

      + EventEmitter
      + RealtimeHandler
      + VisibilityMonitor

      variables

      11 dependencies

      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      name
      version

      20 dependencies

      API_KEY_HEADER
      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      INSTALLATIONS_AUTH_TOKEN_HEADER
      MAXIMUM_FETCH_ATTEMPTS
      NO_BACKOFF_TIME_IN_MILLIS
      NO_FAILED_REALTIME_STREAMS
      ORIGINAL_RETRIES
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      REALTIME_DISABLED_KEY
      REALTIME_RETRY_INTERVAL
      TEMPLATE_VERSION_KEY
      name
      version

      + API_KEY_HEADER
      + INSTALLATIONS_AUTH_TOKEN_HEADER
      + MAXIMUM_FETCH_ATTEMPTS
      + NO_BACKOFF_TIME_IN_MILLIS
      + NO_FAILED_REALTIME_STREAMS
      + ORIGINAL_RETRIES
      + REALTIME_DISABLED_KEY
      + REALTIME_RETRY_INTERVAL
      + TEMPLATE_VERSION_KEY

      External Dependency

      ModuleBase (9b63cd6)Merge (9296353)Diff
      @firebase/util

      ErrorFactory
      FirebaseError
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      ErrorFactory
      FirebaseError
      assert
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      + assert

    • getAll

      Size

      TypeBase (9b63cd6)Merge (9296353)Diff
      size12.9 kB24.3 kB+11.4 kB (+87.9%)
      size-with-ext-deps39.2 kB50.8 kB+11.6 kB (+29.7%)

      Dependency

      TypeBase (9b63cd6)Merge (9296353)Diff
      classes

      CachingClient
      InMemoryStorage
      IndexedDbStorage
      RemoteConfig
      RestClient
      RetryingClient
      Storage
      StorageCache
      Value

      13 dependencies

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

      + EventEmitter
      + RealtimeHandler
      + RemoteConfigAbortSignal
      + VisibilityMonitor

      variables

      15 dependencies

      APP_NAMESPACE_STORE
      BOOLEAN_TRUTHY_VALUES
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      DEFAULT_VALUE_FOR_BOOLEAN
      DEFAULT_VALUE_FOR_NUMBER
      DEFAULT_VALUE_FOR_STRING
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      name
      version

      24 dependencies

      API_KEY_HEADER
      APP_NAMESPACE_STORE
      BOOLEAN_TRUTHY_VALUES
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      DEFAULT_VALUE_FOR_BOOLEAN
      DEFAULT_VALUE_FOR_NUMBER
      DEFAULT_VALUE_FOR_STRING
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      INSTALLATIONS_AUTH_TOKEN_HEADER
      MAXIMUM_FETCH_ATTEMPTS
      NO_BACKOFF_TIME_IN_MILLIS
      NO_FAILED_REALTIME_STREAMS
      ORIGINAL_RETRIES
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      REALTIME_DISABLED_KEY
      REALTIME_RETRY_INTERVAL
      TEMPLATE_VERSION_KEY
      name
      version

      + API_KEY_HEADER
      + INSTALLATIONS_AUTH_TOKEN_HEADER
      + MAXIMUM_FETCH_ATTEMPTS
      + NO_BACKOFF_TIME_IN_MILLIS
      + NO_FAILED_REALTIME_STREAMS
      + ORIGINAL_RETRIES
      + REALTIME_DISABLED_KEY
      + REALTIME_RETRY_INTERVAL
      + TEMPLATE_VERSION_KEY

      External Dependency

      ModuleBase (9b63cd6)Merge (9296353)Diff
      @firebase/util

      ErrorFactory
      FirebaseError
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      ErrorFactory
      FirebaseError
      assert
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      + assert

    • getBoolean

      Size

      TypeBase (9b63cd6)Merge (9296353)Diff
      size12.8 kB24.2 kB+11.4 kB (+88.8%)
      size-with-ext-deps39.0 kB50.7 kB+11.6 kB (+29.8%)

      Dependency

      TypeBase (9b63cd6)Merge (9296353)Diff
      classes

      CachingClient
      InMemoryStorage
      IndexedDbStorage
      RemoteConfig
      RestClient
      RetryingClient
      Storage
      StorageCache
      Value

      13 dependencies

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

      + EventEmitter
      + RealtimeHandler
      + RemoteConfigAbortSignal
      + VisibilityMonitor

      variables

      15 dependencies

      APP_NAMESPACE_STORE
      BOOLEAN_TRUTHY_VALUES
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      DEFAULT_VALUE_FOR_BOOLEAN
      DEFAULT_VALUE_FOR_NUMBER
      DEFAULT_VALUE_FOR_STRING
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      name
      version

      24 dependencies

      API_KEY_HEADER
      APP_NAMESPACE_STORE
      BOOLEAN_TRUTHY_VALUES
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      DEFAULT_VALUE_FOR_BOOLEAN
      DEFAULT_VALUE_FOR_NUMBER
      DEFAULT_VALUE_FOR_STRING
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      INSTALLATIONS_AUTH_TOKEN_HEADER
      MAXIMUM_FETCH_ATTEMPTS
      NO_BACKOFF_TIME_IN_MILLIS
      NO_FAILED_REALTIME_STREAMS
      ORIGINAL_RETRIES
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      REALTIME_DISABLED_KEY
      REALTIME_RETRY_INTERVAL
      TEMPLATE_VERSION_KEY
      name
      version

      + API_KEY_HEADER
      + INSTALLATIONS_AUTH_TOKEN_HEADER
      + MAXIMUM_FETCH_ATTEMPTS
      + NO_BACKOFF_TIME_IN_MILLIS
      + NO_FAILED_REALTIME_STREAMS
      + ORIGINAL_RETRIES
      + REALTIME_DISABLED_KEY
      + REALTIME_RETRY_INTERVAL
      + TEMPLATE_VERSION_KEY

      External Dependency

      ModuleBase (9b63cd6)Merge (9296353)Diff
      @firebase/util

      ErrorFactory
      FirebaseError
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      ErrorFactory
      FirebaseError
      assert
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      + assert

    • getNumber

      Size

      TypeBase (9b63cd6)Merge (9296353)Diff
      size12.8 kB24.2 kB+11.4 kB (+88.8%)
      size-with-ext-deps39.0 kB50.7 kB+11.6 kB (+29.8%)

      Dependency

      TypeBase (9b63cd6)Merge (9296353)Diff
      classes

      CachingClient
      InMemoryStorage
      IndexedDbStorage
      RemoteConfig
      RestClient
      RetryingClient
      Storage
      StorageCache
      Value

      13 dependencies

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

      + EventEmitter
      + RealtimeHandler
      + RemoteConfigAbortSignal
      + VisibilityMonitor

      variables

      15 dependencies

      APP_NAMESPACE_STORE
      BOOLEAN_TRUTHY_VALUES
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      DEFAULT_VALUE_FOR_BOOLEAN
      DEFAULT_VALUE_FOR_NUMBER
      DEFAULT_VALUE_FOR_STRING
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      name
      version

      24 dependencies

      API_KEY_HEADER
      APP_NAMESPACE_STORE
      BOOLEAN_TRUTHY_VALUES
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      DEFAULT_VALUE_FOR_BOOLEAN
      DEFAULT_VALUE_FOR_NUMBER
      DEFAULT_VALUE_FOR_STRING
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      INSTALLATIONS_AUTH_TOKEN_HEADER
      MAXIMUM_FETCH_ATTEMPTS
      NO_BACKOFF_TIME_IN_MILLIS
      NO_FAILED_REALTIME_STREAMS
      ORIGINAL_RETRIES
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      REALTIME_DISABLED_KEY
      REALTIME_RETRY_INTERVAL
      TEMPLATE_VERSION_KEY
      name
      version

      + API_KEY_HEADER
      + INSTALLATIONS_AUTH_TOKEN_HEADER
      + MAXIMUM_FETCH_ATTEMPTS
      + NO_BACKOFF_TIME_IN_MILLIS
      + NO_FAILED_REALTIME_STREAMS
      + ORIGINAL_RETRIES
      + REALTIME_DISABLED_KEY
      + REALTIME_RETRY_INTERVAL
      + TEMPLATE_VERSION_KEY

      External Dependency

      ModuleBase (9b63cd6)Merge (9296353)Diff
      @firebase/util

      ErrorFactory
      FirebaseError
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      ErrorFactory
      FirebaseError
      assert
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      + assert

    • getRemoteConfig

      Size

      TypeBase (9b63cd6)Merge (9296353)Diff
      size12.5 kB23.9 kB+11.4 kB (+91.8%)
      size-with-ext-deps45.6 kB57.3 kB+11.7 kB (+25.7%)

      Dependency

      TypeBase (9b63cd6)Merge (9296353)Diff
      classes

      CachingClient
      InMemoryStorage
      IndexedDbStorage
      RemoteConfig
      RestClient
      RetryingClient
      Storage
      StorageCache

      12 dependencies

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

      + EventEmitter
      + RealtimeHandler
      + RemoteConfigAbortSignal
      + VisibilityMonitor

      variables

      11 dependencies

      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      name
      version

      20 dependencies

      API_KEY_HEADER
      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      INSTALLATIONS_AUTH_TOKEN_HEADER
      MAXIMUM_FETCH_ATTEMPTS
      NO_BACKOFF_TIME_IN_MILLIS
      NO_FAILED_REALTIME_STREAMS
      ORIGINAL_RETRIES
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      REALTIME_DISABLED_KEY
      REALTIME_RETRY_INTERVAL
      TEMPLATE_VERSION_KEY
      name
      version

      + API_KEY_HEADER
      + INSTALLATIONS_AUTH_TOKEN_HEADER
      + MAXIMUM_FETCH_ATTEMPTS
      + NO_BACKOFF_TIME_IN_MILLIS
      + NO_FAILED_REALTIME_STREAMS
      + ORIGINAL_RETRIES
      + REALTIME_DISABLED_KEY
      + REALTIME_RETRY_INTERVAL
      + TEMPLATE_VERSION_KEY

      External Dependency

      ModuleBase (9b63cd6)Merge (9296353)Diff
      @firebase/util

      ErrorFactory
      FirebaseError
      calculateBackoffMillis
      deepEqual
      getModularInstance
      isIndexedDBAvailable

      ErrorFactory
      FirebaseError
      assert
      calculateBackoffMillis
      deepEqual
      getModularInstance
      isIndexedDBAvailable

      + assert

    • getString

      Size

      TypeBase (9b63cd6)Merge (9296353)Diff
      size12.8 kB24.2 kB+11.4 kB (+88.8%)
      size-with-ext-deps39.0 kB50.7 kB+11.6 kB (+29.8%)

      Dependency

      TypeBase (9b63cd6)Merge (9296353)Diff
      classes

      CachingClient
      InMemoryStorage
      IndexedDbStorage
      RemoteConfig
      RestClient
      RetryingClient
      Storage
      StorageCache
      Value

      13 dependencies

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

      + EventEmitter
      + RealtimeHandler
      + RemoteConfigAbortSignal
      + VisibilityMonitor

      variables

      15 dependencies

      APP_NAMESPACE_STORE
      BOOLEAN_TRUTHY_VALUES
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      DEFAULT_VALUE_FOR_BOOLEAN
      DEFAULT_VALUE_FOR_NUMBER
      DEFAULT_VALUE_FOR_STRING
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      name
      version

      24 dependencies

      API_KEY_HEADER
      APP_NAMESPACE_STORE
      BOOLEAN_TRUTHY_VALUES
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      DEFAULT_VALUE_FOR_BOOLEAN
      DEFAULT_VALUE_FOR_NUMBER
      DEFAULT_VALUE_FOR_STRING
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      INSTALLATIONS_AUTH_TOKEN_HEADER
      MAXIMUM_FETCH_ATTEMPTS
      NO_BACKOFF_TIME_IN_MILLIS
      NO_FAILED_REALTIME_STREAMS
      ORIGINAL_RETRIES
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      REALTIME_DISABLED_KEY
      REALTIME_RETRY_INTERVAL
      TEMPLATE_VERSION_KEY
      name
      version

      + API_KEY_HEADER
      + INSTALLATIONS_AUTH_TOKEN_HEADER
      + MAXIMUM_FETCH_ATTEMPTS
      + NO_BACKOFF_TIME_IN_MILLIS
      + NO_FAILED_REALTIME_STREAMS
      + ORIGINAL_RETRIES
      + REALTIME_DISABLED_KEY
      + REALTIME_RETRY_INTERVAL
      + TEMPLATE_VERSION_KEY

      External Dependency

      ModuleBase (9b63cd6)Merge (9296353)Diff
      @firebase/util

      ErrorFactory
      FirebaseError
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      ErrorFactory
      FirebaseError
      assert
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      + assert

    • getValue

      Size

      TypeBase (9b63cd6)Merge (9296353)Diff
      size12.8 kB24.1 kB+11.4 kB (+89.1%)
      size-with-ext-deps39.0 kB50.6 kB+11.6 kB (+29.8%)

      Dependency

      TypeBase (9b63cd6)Merge (9296353)Diff
      classes

      CachingClient
      InMemoryStorage
      IndexedDbStorage
      RemoteConfig
      RestClient
      RetryingClient
      Storage
      StorageCache
      Value

      13 dependencies

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

      + EventEmitter
      + RealtimeHandler
      + RemoteConfigAbortSignal
      + VisibilityMonitor

      variables

      15 dependencies

      APP_NAMESPACE_STORE
      BOOLEAN_TRUTHY_VALUES
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      DEFAULT_VALUE_FOR_BOOLEAN
      DEFAULT_VALUE_FOR_NUMBER
      DEFAULT_VALUE_FOR_STRING
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      name
      version

      24 dependencies

      API_KEY_HEADER
      APP_NAMESPACE_STORE
      BOOLEAN_TRUTHY_VALUES
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      DEFAULT_VALUE_FOR_BOOLEAN
      DEFAULT_VALUE_FOR_NUMBER
      DEFAULT_VALUE_FOR_STRING
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      INSTALLATIONS_AUTH_TOKEN_HEADER
      MAXIMUM_FETCH_ATTEMPTS
      NO_BACKOFF_TIME_IN_MILLIS
      NO_FAILED_REALTIME_STREAMS
      ORIGINAL_RETRIES
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      REALTIME_DISABLED_KEY
      REALTIME_RETRY_INTERVAL
      TEMPLATE_VERSION_KEY
      name
      version

      + API_KEY_HEADER
      + INSTALLATIONS_AUTH_TOKEN_HEADER
      + MAXIMUM_FETCH_ATTEMPTS
      + NO_BACKOFF_TIME_IN_MILLIS
      + NO_FAILED_REALTIME_STREAMS
      + ORIGINAL_RETRIES
      + REALTIME_DISABLED_KEY
      + REALTIME_RETRY_INTERVAL
      + TEMPLATE_VERSION_KEY

      External Dependency

      ModuleBase (9b63cd6)Merge (9296353)Diff
      @firebase/util

      ErrorFactory
      FirebaseError
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      ErrorFactory
      FirebaseError
      assert
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      + assert

    • isSupported

      Size

      TypeBase (9b63cd6)Merge (9296353)Diff
      size11.9 kB23.3 kB+11.4 kB (+95.4%)
      size-with-ext-deps38.1 kB49.7 kB+11.6 kB (+30.5%)

      Dependency

      TypeBase (9b63cd6)Merge (9296353)Diff
      classes

      CachingClient
      InMemoryStorage
      IndexedDbStorage
      RemoteConfig
      RestClient
      RetryingClient
      Storage
      StorageCache

      12 dependencies

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

      + EventEmitter
      + RealtimeHandler
      + RemoteConfigAbortSignal
      + VisibilityMonitor

      variables

      11 dependencies

      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      name
      version

      20 dependencies

      API_KEY_HEADER
      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      INSTALLATIONS_AUTH_TOKEN_HEADER
      MAXIMUM_FETCH_ATTEMPTS
      NO_BACKOFF_TIME_IN_MILLIS
      NO_FAILED_REALTIME_STREAMS
      ORIGINAL_RETRIES
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      REALTIME_DISABLED_KEY
      REALTIME_RETRY_INTERVAL
      TEMPLATE_VERSION_KEY
      name
      version

      + API_KEY_HEADER
      + INSTALLATIONS_AUTH_TOKEN_HEADER
      + MAXIMUM_FETCH_ATTEMPTS
      + NO_BACKOFF_TIME_IN_MILLIS
      + NO_FAILED_REALTIME_STREAMS
      + ORIGINAL_RETRIES
      + REALTIME_DISABLED_KEY
      + REALTIME_RETRY_INTERVAL
      + TEMPLATE_VERSION_KEY

      External Dependency

      ModuleBase (9b63cd6)Merge (9296353)Diff
      @firebase/util

      ErrorFactory
      FirebaseError
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable
      validateIndexedDBOpenable

      ErrorFactory
      FirebaseError
      assert
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable
      validateIndexedDBOpenable

      + assert

    • onConfigUpdate

      Size

      TypeBase (9b63cd6)Merge (9296353)Diff
      size?23.3 kB? (?)
      size-with-ext-deps?49.7 kB? (?)

      Dependency

      TypeBase (9b63cd6)Merge (9296353)Diff
      functions?

      ensureInitialized
      getUserLanguage
      isRetriableError
      mergeCustomSignals
      onConfigUpdate
      openDatabase
      registerRemoteConfig
      setAbortableTimeout
      toFirebaseError

      ?
      classes?

      12 dependencies

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

      ?
      variables?

      20 dependencies

      API_KEY_HEADER
      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      INSTALLATIONS_AUTH_TOKEN_HEADER
      MAXIMUM_FETCH_ATTEMPTS
      NO_BACKOFF_TIME_IN_MILLIS
      NO_FAILED_REALTIME_STREAMS
      ORIGINAL_RETRIES
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      REALTIME_DISABLED_KEY
      REALTIME_RETRY_INTERVAL
      TEMPLATE_VERSION_KEY
      name
      version

      ?
      enums??

      External Dependency

      ModuleBase (9b63cd6)Merge (9296353)Diff
      @firebase/app?

      SDK_VERSION
      _registerComponent
      registerVersion

      ?
      @firebase/component?

      Component

      ?
      @firebase/logger?

      LogLevel
      Logger

      ?
      @firebase/util?

      ErrorFactory
      FirebaseError
      assert
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      ?
    • setCustomSignals

      Size

      TypeBase (9b63cd6)Merge (9296353)Diff
      size12.3 kB23.6 kB+11.4 kB (+92.4%)
      size-with-ext-deps38.5 kB50.1 kB+11.6 kB (+30.2%)

      Dependency

      TypeBase (9b63cd6)Merge (9296353)Diff
      classes

      CachingClient
      InMemoryStorage
      IndexedDbStorage
      RemoteConfig
      RestClient
      RetryingClient
      Storage
      StorageCache

      12 dependencies

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

      + EventEmitter
      + RealtimeHandler
      + RemoteConfigAbortSignal
      + VisibilityMonitor

      variables

      13 dependencies

      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_KEY_MAX_LENGTH
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      RC_CUSTOM_SIGNAL_VALUE_MAX_LENGTH
      name
      version

      22 dependencies

      API_KEY_HEADER
      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      INSTALLATIONS_AUTH_TOKEN_HEADER
      MAXIMUM_FETCH_ATTEMPTS
      NO_BACKOFF_TIME_IN_MILLIS
      NO_FAILED_REALTIME_STREAMS
      ORIGINAL_RETRIES
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_KEY_MAX_LENGTH
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      RC_CUSTOM_SIGNAL_VALUE_MAX_LENGTH
      REALTIME_DISABLED_KEY
      REALTIME_RETRY_INTERVAL
      TEMPLATE_VERSION_KEY
      name
      version

      + API_KEY_HEADER
      + INSTALLATIONS_AUTH_TOKEN_HEADER
      + MAXIMUM_FETCH_ATTEMPTS
      + NO_BACKOFF_TIME_IN_MILLIS
      + NO_FAILED_REALTIME_STREAMS
      + ORIGINAL_RETRIES
      + REALTIME_DISABLED_KEY
      + REALTIME_RETRY_INTERVAL
      + TEMPLATE_VERSION_KEY

      External Dependency

      ModuleBase (9b63cd6)Merge (9296353)Diff
      @firebase/util

      ErrorFactory
      FirebaseError
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      ErrorFactory
      FirebaseError
      assert
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      + assert

    • setLogLevel

      Size

      TypeBase (9b63cd6)Merge (9296353)Diff
      size11.9 kB23.3 kB+11.4 kB (+95.0%)
      size-with-ext-deps38.2 kB49.8 kB+11.6 kB (+30.5%)

      Dependency

      TypeBase (9b63cd6)Merge (9296353)Diff
      classes

      CachingClient
      InMemoryStorage
      IndexedDbStorage
      RemoteConfig
      RestClient
      RetryingClient
      Storage
      StorageCache

      12 dependencies

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

      + EventEmitter
      + RealtimeHandler
      + RemoteConfigAbortSignal
      + VisibilityMonitor

      variables

      11 dependencies

      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      name
      version

      20 dependencies

      API_KEY_HEADER
      APP_NAMESPACE_STORE
      DB_NAME
      DB_VERSION
      DEFAULT_CACHE_MAX_AGE_MILLIS
      DEFAULT_FETCH_TIMEOUT_MILLIS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      INSTALLATIONS_AUTH_TOKEN_HEADER
      MAXIMUM_FETCH_ATTEMPTS
      NO_BACKOFF_TIME_IN_MILLIS
      NO_FAILED_REALTIME_STREAMS
      ORIGINAL_RETRIES
      RC_COMPONENT_NAME
      RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS
      REALTIME_DISABLED_KEY
      REALTIME_RETRY_INTERVAL
      TEMPLATE_VERSION_KEY
      name
      version

      + API_KEY_HEADER
      + INSTALLATIONS_AUTH_TOKEN_HEADER
      + MAXIMUM_FETCH_ATTEMPTS
      + NO_BACKOFF_TIME_IN_MILLIS
      + NO_FAILED_REALTIME_STREAMS
      + ORIGINAL_RETRIES
      + REALTIME_DISABLED_KEY
      + REALTIME_RETRY_INTERVAL
      + TEMPLATE_VERSION_KEY

      External Dependency

      ModuleBase (9b63cd6)Merge (9296353)Diff
      @firebase/util

      ErrorFactory
      FirebaseError
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      ErrorFactory
      FirebaseError
      assert
      calculateBackoffMillis
      getModularInstance
      isIndexedDBAvailable

      + assert

Test Logs

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

Adds logic to listen for realtime update notifications. When a new template version is detected, it automatically fetches the config. After a successful fetch, a callback is triggered to notify the app that a new config version has been retrieved and is ready to be activated.
@tusharkhandelwal8 tusharkhandelwal8 marked this pull request as ready for review August 21, 2025 17:51
@tusharkhandelwal8 tusharkhandelwal8 requested review from a team and erikeldridge as code owners August 21, 2025 17:51
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.

LG for the most part - mostly just nits and doc comments.

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.

4 participants