[Fix] #85 바텀시트 프로필카드에 필요한 정보 렌더링하도록 수정 - #86
Hidden character warning
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 23 minutes and 19 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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughPR은 채팅 상세 페이지의 프로필 카드 렌더링을 개선하기 위해 사용자 프로필 데이터를 통합합니다. 라이프스타일 라벨 상수를 재-export하고, 채팅 상세 훅에서 파트너 프로필을 조회하여 프로필 이미지, 연령, 학과, 생활습관 태그를 매핑하며, 초대 시트 컴포넌트를 업데이트하여 데이터를 렌더링하고, 채팅 목록 페이지의 레이아웃을 조정합니다. ChangesChat Detail Profile Data and Rendering
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
✅ CI 검증 결과✅ TypeScript: 통과 🎉 모든 검증을 통과했습니다. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/features/chat/hooks/useChatDetailPage.ts (1)
127-127: ⚡ Quick win
?? 0로 인한 잘못된 요청 가능성은 낮음 (useUserProfile 내부 enabled 가드 있음).
useUserProfile은enabled: !!userId로userId=0일 때 쿼리 실행을 막습니다. 다만queryKey는profile(0)로 잡힐 수 있어(실행은 안 되더라도) 더 깔끔하게 하려면baseChatDetail?.id가 있을 때만 값 전달/쿼리키 설계 개선을 권장합니다.🤖 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 `@src/features/chat/hooks/useChatDetailPage.ts` at line 127, The code passes 0 via "?? 0" to useUserProfile which can produce an unwanted queryKey like "profile(0)"; change the call to pass undefined when there's no id (e.g. useUserProfile(baseChatDetail?.id) or baseChatDetail?.id ?? undefined) and/or update useUserProfile's queryKey construction to only include the userId when it's defined (ensure useUserProfile and its queryKey check for undefined and keep enabled: !!userId as-is). This ensures no spurious profile(0) queryKey while keeping the enabled guard intact.
🤖 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.
Inline comments:
In `@src/features/chat/hooks/useChatDetailPage.ts`:
- Line 147: Remove the debug console.log in useChatDetailPage that prints
user-identifying data (the line logging age, department, profileImage,
lifestyleTags); either delete it or replace with a safe, non-production-only
logging mechanism (e.g., guard with NODE_ENV !== 'production' and redact PII) so
no personal data is emitted to production logs. Ensure the modification targets
the console.log("[useChatDetailPage]", { age, department, profileImage,
lifestyleTags }) statement inside the useChatDetailPage hook.
---
Nitpick comments:
In `@src/features/chat/hooks/useChatDetailPage.ts`:
- Line 127: The code passes 0 via "?? 0" to useUserProfile which can produce an
unwanted queryKey like "profile(0)"; change the call to pass undefined when
there's no id (e.g. useUserProfile(baseChatDetail?.id) or baseChatDetail?.id ??
undefined) and/or update useUserProfile's queryKey construction to only include
the userId when it's defined (ensure useUserProfile and its queryKey check for
undefined and keep enabled: !!userId as-is). This ensures no spurious profile(0)
queryKey while keeping the enabled guard intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 36c975e8-57b6-438f-8c88-d8c3114775db
📒 Files selected for processing (5)
src/features/board/utils/index.tssrc/features/chat/components/chat-detail/ChatRoommateInviteSheet.tsxsrc/features/chat/hooks/useChatDetailPage.tssrc/features/chat/sections/chat-detail/ChatInputSection.tsxsrc/pages/chat/ChatListPage.tsx
✅ CI 검증 결과✅ TypeScript: 통과 🎉 모든 검증을 통과했습니다. |
🗒️ PR 타입
🔗 관련 이슈
📌 작업사항
📸 스크린샷
📣 기타사항 및 코멘트
라이프스타일 태그는 따로 받아오는 곳이 없어서 그냥 프로필 조회 API 쓰고 값만 가공했습니다! 랜덤으로 가져오기엔 너무 변수가 많을 것 같아서 취침시간, 청소 주기, 흡연 여부 3가지 항목만 보이도록 구현했습니다!
✅ 체크리스트
Summary by CodeRabbit
릴리스 노트
New Features
Bug Fixes
Style