[fix] PromotionClubCTA 웹뷰 네비게이션 동작 수정#1578
Conversation
- postMessageToApp: ReactNativeWebView 미주입 시 false 반환 누락 수정 - PromotionClubCTA: bridge 실패 시 navigate() fallback 추가 - 웹/웹뷰 경로 clubId 기반으로 통일
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Warning
|
| Layer / File(s) | Summary |
|---|---|
웹뷰 브릿지 미주입 감지 및 반환값 수정 frontend/src/utils/webviewBridge.ts |
postMessageToApp에서 ReactNativeWebView 존재 여부를 명시적으로 확인하는 가드를 추가하고, 브릿지 미주입 시 false를 반환하도록 동작을 명확히 합니다. 옵셔널 체이닝 대신 직접 호출로 변경하여 브릿지 부재 상황을 정확히 감지합니다. |
PromotionClubCTA 라우팅 통일 및 폴백 로직 frontend/src/pages/PromotionPage/components/detail/PromotionClubCTA/PromotionClubCTA.tsx |
useNavigate 훅을 추가하고, handleNavigate에서 웹뷰의 requestNavigateWebview 성공 여부를 확인하여 실패 시 navigate('/clubDetail/${clubId}')로 폴백합니다. 모든 환경에서 clubId 기반 경로를 사용하도록 통일하여 clubName 기반 경로를 제거합니다. |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related issues
#1577: PR의 모든 변경 사항(postMessageToApp 브릿지 미주입 감지, PromotionClubCTA 폴백 추가, clubId 경로 통일)이 해당 이슈의 체크리스트와 정확히 일치합니다.
Possibly related PRs
- Moadong/moadong#1114: 메인 PR의 PromotionClubCTA가
/clubDetail/${clubId}경로로 라우팅하도록 변경하는 점이 해당 PR에서 정의한/clubDetail/:clubId라우트와 직접 연결됩니다. - Moadong/moadong#1500: 메인 PR의 PromotionClubCTA 내비게이션 변경 및 webviewBridge 브릿지 체크 로직이 해당 PR의
requestNavigateWebview호출 경로와 webviewBridge 확장 작업과 같은 코드 흐름에서 만납니다. - Moadong/moadong#1507: 메인 PR의 PromotionClubCTA가
requestNavigateWebview기반 네비게이션과 폴백 로직을 구현하는 점이 해당 PR의 내부 경로 위임 방식과 일치합니다.
Suggested labels
💻 FE, 🛠Fix
Suggested reviewers
- suhyun113
- oesnuj
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | PR 제목은 변경의 핵심 내용인 PromotionClubCTA 웹뷰 네비게이션 동작 수정을 명확하게 요약하고 있습니다. |
| Linked Issues check | ✅ Passed | 모든 연결된 이슈의 요구사항이 충족되었습니다: postMessageToApp false 반환 수정, PromotionClubCTA fallback 네비게이션 추가, clubId 기반 경로 통일이 모두 구현되었습니다. |
| Out of Scope Changes check | ✅ Passed | 모든 변경사항이 연결된 이슈 #1577의 목표와 직접적으로 관련되어 있으며, 범위를 벗어난 변경이 없습니다. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
fix/#1577-promotion-club-cta-webview-nav-MOA-886
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 @coderabbitai help to get the list of available commands and usage tips.
✅ UI 변경사항 없음
전체 57개 스토리 · 22개 컴포넌트 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
frontend/src/utils/webviewBridge.ts (1)
47-65:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPrettier CI 실패를 먼저 해소해주세요.
현재 이 변경 구간이 포함된 파일에서 포맷팅 체크가 실패해 머지 게이트가 막혀 있습니다.
npx prettier --write "src/utils/webviewBridge.ts"(또는 저장소 기준 경로) 적용 후 다시 푸시해 주세요.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/src/utils/webviewBridge.ts` around lines 47 - 65, Prettier formatting failed for this file; run the formatter and commit the changes: run npx prettier --write "src/utils/webviewBridge.ts" (or your repo root pattern), stage and commit the resulting edits, and push; ensure the function postMessageToApp remains unchanged in logic (preserve isInAppWebView(), window.ReactNativeWebView checks, and JSON.stringify(message) call) while only fixing whitespace/formatting so CI Prettier check passes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@frontend/src/utils/webviewBridge.ts`:
- Around line 47-65: Prettier formatting failed for this file; run the formatter
and commit the changes: run npx prettier --write "src/utils/webviewBridge.ts"
(or your repo root pattern), stage and commit the resulting edits, and push;
ensure the function postMessageToApp remains unchanged in logic (preserve
isInAppWebView(), window.ReactNativeWebView checks, and JSON.stringify(message)
call) while only fixing whitespace/formatting so CI Prettier check passes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7e6b6ba6-f54d-4b90-bf68-bfa925cd96c2
📒 Files selected for processing (2)
frontend/src/pages/PromotionPage/components/detail/PromotionClubCTA/PromotionClubCTA.tsxfrontend/src/utils/webviewBridge.ts
suhyun113
left a comment
There was a problem hiding this comment.
버그 원인이 궁금했는데 빠르게 찾아서 수정해주셨네요!
앱 연결이 안 됐을 때 성공으로 잘못 처리되던 문제가 있었네요. fallback 처리도 깔끔한 것 같아요
수고하셨서여!
| handleLink(`/clubDetail/@${encodeURIComponent(clubName)}`); | ||
| handleLink(`/clubDetail/${clubId}`); |
There was a problem hiding this comment.
웹/웹뷰 통일이라는 의도는 이해가 되는데, 현재 동아리 상세페이지에서는 @${clubName}을 사용하고 있어 일관성을 고려했을때 홍보페이지에서 동아리 상세로 이동할때도 clubId로 바뀌는 것보다는 clubName을 사용하는게 좋지 않을까요?
Summary
postMessageToApp:ReactNativeWebView미주입 시true반환하던 버그 수정 →false반환으로 수정PromotionClubCTA: bridge 실패 시navigate('/clubDetail/:id')fallback 추가clubId기반으로 통일 (clubName기반 제거)Test plan
Closes #1577
Summary by CodeRabbit
릴리스 노트