Skip to content

[feature] 구독 버튼 브라우저 분기 (앱/스토어) #1634

Open
seongwon030 wants to merge 2 commits into
feature/web-shell-migrationfrom
feature/#1625-add-open-app-or-store-MOA-928
Open

[feature] 구독 버튼 브라우저 분기 (앱/스토어) #1634
seongwon030 wants to merge 2 commits into
feature/web-shell-migrationfrom
feature/#1625-add-open-app-or-store-MOA-928

Conversation

@seongwon030
Copy link
Copy Markdown
Member

@seongwon030 seongwon030 commented Jun 1, 2026

요약

바텀 네비 웹뷰 이관(MOA-923)의 일부. 일반 브라우저(비인앱)에서 구독 버튼을 누르면 앱 설치 시 앱으로, 미설치 시 스토어로 유도한다. (구독=푸시는 앱 전용 기능이므로)

변경

  • useOpenApp 훅 신규 — appStoreLink 재사용
    • Android: intent://...;S.browser_fallback_url=<store>;end (OS가 설치여부 자동 분기)
    • iOS: moadongapp:// 스킴 시도 → 2초 내 미실행 시 App Store
    • 데스크톱: 스토어로 바로 이동
  • useWebviewSubscribe.toggleSubscribeisInAppWebView() 분기: 비인앱이면 openApp(), 인앱은 기존 브릿지 토글 유지
  • 카카오 인앱브라우저 전용 useOpenAppFromKakao는 건드리지 않음(별 훅)

- useOpenApp 훅 신규: 앱 설치 시 딥링크 진입, 미설치 시 스토어(Android intent fallback / iOS 스킴+타임아웃)
- useWebviewSubscribe: 비인앱이면 openApp(), 인앱은 기존 구독 토글 유지
- appStoreLink 재사용, 카카오 전용 useOpenAppFromKakao와 분리
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

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

Project Deployment Actions Updated (UTC)
moadong Ready Ready Preview, Comment Jun 1, 2026 2:29pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 1, 2026

Warning

Review limit reached

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

More reviews will be available in 5 minutes and 54 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

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.

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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7c5c7f0a-6053-427a-a79e-d21d6cdf6bb5

📥 Commits

Reviewing files that changed from the base of the PR and between b7439f5 and aa8a7cc.

📒 Files selected for processing (2)
  • frontend/src/hooks/useOpenApp.ts
  • frontend/src/hooks/useWebviewSubscribe.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. 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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/#1625-add-open-app-or-store-MOA-928

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.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new React hook, useOpenApp, which handles opening the mobile application via deep links or redirecting users to the appropriate app store if the app is not installed. It also integrates this hook into useWebviewSubscribe to prompt users in standard web browsers to open the app when attempting to toggle subscriptions. The reviewer provided valuable feedback on useOpenApp to prevent potential memory leaks by properly cleaning up the visibilitychange event listener on unmount, to wrap openApp in useCallback to maintain reference integrity, and to strip leading slashes from the path to avoid malformed triple-slash (///) iOS custom scheme URLs.

Comment thread frontend/src/hooks/useOpenApp.ts Outdated
@seongwon030 seongwon030 changed the title feat: 구독 버튼 브라우저 분기 (앱/스토어) (#1625) [feature] 구독 버튼 브라우저 분기 (앱/스토어) Jun 1, 2026
- visibilitychange 리스너를 ref로 추적해 언마운트/타임아웃 시 정리(메모리 누수 방지)
- openApp을 useCallback으로 감싸 참조 안정성 확보
- iOS 커스텀 스킴 경로 선행 슬래시 제거로 '///' 중복 방지
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant