Skip to content

Add extension-style program countdown to web - #62

Merged
hoangsvit merged 12 commits into
mainfrom
feat/program-countdown
Sep 11, 2026
Merged

Add extension-style program countdown to web#62
hoangsvit merged 12 commits into
mainfrom
feat/program-countdown

Conversation

@hoangsvit

@hoangsvit hoangsvit commented Sep 11, 2026

Copy link
Copy Markdown
Member

Summary

  • add an extension-style Facilitator + Arcade countdown section directly below the calculator hero
  • sync countdown configuration from the same Firebase Remote Config keys used by the extension
  • accept Remote Config values only when Firebase reports source === "remote"; otherwise keep the extension-compatible env/default fallback
  • update days / hours / minutes / seconds every second
  • format deadline and unit labels using the active website locale
  • support light/dark themes and responsive mobile layout
  • mount the countdown on both default and localized homepages

Same config as the extension

The web build now uses the same WXT configuration names as google-cloud-skills-boost-helper:

Firebase client config

  • WXT_FIREBASE_API_KEY
  • WXT_FIREBASE_AUTH_DOMAIN
  • WXT_FIREBASE_PROJECT_ID
  • WXT_FIREBASE_STORAGE_BUCKET
  • WXT_FIREBASE_MESSAGING_SENDER_ID
  • WXT_FIREBASE_APP_ID
  • WXT_FIREBASE_FETCH_INTERVAL_MS
  • WXT_FIREBASE_FETCH_TIMEOUT_MS

Countdown defaults / fallback

  • WXT_COUNTDOWN_DEADLINE_FACILITATOR
  • WXT_COUNTDOWN_ENABLED_FACILITATOR
  • WXT_COUNTDOWN_DEADLINE_ARCADE
  • WXT_COUNTDOWN_ENABLED_ARCADE
  • WXT_FORCE_REMOTE_CONFIG

Firebase Remote Config keys

  • countdown_deadline_facilitator
  • countdown_enabled_facilitator
  • countdown_deadline_arcade
  • countdown_enabled_arcade

The production and PR-preview workflows accept each WXT setting from either a GitHub Secret or Repository Variable and expose the Firebase web config to the static client build.

Runtime behavior

  1. Build extension-compatible fallback values from WXT env values (or June 30 / December 31 seasonal fallback).
  2. Initialize the Firebase Web SDK with the repository WXT Firebase config.
  3. Run fetchAndActivate() with the configured fetch interval / timeout.
  4. Read each countdown parameter from Remote Config.
  5. Use it only when its Firebase value source is remote; otherwise retain the fallback.

The web uses Firebase JS SDK 12.18.0, matching the current extension dependency, loaded from Google's official Firebase CDN so this PR does not add another package/lockfile dependency.

Tests

  • regression coverage for default/localized mounting
  • verify seasonal fallback and the WXT countdown settings
  • verify Firebase Remote Config fetch and remote-source validation
  • verify WXT Firebase settings are exposed by Next at build time
  • verify 1-second updates, locale-aware Intl formatting, responsive styles and light theme support

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 5aafb475-9250-49d3-81ff-5bfe98975181


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

🧹 PR preview removed

The preview for this pull request was removed after the PR was closed.

github-actions Bot added a commit that referenced this pull request Sep 11, 2026
github-actions Bot added a commit that referenced this pull request Sep 11, 2026
@hoangsvit
hoangsvit merged commit 61abad9 into main Sep 11, 2026
5 checks passed
@hoangsvit
hoangsvit deleted the feat/program-countdown branch September 11, 2026 11:13
github-actions Bot added a commit that referenced this pull request Sep 11, 2026
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.

1 participant