Skip to content

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

Merged
seongwon030 merged 4 commits into
develop-fefrom
fix/#1577-promotion-club-cta-webview-nav-MOA-886
May 21, 2026
Merged

[fix] PromotionClubCTA 웹뷰 네비게이션 동작 수정#1578
seongwon030 merged 4 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

릴리스 노트

  • 버그 수정
    • 동아리 CTA 클릭 시 앱 내 웹뷰에서 슬러그 기반 경로로 이동하고, 네비게이션 실패 시 SPA로 자동 폴백되도록 개선
    • 일반 웹 환경의 동작은 기존대로 유지되도록 보장
    • 브릿지 감지 및 메시지 전달 로직을 정확히 판단하도록 수정해 네비게이션 신뢰성 강화

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 21, 2026 8:44am

@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 54 minutes and 9 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: 6e0b5738-f4c5-40a9-9176-24150314df12

📥 Commits

Reviewing files that changed from the base of the PR and between 1a23303 and a94a8d5.

📒 Files selected for processing (1)
  • frontend/src/pages/PromotionPage/components/detail/PromotionClubCTA/PromotionClubCTA.tsx

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

webview 브릿지 존재 여부를 명확히 검사하도록 webviewBridge를 수정하고, PromotionClubCTA는 웹뷰에서 clubName 기반 슬러그로 브릿지를 호출하며 실패 시 SPA로 폴백하도록 변경합니다.

Changes

웹뷰 내비게이션 안정화

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.

❤️ 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-rvmgycsldf.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 처리도 깔끔한 것 같아요
수고하셨서여!

ClubCard 등 다른 컴포넌트와 일관성을 맞추기 위해 동아리 상세 이동 시
clubId 대신 @clubname 패턴 사용으로 변경

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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/pages/PromotionPage/components/detail/PromotionClubCTA/PromotionClubCTA.tsx (1)

1-48: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

CI 파이프라인에서 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

📥 Commits

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

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

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@seongwon030 seongwon030 merged commit d442209 into develop-fe May 21, 2026
6 checks passed
@seongwon030 seongwon030 deleted the fix/#1577-promotion-club-cta-webview-nav-MOA-886 branch May 21, 2026 08:45
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