Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughFCM 서비스 워커에서 백그라운드 알림 처리 로직을 수정했습니다. 알림 옵션에 image 필드를 추가했고, 알림 클릭 및 폴백 URL을 https://www.pinback.today에서 https://pinback.today로 변경했습니다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant FCM as FCM
participant SW as Service Worker (firebase-messaging-sw.js)
participant Notif as Notification
participant Client as Browser
Note over FCM,SW: Background push message
FCM->>SW: push(payload: title, body, icon, image, url?)
SW->>SW: build notificationOptions (incl. image)
SW->>Notif: showNotification(title, options)
Note over Notif,SW: User clicks notification
Notif->>SW: notificationclick
alt payload.url exists
SW->>Client: openWindow(payload.url)
else fallback
SW->>Client: openWindow(https://pinback.today)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Suggested reviewersPoem
Pre-merge checks and finishing touches❌ Failed checks (4 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests
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. Comment |
|
✅ Storybook chromatic 배포 확인: |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/client/public/firebase-messaging-sw.js (1)
37-37: URL 일관성 문제를 수정해 주세요.Line 37과 Line 54의 폴백 URL이 일치하지 않습니다:
- Line 37:
https://www.pinback.today(www 포함)- Line 54:
https://pinback.today(www 없음)이러한 불일치는 다음 문제를 유발할 수 있습니다:
- 알림 처리 위치에 따라 다른 도메인으로 리다이렉션
- 세션/쿠키 관리 문제 (www와 non-www가 다르게 처리될 경우)
- 사용자 경험 혼란
두 위치 모두 동일한 URL을 사용하도록 수정해 주세요:
- const url = payload.data?.url || 'https://www.pinback.today'; + const url = payload.data?.url || 'https://pinback.today';Also applies to: 54-54
🧹 Nitpick comments (2)
apps/client/public/firebase-messaging-sw.js (2)
27-27: 프로덕션 환경에서 console.log를 제거하는 것을 권장합니다.서비스 워커에 디버깅용 console.log 문이 포함되어 있습니다. 프로덕션 환경에서는 불필요한 로깅을 제거하여 성능을 최적화하고 민감한 정보 노출을 방지하는 것이 좋습니다.
self.addEventListener('activate', () => { clients.claim(); - console.log('실행중..'); });messaging.onBackgroundMessage((payload) => { - console.log('Received background message ', payload);Also applies to: 35-35
14-19: Firebase SDK 최신 안정 버전(9.23.0)으로 업그레이드 권장
현재 9.22.2를 사용 중이며, 버그 수정 및 개선 사항이 포함된 9.23.0(2023-06-21 릴리스)으로 업데이트를 고려하세요. 알려진 보안 취약점은 없습니다.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/client/public/firebase-messaging-sw.js(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: storybook
🔇 Additional comments (1)
apps/client/public/firebase-messaging-sw.js (1)
43-43:icon과image에 동일한/FCM-IMG.png사용 여부 확인
icon(작은 아이콘)과image(알림 본문용 큰 이미지)는 용도가 다릅니다. 두 속성에 같은 파일을 사용하는 것이 의도된 동작인지 확인하고, 필요하다면 용도에 맞게 별도 에셋을 사용하세요.
📌 Related Issues
⭐ PR Point (To Reviewer)
[참고] 서버쪽이랑 FCM 알람 오류 실시간 확인 중이라!! 커밋 중복되게 계속 수정 중입니다 ㅠㅠ
📄 Tasks
📷 Screenshot
Summary by CodeRabbit