Skip to content

[fix] PromotionClubCTA 웹뷰 네비게이션 동작 수정#1578

Open
seongwon030 wants to merge 2 commits into
develop-fefrom
fix/#1577-promotion-club-cta-webview-nav-MOA-886
Open

[fix] PromotionClubCTA 웹뷰 네비게이션 동작 수정#1578
seongwon030 wants to merge 2 commits into
develop-fefrom
fix/#1577-promotion-club-cta-webview-nav-MOA-886

Conversation

@seongwon030
Copy link
Copy Markdown
Member

@seongwon030 seongwon030 commented May 19, 2026

Summary

  • postMessageToApp: ReactNativeWebView 미주입 시 true 반환하던 버그 수정 → false 반환으로 수정
  • PromotionClubCTA: bridge 실패 시 navigate('/clubDetail/:id') fallback 추가
  • 웹/웹뷰 경로 모두 clubId 기반으로 통일 (clubName 기반 제거)

Test plan

  • 앱 웹뷰에서 홍보 페이지 → "동아리 정보 보러가기" 클릭 시 동아리 상세 페이지 이동 확인
  • bridge 미주입 환경(인앱 브라우저 등)에서 fallback으로 SPA 내 이동 확인
  • 일반 웹 브라우저에서 정상 동작 확인

Closes #1577

Summary by CodeRabbit

릴리스 노트

  • 버그 수정
    • 동아리 상세 페이지 접근 시 웹 환경에서 더 안정적인 라우팅 처리로 개선
    • 웹뷰 환경에서 네비게이션 실패 시 자동 폴백 로직 추가로 사용성 향상
    • 브릿지 감지 로직 정확성 개선으로 네비게이션 신뢰성 강화

Review Change Stack

- postMessageToApp: ReactNativeWebView 미주입 시 false 반환 누락 수정
- PromotionClubCTA: bridge 실패 시 navigate() fallback 추가
- 웹/웹뷰 경로 clubId 기반으로 통일
@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

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

Project Deployment Actions Updated (UTC)
moadong Ready Ready Preview, Comment May 19, 2026 2:57am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Warning

Rate limit exceeded

@seongwon030 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 12 seconds before requesting another review.

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

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cf9e8bea-7cf4-4f1e-81ba-69d8784e2fd1

📥 Commits

Reviewing files that changed from the base of the PR and between 59af3f5 and b3c8782.

📒 Files selected for processing (1)
  • frontend/src/utils/webviewBridge.ts

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. Received: "**" 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

Walkthrough

동아리 CTA 클릭 시 웹뷰 환경에서 브릿지 미주입 상황을 안전하게 처리합니다. webviewBridge의 postMessageToApp이 ReactNativeWebView 부재 시 명확히 false를 반환하도록 수정하고, PromotionClubCTA는 clubName 기반 경로를 clubId 기반으로 통일하며, 웹뷰 브릿지 실패 시 SPA 네비게이션으로 폴백합니다.

Changes

웹뷰 내비게이션 안정화

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@seongwon030 seongwon030 added 💻 FE Frontend 🛠Fix 기능이 의도한 대로 동작하지 않는 버그를 수정 labels May 19, 2026
@seongwon030 seongwon030 changed the title fix(webview): PromotionClubCTA 웹뷰 네비게이션 동작 수정 [fix] PromotionClubCTA 웹뷰 네비게이션 동작 수정 May 19, 2026
@seongwon030 seongwon030 requested a review from suhyun113 May 19, 2026 02:54
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2026

✅ UI 변경사항 없음

구분 링크
📖 Storybook https://67904e61c16daa99a63b44a7-cnwxrapdzu.chromatic.com/

전체 57개 스토리 · 22개 컴포넌트

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Prettier 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

📥 Commits

Reviewing files that changed from the base of the PR and between 158a9b1 and 59af3f5.

📒 Files selected for processing (2)
  • frontend/src/pages/PromotionPage/components/detail/PromotionClubCTA/PromotionClubCTA.tsx
  • frontend/src/utils/webviewBridge.ts

Copy link
Copy Markdown
Collaborator

@suhyun113 suhyun113 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

버그 원인이 궁금했는데 빠르게 찾아서 수정해주셨네요!
앱 연결이 안 됐을 때 성공으로 잘못 처리되던 문제가 있었네요. fallback 처리도 깔끔한 것 같아요
수고하셨서여!

Comment on lines -28 to +31
handleLink(`/clubDetail/@${encodeURIComponent(clubName)}`);
handleLink(`/clubDetail/${clubId}`);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

웹/웹뷰 통일이라는 의도는 이해가 되는데, 현재 동아리 상세페이지에서는 @${clubName}을 사용하고 있어 일관성을 고려했을때 홍보페이지에서 동아리 상세로 이동할때도 clubId로 바뀌는 것보다는 clubName을 사용하는게 좋지 않을까요?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FE Frontend 🛠Fix 기능이 의도한 대로 동작하지 않는 버그를 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants