Skip to content

Announcements

One Firestore document renders as a banner in every open surface, with no store review in between (the kit calls these broadcasts). This is remote data, which store policy allows; remote code is not.

Firebase console → Firestore → broadcasts collection → create a doc with any ID. The ID doubles as the dismissal key: reuse an ID and users who dismissed it won’t see it again.

fieldtyperequirednotes
messagestringyesbanner text; keep it to one line
levelstringnoinfo (default) · warning · promo; styling only
linkstringnohttps only; renders as “Learn more”
activeFromnumbernoepoch ms; hidden before this
activeUntilnumbernoepoch ms; hidden after this
minVersionstringnoonly shown on extension versions ≥ this (e.g. "1.2.0")

Delete the doc (or set activeUntil in the past) to retract it.

Typical uses: incident notice (warning), launch or discount (promo with an activeUntil), feature announcements. minVersion targets newer versions, not older ranges; for “update available” nudges, announce broadly and gate the feature in code.

The background holds an onSnapshot listener on the collection (public read-only, enforced by Firestore rules) and mirrors it into storage.local.broadcasts; <BroadcastBanner> shows the first active one. Dismissals are per-message and local. Offline, the last mirrored list keeps serving. Clients can never write the collection; the rules say write: if false.

The changelog notice after an extension update rides the same banner pipeline with no Firestore involved: runtime.onInstalled (reason "update") writes a local broadcast with the ID update-<version> and a link to site.config.ts → urls.changelog.

<BroadcastBanner> renders it after any server broadcast. Dismissal uses the shared per-ID store, so it is always dismissible and shows once per version. The pure logic lives in apps/extension/utils/update-notice.ts.