Skip to content

dev << main#2114

Merged
ljh0608 merged 14 commits into
developfrom
main
Dec 17, 2025
Merged

dev << main#2114
ljh0608 merged 14 commits into
developfrom
main

Conversation

@ljh0608

@ljh0608 ljh0608 commented Dec 16, 2025

Copy link
Copy Markdown
Contributor

No description provided.

ljh0608 and others added 14 commits December 15, 2025 00:51
hotfix: 웹뷰에서 노션 딥링크 작동안하는 이슈 수정
fix: TL배너 보이도록 테스트 유저 추가
hotfix: isTestUser 케이스에서 TL api 요청하도록 변경
hotfix: 웹뷰 노션스킴 확인을 위한 test 컴포넌트 렌더
fix: 각 네이티브 앱이 변경한 userAgent를 기반으로 웹뷰 감지
fix: userAgent 케이스 모두 지우고 커스텀케이스만 남겨서 test
fix: notion deeplink 앱 test
fix: original Link 마지막 테스트
@ljh0608 ljh0608 requested review from imddoy and seong-hui December 16, 2025 07:53
@ljh0608 ljh0608 self-assigned this Dec 16, 2025
@coderabbitai

coderabbitai Bot commented Dec 16, 2025

Copy link
Copy Markdown

Summary by CodeRabbit

릴리스 노트

  • 버그 수정

    • 웹뷰 환경에서의 딥링크 처리 로직을 개선하였습니다.
    • 웹뷰 감지 메커니즘을 최적화하여 성능을 향상시켰습니다.
  • 기타

    • 테스트 사용자 데이터를 업데이트하였습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

TeamLeaderCard 컴포넌트의 웹뷰 감지 로직을 단순화하고 Notion 딥링크 처리를 최적화했습니다. 웹뷰 감지 결과를 캐싱하고 SOPT 특화 접근 방식을 적용했으며, 테스트 사용자의 Notion URL을 업데이트했습니다.

Changes

Cohort / File(s) 변경 요약
웹뷰 감지 및 딥링크 처리 최적화
src/components/members/main/TeamLeaderCard/index.tsx
웹뷰 감지 로직 단순화 (SOPT-iOS/wv/Chrome 56.0.0.0 Mobile 기반), 감지 결과 캐싱, 웹뷰 환경에서 page.location.href 리다이렉트 추가, 불필요한 boolean 플래그 제거, 디버깅 로직 개선
테스트 사용자 데이터 업데이트
src/pages/members/team-leaders.tsx
테스트 사용자(id 361)의 selfIntroduction 및 competitionData URL을 SOPT 공식 Notion에서 SOPT-makers Notion으로 변경

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • 웹뷰 감지 로직의 단순화와 캐싱 메커니즘 검증
  • Notion 딥링크 리다이렉트 로직의 정확성 확인
  • 테스트 사용자 URL 변경의 유효성 검증

Possibly related PRs

Suggested reviewers

  • seong-hui
  • imddoy

Poem

🐰 웹뷰를 다시 정리하고,
캐시로 빠르게 달리고,
딥링크는 영리하게 처리하네!
SOPT의 길을 따라가며,
코드는 더욱 깔끔해지고... ✨

Pre-merge checks and finishing touches

❌ Failed checks (3 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive PR 제목이 모호하고 의미 있는 정보를 전달하지 못합니다. 'dev << main'은 브랜치 방향만 나타낼 뿐 실제 변경 사항을 설명하지 않습니다. 실제 변경 사항을 반영하는 명확한 제목으로 변경하세요. 예: 'Simplify webview detection and update team leader test data' 또는 'Refactor SOPT webview detection logic'
Description check ❓ Inconclusive PR 설명이 없어서 변경 사항의 의도와 영향 범위를 파악하기 어렵습니다. 웹뷰 감지 로직 단순화, 리다이렉트 동작 변경, 테스트 사용자 데이터 업데이트 등의 변경 사항을 설명하는 PR 설명을 작성하세요.
Linked Issues check ❓ Inconclusive PR 정보에서 연결된 이슈 또는 관련 이슈 번호가 확인되지 않습니다. 해당 PR이 해결하는 이슈 번호를 PR 설명에 포함시키세요. 예: 'Closes #XXXX' 또는 'Related to #XXXX'
✅ Passed checks (2 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed 변경 사항들이 모두 웹뷰 감지 로직 개선 및 테스트 데이터 업데이트로 일관성 있고 범위 내에 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch main

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.

@github-actions

Copy link
Copy Markdown

✨✨ 스토리북으로 확인하기 ✨✨

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4d6d945 and 2a91cb8.

📒 Files selected for processing (2)
  • src/components/members/main/TeamLeaderCard/index.tsx (1 hunks)
  • src/pages/members/team-leaders.tsx (1 hunks)
🧰 Additional context used
🪛 Biome (2.1.2)
src/components/members/main/TeamLeaderCard/index.tsx

[error] 87-87: This hook is being called from a nested function, but all hooks must be called unconditionally from the top-level component.

For React to preserve state between calls, hooks needs to be called unconditionally and always in the same order.
See https://reactjs.org/docs/hooks-rules.html#only-call-hooks-at-the-top-level

(lint/correctness/useHookAtTopLevel)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-app / build
  • GitHub Check: chromatic-deploy
🔇 Additional comments (2)
src/components/members/main/TeamLeaderCard/index.tsx (1)

63-71: SOPT 특화 웹뷰 감지 로직이 적절합니다.

SOPT iOS/Android 앱에 특화된 웹뷰 감지 로직으로 단순화한 것이 적절하며, 웹뷰 환경에서 원본 URL로 리다이렉트하는 처리도 올바릅니다. Line 85의 TODO 코멘트처럼 앱팀과의 협력이 필요한 부분은 추후 개선하시면 됩니다.

Also applies to: 85-89

src/pages/members/team-leaders.tsx (1)

73-74: 테스트 사용자 URL 업데이트가 적절합니다.

테스트 사용자의 Notion URL을 SOPT-makers 페이지로 업데이트한 것은 문제없습니다.

Comment on lines 60 to 78
function useDetectWebView() {
const userAgent = navigator.userAgent;

// iOS 웹뷰 감지
const isIOS = /iPhone|iPad|iPod/.test(userAgent);
const isWebKit = /AppleWebKit/.test(userAgent);
const isSafari = /Safari/.test(userAgent) || /Version\/[\d.]+.*Safari/.test(userAgent); // Safari 또는 Version/{version}.Safari 패턴을 포함하지 않는 경우
const isNotCriOS = !/CriOS/.test(userAgent);
const isNotFxiOS = !/FxiOS/.test(userAgent);
// SOPT-iOS 웹뷰 감지
const isIOSWebView = /SOPT-iOS/.test(navigator.userAgent);

const isIOSWebView = isIOS && isWebKit && isNotCriOS && isNotFxiOS && !isSafari;

// Android 웹뷰 감지
const isAndroid = /Android/.test(userAgent);
const isAndroidWebView = isAndroid && /wv/.test(userAgent);
// SOPT-Android 웹뷰 감지 방법:
// 2. User-Agent에 "wv"가 있으면 웹뷰 (기존 방법)
// 3. User-Agent가 정확히 "Chrome/56.0.0.0 Mobile"이면 앱에서 설정한 값이므로 웹뷰
const hasWvInUserAgent = /wv/.test(userAgent);
const isChrome56Mobile = /Chrome\/56\.0\.0\.0 Mobile/.test(userAgent);
const isAndroidWebView = hasWvInUserAgent || isChrome56Mobile;

return {
isWebView: isIOSWebView || isAndroidWebView,
isIOSWebView,
isAndroidWebView,
isIOS,
isAndroid,
};
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

함수 이름을 detectWebView로 변경하세요.

use로 시작하는 함수명은 React Hook 규칙을 따라야 하지만, 이 함수는 Hook을 사용하지 않고 중첩 함수 내부(line 83)에서 호출되므로 Rules of Hooks를 위반합니다. 정적 분석 도구가 정확하게 이를 감지했습니다.

다음 diff를 적용하여 함수명을 수정하세요:

-  function useDetectWebView() {
+  function detectWebView() {
     const userAgent = navigator.userAgent;
 
     // SOPT-iOS 웹뷰 감지

그리고 line 83에서 호출 부분도 수정하세요:

-    const webViewInfo = useDetectWebView();
+    const webViewInfo = detectWebView();

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/components/members/main/TeamLeaderCard/index.tsx around lines 60 to 78,
the function useDetectWebView should be renamed to detectWebView because it does
not use React hooks and its current name starting with "use" violates Rules of
Hooks; rename the function to detectWebView and update its call site at line 83
accordingly (change useDetectWebView() to detectWebView()), keeping the
implementation and returned object identical so behavior remains the same.

@github-actions

Copy link
Copy Markdown

🚀 프리뷰 배포 확인하기 🚀

https://31d96074.sopt-internal-dev.pages.dev

@ljh0608 ljh0608 merged commit ac26de7 into develop Dec 17, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant