Skip to content

Commit 5c0c8d5

Browse files
committed
Merge remote-tracking branch 'origin/global-dev'
2 parents 10f18ad + 9956567 commit 5c0c8d5

File tree

254 files changed

+9330
-9917
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+9330
-9917
lines changed

.firebase/hosting.c3JjL2FkbWluL2Rpc3Q.cache

Lines changed: 0 additions & 11 deletions
This file was deleted.

.firebase/hosting.c3JjL2Zyb250ZW5kL2Rpc3Q.cache

Lines changed: 0 additions & 234 deletions
This file was deleted.

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,11 @@ pubsub-debug.log
3131
# Vite PWA build/dev output
3232
/src/frontend/dev-dist
3333

34-
firebase-debug.1.log
34+
firebase-debug.1.log
35+
36+
# Firebase hosting cache
37+
.firebase/
38+
.firebase/*
39+
!.firebaserc
40+
!firebase.json
41+
!**/firebase.json

MIGRATION_LOG.md

Lines changed: 92 additions & 102 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 150 additions & 371 deletions
Large diffs are not rendered by default.

docs/CACHE_CLEARING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ If needed, you can disable version checking by commenting out the initialization
171171

172172
1. Build and deploy your app
173173
2. Open the app in your browser
174-
3. Open DevTools Console - you should see: `📦 App version: [timestamp]`
174+
3. Open DevTools Console - you should see: `App version: [timestamp]`
175175
4. Make a change and rebuild
176176
5. Deploy again
177177
6. Wait 5 minutes (or force refresh the page multiple times)
@@ -189,10 +189,10 @@ console.log("Has update:", hasUpdate);
189189

190190
## Browser Support
191191

192-
- Chrome/Edge (full support)
193-
- Firefox (full support)
194-
- Safari (full support)
195-
- Mobile browsers (full support)
192+
- Chrome/Edge (full support)
193+
- Firefox (full support)
194+
- Safari (full support)
195+
- Mobile browsers (full support)
196196

197197
## Benefits
198198

docs/FCM_TEST_COMMANDS.md

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const fcmService = (await import("/src/services/fcmService.ts")).default;
2424
// Run full test
2525
const result = await fcmService.testFCMConfiguration();
2626

27-
console.log("Test Success:", result.success ? "" : "");
27+
console.log("Test Success:", result.success ? "Success" : "Failed");
2828
console.table(result.steps);
2929
```
3030

@@ -38,11 +38,11 @@ async function testRawFCM() {
3838
try {
3939
// 1. Check service worker
4040
const registration = await navigator.serviceWorker.ready;
41-
console.log("Service Worker:", registration.scope);
41+
console.log("Service Worker:", registration.scope);
4242

4343
// 2. Check permission
4444
const permission = await Notification.requestPermission();
45-
console.log("Permission:", permission);
45+
console.log("Permission:", permission);
4646

4747
if (permission !== "granted") {
4848
throw new Error("Permission denied");
@@ -67,7 +67,7 @@ async function testRawFCM() {
6767
});
6868

6969
const messaging = getMessaging(app);
70-
console.log("Firebase initialized");
70+
console.log("Firebase initialized");
7171

7272
// 5. Get token
7373
const token = await getToken(messaging, {
@@ -76,10 +76,10 @@ async function testRawFCM() {
7676
serviceWorkerRegistration: registration,
7777
});
7878

79-
console.log("Token obtained:", token);
79+
console.log("Token obtained:", token);
8080
return token;
8181
} catch (error) {
82-
console.error("Raw FCM test failed:", error);
82+
console.error("Raw FCM test failed:", error);
8383

8484
// Detailed error info
8585
if (error.code) {
@@ -92,7 +92,7 @@ async function testRawFCM() {
9292
// Specific error handling
9393
if (error.message?.includes("Registration failed")) {
9494
console.error(`
95-
⚠️ REGISTRATION FAILED - PUSH SERVICE ERROR
95+
REGISTRATION FAILED - PUSH SERVICE ERROR
9696
9797
This error means:
9898
1. Firebase Cloud Messaging API is NOT enabled in Google Cloud Console
@@ -130,7 +130,7 @@ const apiUrls = {
130130
cloudMessaging: `https://console.cloud.google.com/apis/library/googlecloudmessaging.googleapis.com?project=${projectId}`,
131131
};
132132

133-
console.log("🔗 Google Cloud Console Links:");
133+
console.log("Google Cloud Console Links:");
134134
console.log("API Library:", apiUrls.library);
135135
console.log("API Dashboard:", apiUrls.dashboard);
136136
console.log("FCM API:", apiUrls.fcmApi);
@@ -147,7 +147,7 @@ const fcmService = (await import("/src/services/fcmService.ts")).default;
147147
// Nuclear option - reset everything
148148
await fcmService.resetFCMState();
149149

150-
console.log("FCM state reset. Refresh the page and try again.");
150+
console.log("FCM state reset. Refresh the page and try again.");
151151
```
152152
153153
## Check Token Health
@@ -159,16 +159,16 @@ const health = fcmService.getTokenHealth();
159159
console.log("Token Health:", health);
160160

161161
if (!health.hasToken) {
162-
console.log("No token available");
162+
console.log("No token available");
163163
} else if (health.isStale) {
164-
console.log("⚠️ Token is stale (> 7 days old)");
164+
console.log("Token is stale (> 7 days old)");
165165
if (health.canRefresh) {
166166
console.log("You can refresh now");
167167
} else {
168168
console.log("Next refresh available:", health.nextRefreshTime);
169169
}
170170
} else {
171-
console.log("Token is healthy");
171+
console.log("Token is healthy");
172172
console.log("Age:", Math.floor(health.age / 1000 / 60), "minutes");
173173
}
174174
```
@@ -212,7 +212,7 @@ for (const registration of registrations) {
212212
console.log("Unregistered:", registration.scope);
213213
}
214214

