[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에서 window.ReactNativeWebView 존재 여부를 명시적으로 확인하고, 브릿지 미주입 시 경고 로그 후 false를 반환하도록 변경했습니다. 브릿지 호출은 옵셔널 체이닝 대신 존재 확인 후 postMessage를 직접 호출하고 실패 시 false를 반환합니다. |
PromotionClubCTA 웹뷰 호출 및 SPA 폴백 frontend/src/pages/PromotionPage/components/detail/PromotionClubCTA/PromotionClubCTA.tsx |
컴포넌트에 useNavigate를 도입하고, 웹뷰 환경에서는 requestNavigateWebview('/club/@{encodeURIComponent(clubName)}')를 호출합니다. 해당 호출 결과가 falsy이면 navigate('/clubDetail/@{encoded}')로 폴백합니다. 웹(일반) 환경은 기존 handleLink('/clubDetail/@{encoded}')를 유지합니다. |
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
- Moadong/moadong#1110: webviewBridge의 postMessage 패턴 변경과 관련된 브리지 사용 흐름에 영향 가능.
- Moadong/moadong#1500:
requestNavigateWebview호출 흐름 및 브리지 사용과 연관. - Moadong/moadong#1507: 웹뷰 네비게이션 위임 및 폴백 로직과 유사한 변경이 포함됨.
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 | PR의 모든 변경 사항이 #1577의 요구사항을 충족합니다: 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 처리도 깔끔한 것 같아요
수고하셨서여!
ClubCard 등 다른 컴포넌트와 일관성을 맞추기 위해 동아리 상세 이동 시 clubId 대신 @clubname 패턴 사용으로 변경 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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/pages/PromotionPage/components/detail/PromotionClubCTA/PromotionClubCTA.tsx (1)
1-48:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winCI 파이프라인에서 Prettier 포맷팅 오류가 발생했습니다.
파이프라인 로그에서 이 파일에 코드 스타일 이슈가 보고되었습니다. 다음 명령어로 수정하세요:
npx prettier --write "src/pages/PromotionPage/components/detail/PromotionClubCTA/PromotionClubCTA.tsx"🤖 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/pages/PromotionPage/components/detail/PromotionClubCTA/PromotionClubCTA.tsx` around lines 1 - 48, This file fails Prettier formatting; run the project's Prettier formatter against the file that defines the PromotionClubCTA component (the component and its handleNavigate, useNavigator, useMixpanelTrack, and ArrowButton usage) and commit the reformatted file so CI passes; ensure you use the repo's Prettier config (for example via npx prettier --write on the file) and re-run the pipeline.
🤖 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/pages/PromotionPage/components/detail/PromotionClubCTA/PromotionClubCTA.tsx`:
- Around line 1-48: This file fails Prettier formatting; run the project's
Prettier formatter against the file that defines the PromotionClubCTA component
(the component and its handleNavigate, useNavigator, useMixpanelTrack, and
ArrowButton usage) and commit the reformatted file so CI passes; ensure you use
the repo's Prettier config (for example via npx prettier --write on the file)
and re-run the pipeline.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e28f4d11-a01c-4e68-b247-d1ea8ce6c59a
📒 Files selected for processing (2)
frontend/src/pages/PromotionPage/components/detail/PromotionClubCTA/PromotionClubCTA.tsxfrontend/src/utils/webviewBridge.ts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
postMessageToApp:ReactNativeWebView미주입 시true반환하던 버그 수정 →false반환으로 수정PromotionClubCTA: bridge 실패 시navigate('/clubDetail/:id')fallback 추가clubId기반으로 통일 (clubName기반 제거)Test plan
Closes #1577
Summary by CodeRabbit
릴리스 노트