[fix] 편지 푸시에 웹뷰 라우팅 정보 추가 - #1940
Conversation
답장·전체 발행 푸시 payload에 type과 letterId만 있어 앱의 NAVIGATE_WEBVIEW 분기에 걸리지 않았다. 알림을 탭해도 편지 상세로 가지 못하고 앱 홈만 열린다. action과 path를 추가한다. path는 프론트 라우트 (/feedback/letters/:letterId)와 정확히 같아야 웹뷰가 매칭한다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 32 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Warning
|
Test Results349 tests 349 ✅ 37s ⏱️ Results for commit 1c44119. |
문제
답장 푸시를 탭해도 편지 상세로 가지 못하고 앱 홈만 열립니다.
앱은
hooks/use-fcm.ts:34에서data.action === 'NAVIGATE_WEBVIEW'하나로만 분기하는데,FeedbackAdminService가 싣는 건type과letterId뿐이라 이 분기에 걸리지 않습니다. 구독 알림에서 정한 규약(ClubNotificationPayloadFactory— path/action/clubId)을 우체통이 따르지 않은 결과입니다.전체 발행 편지 푸시(
sendBroadcastPush)도 같은 문제가 있어 함께 고칩니다.변경
답장·전체 발행 양쪽이 같은 데이터를 만들어야 해서
letterNavigationData(pushType, letter)하나로 묶었습니다.type만 다르고 나머지 세 필드는 동일합니다.action은 리터럴 대신FcmAction.NAVIGATE_WEBVIEW.name()을 씁니다 —ClubNotificationPayloadFactory와 같은 방식이고, enum이 바뀌면 컴파일에서 잡힙니다. 나가는 문자열은 동일합니다.경로가 왜 이 형태인지
/feedback/letters/{letterId}— 복수형이고/webview접두사가 없습니다. 프론트 라우트와 대조했습니다:앱은
clubDetail이 아닌 path를 범용 웹뷰로 넘기고(use-fcm.ts),app/webview/[slug].tsx:73이${webviewUrl}${path}로 웹 주소 뒤에 그대로 이어붙입니다. 그래서 웹 라우트와 글자 단위로 같아야 하고, 단수(letter)로 넣으면 매칭에 실패해 빈 화면이 뜹니다.구독 알림의
/webview/clubDetail/{clubId}는 네이티브 동아리 상세로 빠지는 특수 분기 전용이라 우체통에는 해당하지 않습니다. 이 점을 경로 상수 주석에 남겼습니다 — 다음 사람이 구독 알림에 맞추려다 되돌리는 게 재발 경로라서요./feedback/sent/:feedbackId(내가 보낸 편지)와 헷갈릴 여지가 있는데, 백엔드가 싣는 건 받은 편지 id(letter.getId())라/feedback/letters/가 맞습니다.테스트
기존 payload 검증 두 곳에
action/path단언을 추가했습니다 — 답장 푸시(TokenPushPayload), 전체 발행 푸시(FcmAdminBatchSendRequest). 오타나 단수형 회귀가 테스트에서 걸립니다../gradlew test --tests "moadong.feedback.service.FeedbackAdminServiceTest" --rerun-tasks→ BUILD SUCCESSFUL앱·프론트 수정 불필요
기존
NAVIGATE_WEBVIEW분기가 그대로 처리합니다. 앱 재릴리즈도 필요 없습니다.확인 방법
운영 포털에서 답장을 발행한 뒤 기기에서 푸시를 탭했을 때 받은 편지 상세가 열리면 성공입니다.