215-
console.log("All service workers unregistered. Refresh the page.");
215+
console.log("All service workers unregistered. Refresh the page.");
216216
```
217217
218218
## Check Notification Permission
@@ -266,7 +266,7 @@ if (fcmData) {
266266
267267
```javascript
268268
localStorage.removeItem("fcm_token_metadata");
269-
console.log("FCM metadata cleared");
269+
console.log("FCM metadata cleared");
270270
```
271271
272272
## Full System Check
@@ -275,15 +275,18 @@ console.log("✅ FCM metadata cleared");
275275
console.log("=== FULL SYSTEM CHECK ===\n");
276276

277277
console.log("1. Browser:", navigator.userAgent);
278-
console.log("2. Notification support:", "Notification" in window ? "" : "");
278+
console.log(
279+
"2. Notification support:",
280+
"Notification" in window ? "Yes" : "No",
281+
);
279282
console.log(
280283
"3. Service Worker support:",
281-
"serviceWorker" in navigator ? "" : "",
284+
"serviceWorker" in navigator ? "Yes" : "No",
282285
);
283286
console.log("4. Current permission:", Notification.permission);
284287
console.log(
285288
"5. VAPID key configured:",
286-
!!import.meta.env.VITE_FIREBASE_VAPID_KEY ? "" : "",
289+
!!import.meta.env.VITE_FIREBASE_VAPID_KEY ? "Yes" : "No",
287290
);
288291

289292
// Service workers
@@ -292,10 +295,10 @@ console.log("6. Service workers:", registrations.length);
292295

293296
// localStorage
294297
const fcmData = localStorage.getItem("fcm_token_metadata");
295-
console.log("7. Token in localStorage:", !!fcmData ? "" : "");
298+
console.log("7. Token in localStorage:", !!fcmData ? "Yes" : "No");
296299

297300
// FCM service state
298301
const fcmService = (await import("/src/services/fcmService.ts")).default;
299-
console.log("8. FCM initialized:", fcmService.isReady() ? "" : "");
300-
console.log("9. Has token:", !!fcmService.getToken() ? "" : "");
302+
console.log("8. FCM initialized:", fcmService.isReady() ? "Yes" : "No");
303+
console.log("9. Has token:", !!fcmService.getToken() ? "Yes" : "No");
301304
```

docs/FCM_TROUBLESHOOTING.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ This error typically occurs due to Firebase/Google Cloud configuration issues.
1212
2. Select your Firebase project: **devsrv-rey**
1313
3. Navigate to **APIs & Services** > **Library**
1414
4. Search and enable the following APIs:
15-
- **Firebase Cloud Messaging API** (v1)
16-
- **Cloud Messaging** (Legacy)
17-
- **FCM Registration API**
15+
- **Firebase Cloud Messaging API** (v1)
16+
- **Cloud Messaging** (Legacy)
17+
- **FCM Registration API**
1818

1919
**How to check if enabled:**
2020

@@ -30,9 +30,9 @@ This error typically occurs due to Firebase/Google Cloud configuration issues.
3030

3131
**Required Configuration:**
3232

33-
- Server key (auto-generated)
34-
- Sender ID: `851522429469`
35-
- Web Push certificates (VAPID key pair)
33+
- Server key (auto-generated)
34+
- Sender ID: `851522429469`
35+
- Web Push certificates (VAPID key pair)
3636

3737
### 3. Verify/Regenerate VAPID Key
3838

@@ -101,13 +101,13 @@ Run this in your browser console to test FCM:
101101
async function testFCM() {
102102
try {
103103
const registration = await navigator.serviceWorker.ready;
104-
console.log("Service Worker ready:", registration.scope);
104+
console.log("Service Worker ready:", registration.scope);
105105

106106
const permission = await Notification.requestPermission();
107-
console.log("Permission:", permission);
107+
console.log("Permission:", permission);
108108

109109
if (permission !== "granted") {
110-
console.error("Permission denied");
110+
console.error("Permission denied");
111111
return;
112112
}
113113

@@ -121,9 +121,9 @@ async function testFCM() {
121121
serviceWorkerRegistration: registration,
122122
});
123123

124-
console.log("Token obtained:", token);
124+
console.log("Token obtained:", token);
125125
} catch (error) {
126-
console.error("Test failed:", error);
126+
console.error("Test failed:", error);
127127
}
128128
}
129129

@@ -229,15 +229,15 @@ If all else fails:
229229

230230
Before asking for help, verify:
231231

232-
- FCM API enabled in Google Cloud
233-
- VAPID key is correct and in .env files
234-
- Browser notification permission granted
235-
- Service workers registered and active
236-
- No console errors about missing imports
237-
- Tried in incognito/private mode
238-
- Tested in multiple browsers
239-
- Network requests to FCM endpoints succeed
240-
- Firebase project has billing enabled
232+
- FCM API enabled in Google Cloud
233+
- VAPID key is correct and in .env files
234+
- Browser notification permission granted
235+
- Service workers registered and active
236+
- No console errors about missing imports
237+
- Tried in incognito/private mode
238+
- Tested in multiple browsers
239+
- Network requests to FCM endpoints succeed
240+
- Firebase project has billing enabled
241241

242242
## Working Configuration
243243

0 commit comments

Comments
 (0)