[REFACTOR/#55] 리팩토링 - #56
Conversation
- presentation/mypage/wishlist 패키지·클래스(Wishlist*)를 favorite/Favorite*로 리네임 - WishlistItem→FavoritePubItem (data.model.FavoriteItem 충돌 회피) - PubDetail.isWishlisted→isFavorited 등 데이터/상세 계층 정합 - 리소스 img_wishlist_item→img_favorite_item, 한글 contentDescription 찜→즐겨찾기 - 코드베이스 favorite 용어로 통일(서버 API 동일)
|
Warning Review limit reached
Next review available in: 54 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthrough팀·지역·필터 데이터를 도메인 enum과 공통 계약으로 통합하고, 여러 화면 상태를 불변 컬렉션 기반으로 변경했습니다. 위시리스트 기능은 즐겨찾기 기능으로 전환되었으며, 펍 상세·홈·일정·회원가입 UI가 새 모델과 로고 fallback을 사용합니다. Changes도메인 및 필터 계약
즐겨찾기 전환
상세 및 상태 전환
공통 UI
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ 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: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
app/src/main/java/org/app/presentation/home/pubfilter/PubFilterViewModel.kt (1)
100-129: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
loadTeams()가PubFilterContract.State.resolvedSections와 동일한 TEAM 섹션 변환을 수행합니다.
PubFilterContract.kt에서 이미 논의한 중복 로직입니다. 하단 통합 코멘트를 참고해 주세요.🤖 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 `@app/src/main/java/org/app/presentation/home/pubfilter/PubFilterViewModel.kt` around lines 100 - 129, Update loadTeams() to stop constructing and replacing the TEAM section locally; after updating teams, rely on PubFilterContract.State.resolvedSections for the TEAM section transformation. Remove the duplicated PubFilterSection and section-mapping logic while preserving the existing team loading and failure side effect behavior.app/src/main/java/org/app/presentation/home/HomeViewModel.kt (1)
176-199: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win펍 이름은 URI 컴포넌트로 인코딩해서 넣어주세요.
event.name을 카카오 웹 폴백(/link/map/...)과 네이버 딥링크/웹 폴백에 그대로 붙이면 공백, 한글,&같은 문자가 URL 파싱을 깨뜨릴 수 있습니다.Uri.encode(event.name)를 적용해 주세요.🤖 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 `@app/src/main/java/org/app/presentation/home/HomeViewModel.kt` around lines 176 - 199, Apply Uri.encode(event.name) before interpolating the pub name in the Kakao web fallback, Naver deep link, and Naver web fallback within the OnKakaoMapClick and OnNaverMapClick handlers. Reuse the encoded value consistently so spaces, Korean text, ampersands, and other URL-sensitive characters remain valid URI components.
🧹 Nitpick comments (6)
app/src/main/java/org/app/presentation/pubdetail/PubDetailViewModel.kt (1)
91-122: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
isFavoriteed프로퍼티 네이밍 오탈자 개선 제안코드 전반에 걸쳐 사용 중인
isFavoriteed는 영문법상 다소 어색한 표현입니다. 모델 클래스(PubDetail) 단에서isFavorited혹은isFavorite으로 수정하는 것을 권장합니다.
app/src/main/java/org/app/presentation/pubdetail/PubDetailViewModel.kt#L91-L122: 상태 복사 시isFavoriteed = true로 할당하는 부분의 네이밍 수정이 필요합니다.app/src/main/java/org/app/presentation/pubdetail/PubDetailViewModel.kt#L153-L163: 즐겨찾기 해제 시isFavoriteed = false로 할당하는 부분의 네이밍 수정이 필요합니다.app/src/main/java/org/app/presentation/pubdetail/PubDetailViewModel.kt#L185-L185: 초기 상세 데이터 로드 시 사용하는isFavoriteed파라미터의 네이밍 수정이 필요합니다.app/src/main/java/org/app/presentation/pubdetail/PubDetailScreen.kt#L123-L128: UI에 값을 바인딩하는detail.isFavoriteed의 네이밍 수정이 필요합니다.app/src/main/java/org/app/presentation/pubdetail/PubDetailScreen.kt#L210-L210: 프리뷰 내 목업 데이터 생성 시 사용하는isFavoriteed의 네이밍 수정이 필요합니다.🤖 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 `@app/src/main/java/org/app/presentation/pubdetail/PubDetailViewModel.kt` around lines 91 - 122, Rename the PubDetail model property isFavoriteed to isFavorited (or the project’s established equivalent) and update every reference consistently. Apply the rename in PubDetailViewModel.kt at lines 91-122, 153-163, and 185, and in PubDetailScreen.kt at lines 123-128 and 210, including assignments, UI bindings, and preview data.app/src/main/java/org/app/presentation/mypage/favorite/FavoriteScreen.kt (1)
181-181: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win안전한 Compose 리스트 Key 사용
chunked된 row의 첫 번째 아이템 ID만
key로 사용할 경우, 중간이나 마지막 아이템이 삭제될 때 Compose가 row 내부 구조가 변경되었음을 정확히 인지하지 못해 재구성(recomposition) 시 UI 결함이 발생할 수 있습니다. Row 내의 모든 ID를 조합하여 고유한 키를 생성하는 것을 권장합니다.💡 제안하는 수정안
- items(rows, key = { row -> row.first().favoriteId }) { rowItems -> + items(rows, key = { row -> row.joinToString("_") { it.favoriteId.toString() } }) { rowItems ->🤖 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 `@app/src/main/java/org/app/presentation/mypage/favorite/FavoriteScreen.kt` at line 181, Update the Lazy list key in the items call within FavoriteScreen so it is derived from all favoriteId values in each chunked row, rather than only row.first().favoriteId. Build a stable unique key from the complete row while preserving the existing row rendering behavior.app/src/main/java/org/app/data/model/PubDetail.kt (1)
32-32: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value오타 수정
isFavoriteed는 영어 문법상isFavorited가 자연스럽습니다. 데이터 모델 클래스의 프로퍼티이므로 추후 직렬화나 다른 참조에서 혼선이 없도록 올바른 철자로 수정하는 것을 권장합니다.💡 제안하는 수정안
- val isFavoriteed: Boolean = false, + val isFavorited: Boolean = false,🤖 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 `@app/src/main/java/org/app/data/model/PubDetail.kt` at line 32, Correct the PubDetail property name from isFavoriteed to isFavorited, and update all references, serialization mappings, and callers to use the corrected identifier consistently.app/src/main/java/org/app/presentation/home/component/HomePubBottomSheet.kt (2)
67-67: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
DRINK_CODES가HomeViewModel.kt의 인라인 리스트와 중복됩니다.동일한 4개 술 코드 조합이
HomeViewModel.applyQuickFilter의VARIOUS_DRINKS분기에도 하드코딩되어 있습니다. 공용 상수로 추출해 두 곳에서 재사용하면 한쪽만 바뀌어 어긋나는 위험을 줄일 수 있습니다. 하단 통합 코멘트에서 함께 정리합니다.🤖 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 `@app/src/main/java/org/app/presentation/home/component/HomePubBottomSheet.kt` at line 67, Extract the shared four-code drink set from DRINK_CODES and the inline list used by HomeViewModel.applyQuickFilter’s VARIOUS_DRINKS branch into a common constant. Update both call sites to reuse that constant, preserving the existing filtering behavior.
527-538: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
isFavoriteed네이밍 —HomeViewModel.kt와 동일한 이슈입니다.하단 통합 코멘트에서 함께 정리합니다.
Also applies to: 698-698
🤖 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 `@app/src/main/java/org/app/presentation/home/component/HomePubBottomSheet.kt` around lines 527 - 538, Rename the misspelled `isFavoriteed` property usage in the bottom-sheet UI to the corrected favorite-state name used by `HomeViewModel`, updating both the heart drawable selection and tint condition while preserving their existing behavior.app/src/main/java/org/app/presentation/home/HomeViewModel.kt (1)
328-334: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
isFavoriteed네이밍이 문법적으로 어색합니다.
isFavorite+ed가 겹쳐 "isFavoriteed"가 되었습니다. 올바른 영어 과거분사형은isFavorited입니다.HomePubBottomSheet.kt에도 동일하게 나타나므로, 관련 리네이밍은 하단 통합 코멘트에서 함께 정리합니다.Also applies to: 382-386, 421-453
🤖 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 `@app/src/main/java/org/app/presentation/home/HomeViewModel.kt` around lines 328 - 334, Rename the misspelled isFavoriteed variable and all related references in the HomeViewModel favorite-state flows to isFavorited, including the occurrences covered by the additional ranges. Coordinate the same naming correction with HomePubBottomSheet.kt as requested by the integrated comment.
🤖 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 `@app/src/main/java/org/app/presentation/home/HomeViewModel.kt`:
- Around line 538-556: Update HomeFilter.applyQuickFilter’s “VARIOUS_DRINKS”
branch to determine toggling from whether the existing foodCodes contains any
configured drink code, rather than merely being non-empty. Remove only the drink
codes when disabling the filter while preserving unrelated selections such as
CHICKEN; when enabling it, add the defined drink codes without duplicating
existing entries.
In `@app/src/main/java/org/app/presentation/home/pubfilter/PubFilterContract.kt`:
- Around line 25-34: resolvedSections가 사용되지 않는 중복 상태이므로 단일 소스가 되도록 정리하세요.
PubFilterScreen이 state.sections 대신 resolvedSections를 읽고
PubFilterViewModel.loadTeams()의 TEAM 섹션 직접 갱신을 제거하거나, resolvedSections와 관련
주석·로직을 삭제해 loadTeams()의 갱신만 유지하세요. 두 경로가 동시에 TEAM 섹션을 관리하지 않도록 합니다.
In
`@app/src/main/java/org/app/presentation/mypage/component/MyPageFavoriteSection.kt`:
- Line 58: Update the clickable favorite icon in the surrounding composable to
provide at least a 48dp touch target and add an appropriate contentDescription
for screen readers, while preserving the existing onFavoriteClick behavior.
---
Outside diff comments:
In `@app/src/main/java/org/app/presentation/home/HomeViewModel.kt`:
- Around line 176-199: Apply Uri.encode(event.name) before interpolating the pub
name in the Kakao web fallback, Naver deep link, and Naver web fallback within
the OnKakaoMapClick and OnNaverMapClick handlers. Reuse the encoded value
consistently so spaces, Korean text, ampersands, and other URL-sensitive
characters remain valid URI components.
In `@app/src/main/java/org/app/presentation/home/pubfilter/PubFilterViewModel.kt`:
- Around line 100-129: Update loadTeams() to stop constructing and replacing the
TEAM section locally; after updating teams, rely on
PubFilterContract.State.resolvedSections for the TEAM section transformation.
Remove the duplicated PubFilterSection and section-mapping logic while
preserving the existing team loading and failure side effect behavior.
---
Nitpick comments:
In `@app/src/main/java/org/app/data/model/PubDetail.kt`:
- Line 32: Correct the PubDetail property name from isFavoriteed to isFavorited,
and update all references, serialization mappings, and callers to use the
corrected identifier consistently.
In `@app/src/main/java/org/app/presentation/home/component/HomePubBottomSheet.kt`:
- Line 67: Extract the shared four-code drink set from DRINK_CODES and the
inline list used by HomeViewModel.applyQuickFilter’s VARIOUS_DRINKS branch into
a common constant. Update both call sites to reuse that constant, preserving the
existing filtering behavior.
- Around line 527-538: Rename the misspelled `isFavoriteed` property usage in
the bottom-sheet UI to the corrected favorite-state name used by
`HomeViewModel`, updating both the heart drawable selection and tint condition
while preserving their existing behavior.
In `@app/src/main/java/org/app/presentation/home/HomeViewModel.kt`:
- Around line 328-334: Rename the misspelled isFavoriteed variable and all
related references in the HomeViewModel favorite-state flows to isFavorited,
including the occurrences covered by the additional ranges. Coordinate the same
naming correction with HomePubBottomSheet.kt as requested by the integrated
comment.
In `@app/src/main/java/org/app/presentation/mypage/favorite/FavoriteScreen.kt`:
- Line 181: Update the Lazy list key in the items call within FavoriteScreen so
it is derived from all favoriteId values in each chunked row, rather than only
row.first().favoriteId. Build a stable unique key from the complete row while
preserving the existing row rendering behavior.
In `@app/src/main/java/org/app/presentation/pubdetail/PubDetailViewModel.kt`:
- Around line 91-122: Rename the PubDetail model property isFavoriteed to
isFavorited (or the project’s established equivalent) and update every reference
consistently. Apply the rename in PubDetailViewModel.kt at lines 91-122,
153-163, and 185, and in PubDetailScreen.kt at lines 123-128 and 210, including
assignments, UI bindings, and preview data.
🪄 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 Plus
Run ID: 6efa3b24-be92-467e-a9b0-84f27df39e1b
⛔ Files ignored due to path filters (1)
app/src/main/res/drawable/img_favorite_item.pngis excluded by!**/*.pngand included by none
📒 Files selected for processing (53)
app/build.gradle.ktsapp/src/main/java/org/app/core/designsystem/component/MoballBaseballTeamBadge.ktapp/src/main/java/org/app/core/designsystem/theme/Spacing.ktapp/src/main/java/org/app/data/model/PubDetail.ktapp/src/main/java/org/app/domain/model/KboTeamType.ktapp/src/main/java/org/app/presentation/home/HomeContract.ktapp/src/main/java/org/app/presentation/home/HomeViewModel.ktapp/src/main/java/org/app/presentation/home/component/HomeFilterBottomSheet.ktapp/src/main/java/org/app/presentation/home/component/HomePubBottomSheet.ktapp/src/main/java/org/app/presentation/home/homesearch/HomeSearchContract.ktapp/src/main/java/org/app/presentation/home/homesearch/HomeSearchScreen.ktapp/src/main/java/org/app/presentation/home/homesearch/HomeSearchViewModel.ktapp/src/main/java/org/app/presentation/home/model/HomeModel.ktapp/src/main/java/org/app/presentation/home/model/SeoulRegion.ktapp/src/main/java/org/app/presentation/home/pubfilter/PubFilterCodes.ktapp/src/main/java/org/app/presentation/home/pubfilter/PubFilterContract.ktapp/src/main/java/org/app/presentation/home/pubfilter/PubFilterScreen.ktapp/src/main/java/org/app/presentation/home/pubfilter/PubFilterViewModel.ktapp/src/main/java/org/app/presentation/mypage/MyPageContract.ktapp/src/main/java/org/app/presentation/mypage/MyPageNavigation.ktapp/src/main/java/org/app/presentation/mypage/MyPageScreen.ktapp/src/main/java/org/app/presentation/mypage/MyPageViewModel.ktapp/src/main/java/org/app/presentation/mypage/component/MyPageAddSportsCard.ktapp/src/main/java/org/app/presentation/mypage/component/MyPageFavoriteSection.ktapp/src/main/java/org/app/presentation/mypage/component/MyPageTeamSelectBottomSheet.ktapp/src/main/java/org/app/presentation/mypage/editprofile/EditProfileScreen.ktapp/src/main/java/org/app/presentation/mypage/favorite/FavoriteContract.ktapp/src/main/java/org/app/presentation/mypage/favorite/FavoriteScreen.ktapp/src/main/java/org/app/presentation/mypage/favorite/FavoriteViewModel.ktapp/src/main/java/org/app/presentation/mypage/favorite/component/FavoriteEditButton.ktapp/src/main/java/org/app/presentation/mypage/favorite/component/FavoriteItemCard.ktapp/src/main/java/org/app/presentation/mypage/favorite/component/FavoritePreviewCard.ktapp/src/main/java/org/app/presentation/mypage/favorite/navigation/FavoriteNavigation.ktapp/src/main/java/org/app/presentation/mypage/report/ReportContract.ktapp/src/main/java/org/app/presentation/mypage/report/ReportScreen.ktapp/src/main/java/org/app/presentation/mypage/report/ReportViewModel.ktapp/src/main/java/org/app/presentation/onboarding/signup/SignUpContract.ktapp/src/main/java/org/app/presentation/onboarding/signup/SignUpNicknameScreen.ktapp/src/main/java/org/app/presentation/onboarding/signup/SignUpTeamSelectionScreen.ktapp/src/main/java/org/app/presentation/onboarding/signup/SignUpViewModel.ktapp/src/main/java/org/app/presentation/pubdetail/PubDetailContract.ktapp/src/main/java/org/app/presentation/pubdetail/PubDetailScreen.ktapp/src/main/java/org/app/presentation/pubdetail/PubDetailViewModel.ktapp/src/main/java/org/app/presentation/pubdetail/component/PubInfoSection.ktapp/src/main/java/org/app/presentation/pubdetail/component/PubPhotoGallery.ktapp/src/main/java/org/app/presentation/pubdetail/component/TeamBadge.ktapp/src/main/java/org/app/presentation/pubdetail/model/PubDetail.ktapp/src/main/java/org/app/presentation/schedule/ScheduleContract.ktapp/src/main/java/org/app/presentation/schedule/ScheduleScreen.ktapp/src/main/java/org/app/presentation/schedule/ScheduleViewModel.ktapp/src/main/java/org/app/presentation/schedule/component/ScheduleCalendarDialog.ktapp/src/main/java/org/app/presentation/schedule/component/ScheduleGameItem.ktapp/src/main/java/org/app/presentation/schedule/component/ScheduleTeamChipBar.kt
💤 Files with no reviewable changes (3)
- app/src/main/java/org/app/presentation/pubdetail/model/PubDetail.kt
- app/src/main/java/org/app/presentation/pubdetail/component/PubPhotoGallery.kt
- app/src/main/java/org/app/presentation/mypage/editprofile/EditProfileScreen.kt
noRippleClickable이 최소 터치 크기를 보장하지 않아, ModifierExt에 minTouchTarget()(=minimumInteractiveComponentSize) 신설. 배경/그림자보다 바깥(최외곽)에 배치해 시각 크기는 유지하고 터치 영역만 48dp로 확장. 작은 클릭 요소(탑바 아이콘·필터/카테고리 칩·캘린더 화살표·하트/연필/X/ 탈퇴사유 행·개인정보처리방침 등)에 적용. 이미 48dp 이상인 버튼/카드/행은 제외.
foodCodes?.isNotEmpty()로 토글을 판정해, CHICKEN 등 다른 음식이 선택돼 있으면 칩을 눌러도 술 코드가 추가되지 않고 기존 선택이 전부 지워졌다. DRINK_CODES 포함 여부로 판정하도록 수정해 술 코드만 정확히 토글한다. DRINK_CODES는 FoodCode companion으로 단일 출처화(중복 정의 제거).
resolvedSections 게터는 어디서도 읽히지 않았고, team 섹션 해석은 PubFilterViewModel.loadTeams()가 sections에 직접 반영하고 Screen은 state.sections만 읽는다. 죽은 중복을 제거하고 관련 주석을 정정한다.
Related issue 🛠
Work Description ✏️
Screenshot 📸
Uncompleted Tasks 😅
Summary by CodeRabbit