Skip to content

[feature] 총동연 페이지 방문 및 체류시간을 로깅한다#682

Merged
Zepelown merged 1 commit intodevelop-fefrom
feature/#680-club-union-page-duration-MOA-171
Aug 19, 2025
Merged

[feature] 총동연 페이지 방문 및 체류시간을 로깅한다#682
Zepelown merged 1 commit intodevelop-fefrom
feature/#680-club-union-page-duration-MOA-171

Conversation

@seongwon030
Copy link
Member

@seongwon030 seongwon030 commented Aug 19, 2025

#️⃣연관된 이슈

ex) #682

📝작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지/동영상 첨부 가능)

  • useTrackPageView로 총동연 페이지 방문, 체류시간을 로깅합니다.

중점적으로 리뷰받고 싶은 부분(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

논의하고 싶은 부분(선택)

논의하고 싶은 부분이 있다면 작성해주세요.

🫡 참고사항

Summary by CodeRabbit

  • Chores
    • ClubUnionPage에 페이지 뷰 추적을 추가하여 분석 지표 수집을 개선했습니다. 사용자에게 보이는 기능 변화는 없습니다.

@vercel
Copy link

vercel bot commented Aug 19, 2025

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

Project Deployment Preview Comments Updated (UTC)
moadong Ready Ready Preview Comment Aug 19, 2025 7:21am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 19, 2025

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.
  • 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

ClubUnionPage에 페이지 뷰/체류시간 추적을 위해 useTrackPageView 훅을 임포트하고 컴포넌트 본문에서 useTrackPageView('ClubUnionPage')를 호출하도록 수정되었습니다. 렌더링 구조나 공개 API 변경은 없습니다.

Changes

Cohort / File(s) Summary of Changes
Analytics tracking integration
frontend/src/pages/ClubUnionPage/ClubUnionPage.tsx
useTrackPageView 훅 임포트 및 컴포넌트 내 호출 추가로 페이지 체류시간 추적 시작

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor User
    participant Page as ClubUnionPage
    participant Hook as useTrackPageView
    participant Analytics as AnalyticsService

    User->>Page: 페이지 진입/마운트
    activate Page
    Note over Page,Hook: 페이지 초기화 시 추적 훅 호출
    Page->>Hook: useTrackPageView("ClubUnionPage")
    activate Hook
    Hook->>Analytics: 페이지 진입 이벤트/타이머 시작
    deactivate Hook

    User-->>Page: 페이지 체류
    Note over Hook,Analytics: 언마운트 시 체류시간 계산/전송
    Page-->>Hook: 언마운트 트리거
    Hook->>Analytics: 체류시간 보고
    deactivate Page
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Assessment against linked issues

Objective Addressed Explanation
체류시간을 useTrackPageView로 측정한다 (MOA-171)

Assessment against linked issues: Out-of-scope changes

(해당 없음)

Possibly related issues

Possibly related PRs

Suggested reviewers

  • oesnuj

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/#680-club-union-page-duration-MOA-171

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
frontend/src/pages/ClubUnionPage/ClubUnionPage.tsx (1)

9-9: 페이지명 문자열 하드코딩 대신 상수/enum으로 추상화 제안

타이포/명명 변경 시 추적 이벤트가 분산되는 것을 방지하기 위해 페이지명을 상수(또는 공용 enum)로 관리하는 편이 안전합니다. 프로젝트 전반에서 동일 훅 사용 시 네이밍 컨벤션도 일관화해 두면 좋습니다. 또한, React 18 StrictMode(개발환경)에서 mount/unmount가 두 번 호출되며 중복 로깅이 발생할 수 있으니, 훅 내부에 중복 방어 로직(예: ref/visibilityState/once-flag 등)이 있는지도 확인 부탁드립니다.

적용 예:

-  useTrackPageView('ClubUnionPage');
+  useTrackPageView(PAGE_NAME);

추가(파일 상단 import 아래):

// 페이지명 상수 (가능하다면 공용 Analytics/PageName enum으로 대체 권장)
const PAGE_NAME = 'ClubUnionPage' as const;
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6835258 and 29bcef8.

📒 Files selected for processing (1)
  • frontend/src/pages/ClubUnionPage/ClubUnionPage.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
frontend/**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (frontend/.cursorrules)

frontend/**/*.{ts,tsx}: Replace magic numbers with named constants for clarity.
Replace complex or nested ternary operators with if/else statements or IIFEs for readability.
Assign complex boolean conditions to named variables.
Use consistent return types for similar functions and hooks.
Avoid hidden side effects; functions should only perform actions implied by their signature (Single Responsibility Principle).
Use unique, descriptive names for custom wrappers and functions to avoid ambiguity.
Define constants near related logic or ensure names link them clearly.

Files:

  • frontend/src/pages/ClubUnionPage/ClubUnionPage.tsx
frontend/**/*.tsx

📄 CodeRabbit Inference Engine (frontend/.cursorrules)

frontend/**/*.tsx: Abstract complex logic/interactions into dedicated components or higher-order components (HOCs).
Separate significantly different conditional UI/logic into distinct components.
Colocate simple, localized logic or use inline definitions to reduce context switching.
Choose field-level or form-level cohesion based on form requirements.
Break down broad state management into smaller, focused hooks or contexts.
Use component composition instead of props drilling.

Files:

  • frontend/src/pages/ClubUnionPage/ClubUnionPage.tsx
🧠 Learnings (1)
📓 Common learnings
Learnt from: seongwon030
PR: Moadong/moadong#195
File: frontend/src/pages/AdminPage/AdminPage.tsx:7-7
Timestamp: 2025-03-19T05:18:07.818Z
Learning: AdminPage.tsx에서 현재 하드코딩된 클럽 ID('67d2e3b9b15c136c6acbf20b')는 로그인 기능 구현 후 동적으로 가져오는 방식으로 수정될 예정입니다.
🔇 Additional comments (1)
frontend/src/pages/ClubUnionPage/ClubUnionPage.tsx (1)

3-3: useTrackPageView: default export 확인 완료

  • frontend/src/hooks/useTrackPageView.ts 45행에 export default useTrackPageView;로 default export가 정의되어 있습니다.
  • 따라서 import useTrackPageView from '@/hooks/useTrackPageView'; 구문은 올바르며 변경이 필요 없습니다.

@seongwon030 seongwon030 linked an issue Aug 19, 2025 that may be closed by this pull request
1 task
Copy link
Contributor

@lepitaaar lepitaaar left a comment

Choose a reason for hiding this comment

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

믹스패널 추가좋습니다~

Copy link
Member

@Zepelown Zepelown left a comment

Choose a reason for hiding this comment

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

고생하셨습니다~

@Zepelown Zepelown merged commit 1589b13 into develop-fe Aug 19, 2025
5 checks passed
@lepitaaar lepitaaar deleted the feature/#680-club-union-page-duration-MOA-171 branch October 21, 2025 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FE Frontend ✨ Feature 기능 개발

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] MOA-171 총동연 페이지 체류시간을 측정한다

3 participants

Comments