Skip to content

[fix] 편지 푸시에 웹뷰 라우팅 정보 추가 - #1940

Merged
seongwon030 merged 1 commit into
develop/befrom
add-reply-push-routing
Aug 19, 2026
Merged

[fix] 편지 푸시에 웹뷰 라우팅 정보 추가#1940
seongwon030 merged 1 commit into
develop/befrom
add-reply-push-routing

Conversation

@seongwon030

@seongwon030 seongwon030 commented Aug 19, 2026

Copy link
Copy Markdown
Member

문제

답장 푸시를 탭해도 편지 상세로 가지 못하고 앱 홈만 열립니다.

앱은 hooks/use-fcm.ts:34에서 data.action === 'NAVIGATE_WEBVIEW' 하나로만 분기하는데, FeedbackAdminService가 싣는 건 typeletterId뿐이라 이 분기에 걸리지 않습니다. 구독 알림에서 정한 규약(ClubNotificationPayloadFactory — path/action/clubId)을 우체통이 따르지 않은 결과입니다.

전체 발행 편지 푸시(sendBroadcastPush)도 같은 문제가 있어 함께 고칩니다.

변경

답장·전체 발행 양쪽이 같은 데이터를 만들어야 해서 letterNavigationData(pushType, letter) 하나로 묶었습니다. type만 다르고 나머지 세 필드는 동일합니다.

private Map<String, String> letterNavigationData(String pushType, Letter letter) {
    return Map.of(
            "type", pushType,
            "letterId", letter.getId(),
            "action", FcmAction.NAVIGATE_WEBVIEW.name(),
            "path", LETTER_DETAIL_PATH_PREFIX + letter.getId()   // "/feedback/letters/"
    );
}

action은 리터럴 대신 FcmAction.NAVIGATE_WEBVIEW.name()을 씁니다 — ClubNotificationPayloadFactory와 같은 방식이고, enum이 바뀌면 컴파일에서 잡힙니다. 나가는 문자열은 동일합니다.

경로가 왜 이 형태인지

/feedback/letters/{letterId}복수형이고 /webview 접두사가 없습니다. 프론트 라우트와 대조했습니다:

origin/develop-fe:frontend/src/routes/AppRoutes.tsx:196:      path: '/feedback/letters/:letterId',
origin/develop-fe:frontend/src/pages/FeedbackPage/FeedbackListPage.tsx:133:  navigate(`/feedback/letters/${letterId}`);

앱은 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 분기가 그대로 처리합니다. 앱 재릴리즈도 필요 없습니다.

확인 방법

운영 포털에서 답장을 발행한 뒤 기기에서 푸시를 탭했을 때 받은 편지 상세가 열리면 성공입니다.

답장·전체 발행 푸시 payload에 type과 letterId만 있어 앱의
NAVIGATE_WEBVIEW 분기에 걸리지 않았다. 알림을 탭해도 편지 상세로
가지 못하고 앱 홈만 열린다.

action과 path를 추가한다. path는 프론트 라우트
(/feedback/letters/:letterId)와 정확히 같아야 웹뷰가 매칭한다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
moadong Ready Ready Preview Aug 19, 2026 12:36pm

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@seongwon030, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 71f29ac9-6e75-4b73-a031-f478e8bb9108

📥 Commits

Reviewing files that changed from the base of the PR and between d2fd75a and 1c44119.

📒 Files selected for processing (2)
  • backend/src/main/java/moadong/feedback/service/FeedbackAdminService.java
  • backend/src/test/java/moadong/feedback/service/FeedbackAdminServiceTest.java

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@seongwon030 seongwon030 changed the title fix(feedback): 편지 푸시에 웹뷰 라우팅 정보 추가 [fix] 편지 푸시에 웹뷰 라우팅 정보 추가 Aug 19, 2026
@seongwon030 seongwon030 added 💾 BE Backend 🛠Fix 기능이 의도한 대로 동작하지 않는 버그를 수정 labels Aug 19, 2026
@github-actions

Copy link
Copy Markdown

Test Results

349 tests   349 ✅  37s ⏱️
 59 suites    0 💤
 59 files      0 ❌

Results for commit 1c44119.

@seongwon030
seongwon030 merged commit d089495 into develop/be Aug 19, 2026
5 checks passed
@seongwon030
seongwon030 deleted the add-reply-push-routing branch August 19, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💾 BE Backend 🛠Fix 기능이 의도한 대로 동작하지 않는 버그를 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant