Skip to content

Conversation

tusharkhandelwal8
Copy link
Contributor

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: f266c69

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 (5e9bcaf)Diff
    browser45.9 kB61.3 kB+15.4 kB (+33.5%)
    main49.0 kB64.8 kB+15.8 kB (+32.2%)
    module45.9 kB61.3 kB+15.4 kB (+33.5%)
  • @firebase/remote-config

    TypeBase (9b63cd6)Merge (5e9bcaf)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 (5e9bcaf)Diff
    remote-config (getAndFetch)47.8 kB59.4 kB+11.7 kB (+24.4%)
  • firebase

    TypeBase (9b63cd6)Merge (5e9bcaf)Diff
    firebase-ai.js35.7 kB48.4 kB+12.7 kB (+35.6%)
    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/1mo7qrtLG3.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 21, 2025

Size Analysis Report 1

This report is too large (150,337 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/nMotESaoOT.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.

Copy link

@nk-1983 nk-1983 left a comment

Choose a reason for hiding this comment

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

Have shared some minor updates - in general, let's avoid using RC since this isn't a valid acronym.

@hsubox76 hsubox76 merged commit 120a308 into main Sep 12, 2025
36 of 38 checks passed
@hsubox76 hsubox76 deleted the realtime-for-web branch September 12, 2025 17:13
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.

8 participants