-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/115 일대일 채팅방 정보 조회 및 처리 로직 #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "feat/115-\uC77C\uB300\uC77C-\uCC44\uD305\uBC29-\uC815\uBCF4-\uC870\uD68C-\uBC0F-\uCC98\uB9AC-\uB85C\uC9C1"
Conversation
…lient into feat/115-일대일-채팅방-정보-조회-및-처리-로직
- 프로필 이미지 정렬 및 사용자 이름 최대 너비 조정
- 파티 수정 화면 및 사진 업로드/검증 로직 버그 수정 - 카카오 API 기반 장소 검색 컴포넌트 동작 오류 수정 - 파티 검색 무한 스크롤 및 최근 검색어 처리 개선 - (app) prefix 라우팅 누락 및 경로 오류 수정 - 로그인/회원가입 이동 및 뒤로가기 네비게이션 문제 수정 - 전반적인 네비게이션 및 상태 관리 로직 정리
…lient into feat/115-일대일-채팅방-정보-조회-및-처리-로직
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements comprehensive chat room information retrieval and handling logic for both one-to-one and group chats. It introduces new type definitions, API endpoints, query hooks, and UI components to manage different chat room states and participant interactions.
Changes:
- Added type definitions for chat room schemas (one-to-one and group chat details)
- Implemented API endpoints and React Query hooks for chat room detail retrieval
- Created ChatRoomStatusHandler component to conditionally render UI based on chat state
- Refactored route paths to use
(app)group structure for better organization - Updated store logic for party editing with improved state management pattern
Reviewed changes
Copilot reviewed 44 out of 54 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| types/chat.types.ts | Added new type definitions for chat schemas, removed isMine field from messages |
| types/party.types.ts | Changed distanceKm from number to string type |
| api/chatApi.ts | Added endpoints for fetching one-to-one and group chat room details |
| api/partyApi.ts | Added party approval/rejection/completion/settlement endpoints |
| api/urls.ts | Added new endpoint definitions for chat and party operations |
| api/axios.ts | Enhanced error handling in interceptors, removed withCredentials |
| hooks/queries/useChatRoom.ts | Added query hooks for fetching chat room details |
| hooks/mutations/useChat.ts | New file with mutations for party operations from chat context |
| hooks/mutations/useParty.ts | Updated navigation path to use (app) group |
| stores/editPartyStore.ts | Refactored with originalInfo pattern and improved location handling |
| stores/creatingPartyStore.ts | Updated location handling to support null values |
| stores/authStore.ts | Updated logout redirect path |
| components/chat/* | Multiple chat components updated to support new chat detail schemas |
| app/(app)/* | Route structure reorganized under (app) group |
| package.json | Version bumped from 0.4.0 to 0.9.0 |
| package-lock.json | lockfileVersion changed from 4 to 9 |
Files not reviewed (1)
- TinyBite/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return useMutation({ | ||
| mutationFn: async () => { | ||
| if (!partyId || !participantId) { | ||
| throw new Error("필수 파라미터 누락: approve join party"); |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message '필수 파라미터 누락: approve join party' is misleading in the useRejectJoinPartyMutation function. It should say 'reject join party' instead of 'approve join party' to accurately reflect the operation being performed.
| return useMutation({ | ||
| mutationFn: async () => { | ||
| if (!partyId) { | ||
| throw new Error("필수 파라미터 누락: approve join party"); |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message '필수 파라미터 누락: approve join party' is misleading in the useCompletePartyMutation function. It should say 'complete party' instead of 'approve join party' to accurately reflect the operation being performed.
| return useMutation({ | ||
| mutationFn: async () => { | ||
| if (!partyId) { | ||
| throw new Error("필수 파라미터 누락: approve join party"); |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message '필수 파라미터 누락: approve join party' is misleading in the useSettlePartyMutation function. It should say 'settle party' instead of 'approve join party' to accurately reflect the operation being performed.
| // queryClient.invalidateQueries({ | ||
| // queryKey: ["getOnetoOneRoomDetail", chatroomId], | ||
| // }); | ||
| queryClient.invalidateQueries(); |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commented-out specific query invalidation suggests uncertainty about the correct approach. Using queryClient.invalidateQueries() without arguments invalidates all queries, which can cause unnecessary refetches and performance issues. Consider uncommenting the specific invalidation or removing the commented code if the broad invalidation is intentional.
| } | ||
|
|
||
| // 예상치 못한 status | ||
| alert(`HOST에게 예상치 못한 status: ${participantStatus}`); |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using alert() for error handling in React Native is not recommended as it's a blocking operation. Consider using a Toast notification or a proper error modal component that's consistent with the app's design system.
| } | ||
|
|
||
| // 예상치 못한 status | ||
| alert(`PARTICIPANT에게 예상치 못한 status: ${participantStatus}`); |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using alert() for error handling in React Native is not recommended as it's a blocking operation. Consider using a Toast notification or a proper error modal component that's consistent with the app's design system.
| } | ||
|
|
||
| // 예상치 못한 status | ||
| alert(`HOST에게 예상치 못한 status: ${chatDetail.status}`); |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using alert() for error handling in React Native is not recommended as it's a blocking operation. Consider using a Toast notification or a proper error modal component that's consistent with the app's design system.
| } | ||
|
|
||
| // 예상치 못한 participantType | ||
| alert(`예상치 못한 participantType: ${chatDetail.participantType}`); |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using alert() for error handling in React Native is not recommended as it's a blocking operation. Consider using a Toast notification or a proper error modal component that's consistent with the app's design system.
| } | ||
|
|
||
| // 예상치 못한 participantType | ||
| alert(`예상치 못한 participantType: ${participantType}`); |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using alert() for error handling in React Native is not recommended as it's a blocking operation. Consider using a Toast notification or a proper error modal component that's consistent with the app's design system.
| /** | ||
| * 채팅방 참여자 타입 | ||
| */ | ||
| export type participantType = "HOST" | "PARTICIPANT"; |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type name 'participantType' does not follow TypeScript naming conventions. Type names should be PascalCase. Rename to 'ParticipantType' for consistency with other type definitions in this file.
⚙️ Related ISSUE Number
#115
📄 Work Description
PR 작업 내용
1. 채팅 API 및 기능 구현
1.1 채팅 API 추가 (
api/chatApi.ts,api/urls.ts)1.2 채팅 탭 화면 개편 (
app/chat.tsx)1.3 채팅방 화면 리팩토링 (
app/chat/[id].tsx)2. 파티 관리 API 구현
2.1 파티 관리 API 추가 (
api/partyApi.ts,api/urls.ts)2.2 위치 기반 파티 조회 기능 (
api/partyApi.ts)3. 인증 에러 처리 개선
3.1 Axios Interceptor 강화 (
api/axios.ts)4. UI/UX 개선
4.1 파티 생성/수정 네비게이션 수정 (
app/party/create/[type].tsx)5. 프로젝트 구조 변경
5.1 라우팅 구조 개편
5.2 버전 업데이트 (
app.config.js)파일별 변경 요약
api/chatApi.tsapi/partyApi.tsapi/urls.tsapi/axios.tsapp/chat.tsxapp/chat/[id].tsxapp/party-detail/[id].tsxapp/party/create/[type].tsxapp.config.js이 PR은 채팅 기능 전체 구현, 파티 관리 기능 강화, 안정성 개선을 포함하는 대규모 업데이트입니다.
📷 Screenshot
💬 To Reviewers
🔗 Reference