Conversation
- api endpoint 실제 구조에 맞게 수정 - 타입 실제 구조에 맞게 수정
- api endpoint 실제 구조에 맞게 수정 - 타입 실제 구조에 맞게 수정
- 에러 처리 추가 (토스트) - 리페치 대신 응답을 받아 캐시를 업데이트하도록 변경
- 복잡하게 얽혀있던 타입과 데이터를 CHARACTER_DATA 하나에서 관리하도록 수정 - 타입을 CHARACTER_DATA에서 파생해서 생성하도록 수정
백엔드 응답 타입에 맞추기 위해서 collections에 담아서 사용중이었음 실제로 사용할때는 collections에서 꺼낸 형태로 사용하고 있었기 때문에 불필요하게 감쌌다가 다시 꺼내는 로직과 관련 타입 제거
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 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 |
📝 관련 이슈 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/entities/character/api/character.ts`:
- Around line 8-12: The mapping of axiosInstance.get<CharacterItemsRawResponse>
currently does new Date(item.acquiredAt) which can produce an Invalid Date and
later cause a RangeError when format(acquiredAt, 'yyyy.MM.dd') is called; update
the map in the axiosInstance.get response handling to parse and validate the
date using parseISO(item.acquiredAt) and isValid(...) from date-fns (or
equivalent), only converting to a Date when valid and otherwise setting
acquiredAt to null, keeping the rest of the item spread intact—refer to
axiosInstance.get, CharacterItemsRawResponse, and the acquiredAt property when
making this change.
🪄 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: 22aa1026-9f17-4672-a0ad-57ee8ba46c99
📒 Files selected for processing (12)
src/entities/character/api/character.tssrc/entities/character/config/character.tssrc/entities/character/model/character.type.tssrc/entities/member/api/assignMember.tssrc/entities/member/api/getProfiles.tssrc/entities/member/model/member.type.tssrc/features/character-management/api/useGetCharacterCollection.tssrc/features/character-management/ui/CharacterBottomSheet/index.tsxsrc/features/character-management/ui/CharacterItem/index.tsxsrc/features/join/api/useAssignMember.tssrc/mocks/handlers/character.tssrc/pages/characterShare/CharacterSharePage.tsx
👮 Files not reviewed due to content moderation or server errors (4)
- src/entities/member/model/member.type.ts
- src/entities/member/api/getProfiles.ts
- src/entities/member/api/assignMember.ts
- src/features/join/api/useAssignMember.ts
ongheong
approved these changes
Apr 18, 2026
Contributor
ongheong
left a comment
There was a problem hiding this comment.
코드 확인했습니다~~! 실제 API도 붙어서 이제 전체 플로우 테스트할 날이 머지않았네요. 반영감사합니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💻 작업 내용
실제 API 연결 (mock 제거)
캐릭터 도감 조회 (
GET /collections)/character/collection→/collectionscharacters→collections,isUnlocked제거 →acquiredAt: Date | null로 잠금 여부 판단acquiredAtstring → Date 변환 (Raw 타입 / 변환 타입 분리)모임원 조회 (
GET /groups/{code}/members)paidAtstring → Date 변환을 API 함수에서 처리MemberProfileRaw/MemberProfileRawDataRaw 타입 추가참여자 선택 (
POST /groups/{code}/members/assign)void→MemberProfile(응답으로 받은 멤버 객체 활용)removeQueries→setQueryData교체: 응답 데이터로 캐시를 즉시 갱신해 리패치 없이 반영useMutation→useMutationWithHandlers, 실패 시 toast 표시코드 개선
캐릭터 데이터 통합 (
CHARACTER_DATA)CharacterTypeunion +CHARACTER_IMAGE_SIZE+CHARACTER_DESCRIPTION세 곳을 각각 관리CHARACTER_DATA객체로 통합,CharacterType을keyof typeof CHARACTER_DATA로 파생CHARACTER_DATA한 곳만 수정하면 타입이 자동으로 확장됨getCharacterCollectionwrapper 제거{ collections: [...] }wrapper를 유지하다select에서 즉시 꺼내는 불필요한 구조 제거CharacterItemData[]를 직접 반환하도록 변경,CharacterItemsResponse타입 제거그 외에 사용하지 않는 타입을 제거했습니다!
👻 리뷰 요구사항
참여자 선택 에러 처리
실제 에러 코드가 API 문서에 명시되지 않아
ignoreBoundaryErrors: [400, 409]로 임시 처리하고 TODO를 남겼습니다. 실제 에러 코드 확인 후에 세부적으로 처리하겠습니다!Summary by CodeRabbit
릴리스 노트
새로운 기능
버그 수정
리팩터