Conversation
- `PopularFeedsResponseDto.kt`: `feedContent`, `isPublic`, `novelTitle`, `novelImage` 필드를 Non-nullable로 변경하고, 기존의 `title`, `novelThumbnailImage` 대신 `novelGenre` 필드 추가 - `FeedMapper.kt`: 변경된 DTO 구조에 맞춰 매핑 로직 수정 및 `novelGenre` 매핑 추가 - `FeedRepository.kt`: 개별 피드 상세 정보를 반복 호출하던 `fetchPopularFeedsWithDetails` 함수를 삭제하고, `fetchPopularFeeds` 내에서 유효한 피드만 필터링하도록 로직 간소화 - `HomeViewModel.kt`: 상세 정보 조회가 통합된 `feedRepository.fetchPopularFeeds`를 호출하도록 수정 및 이에 따른 데이터 접근 방식 변경
|
Warning Review limit reached
Next review available in: 30 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: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Walkthrough인기 피드 응답 필드와 엔티티 구조를 변경했습니다. 저장소는 상세 조회 없이 유효한 피드 목록을 반환합니다. 홈 화면의 로그인, 비로그인, 갱신 경로는 새 목록 조회를 사용합니다. Changes인기 피드 조회 흐름
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
- `PopularFeedsEntity.kt`: 불필요한 래퍼 클래스인 `PopularFeedsEntity`를 삭제하고, 내부 `PopularFeedEntity`를 별도 파일로 분리 - `FeedMapper.kt`: `toData` 함수의 반환 타입을 `PopularFeedsEntity`에서 `List<PopularFeedEntity>`로 수정 - `FeedRepository.kt`: `fetchPopularFeeds`의 반환 타입을 리스트로 변경하고, 필터링 로직을 리스트 확장 함수를 사용하는 방식으로 간소화 - `HomeViewModel.kt`: 래퍼 클래스 제거에 따라 `popularFeeds` 데이터 접근 로직 수정 - `HomeUiState.kt`, `PopularFeedsAdapter.kt`, `PopularFeedsViewHolder.kt`: 참조하던 `PopularFeedsEntity.PopularFeedEntity` 타입을 `PopularFeedEntity`로 업데이트
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/src/main/java/com/into/websoso/data/model/PopularFeedEntity.kt (1)
3-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
feesContent를feedContent로 변경하세요.Line 5의
feesContent는 원격 응답의feedContent와 다릅니다. 이 이름은PopularFeedEntity소비자에 오탈자를 노출합니다. 필드명을feedContent로 변경하고FeedMapper.ktLine 113의 명명 인자도 함께 변경하세요.🤖 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/com/into/websoso/data/model/PopularFeedEntity.kt` around lines 3 - 13, Rename the PopularFeedEntity field feesContent to feedContent, and update the corresponding named argument in FeedMapper.kt to use feedContent so the model matches the remote response and its consumers.
🤖 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.
Nitpick comments:
In `@app/src/main/java/com/into/websoso/data/model/PopularFeedEntity.kt`:
- Around line 3-13: Rename the PopularFeedEntity field feesContent to
feedContent, and update the corresponding named argument in FeedMapper.kt to use
feedContent so the model matches the remote response and its consumers.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: cc1da43b-4a08-45ca-b459-97923323df0d
📒 Files selected for processing (8)
app/src/main/java/com/into/websoso/data/mapper/FeedMapper.ktapp/src/main/java/com/into/websoso/data/model/PopularFeedEntity.ktapp/src/main/java/com/into/websoso/data/model/PopularFeedsEntity.ktapp/src/main/java/com/into/websoso/data/repository/FeedRepository.ktapp/src/main/java/com/into/websoso/ui/main/home/HomeViewModel.ktapp/src/main/java/com/into/websoso/ui/main/home/adpater/PopularFeedsAdapter.ktapp/src/main/java/com/into/websoso/ui/main/home/adpater/PopularFeedsViewHolder.ktapp/src/main/java/com/into/websoso/ui/main/home/model/HomeUiState.kt
💤 Files with no reviewable changes (1)
- app/src/main/java/com/into/websoso/data/model/PopularFeedsEntity.kt
- `PopularFeedsResponseDto.kt`: `feedContent` 필드를 nullable(`String?`)로 변경하고 기본값을 `null`로 설정 - `FeedMapper.kt`: `PopularFeedEntity` 변환 시 `feedContent`가 null인 경우 빈 문자열을 반환하도록 `orEmpty()` 적용
- `FeedMapper.kt`: `PopularFeedsResponseDto.toData` 함수에서 `feedContent`가 null이거나 공백인 항목을 리스트에서 제외하도록 `mapNotNull` 및 `isNotBlank` 필터링 로직 적용
📌𝘐𝘴𝘴𝘶𝘦𝘴
📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯
PopularFeedsResponseDto.kt:feedContent,isPublic,novelTitle,novelImage필드를 Non-nullable로 변경하고, 기존의title,novelThumbnailImage대신novelGenre필드 추가FeedMapper.kt: 변경된 DTO 구조에 맞춰 매핑 로직 수정 및novelGenre매핑 추가FeedRepository.kt: 개별 피드 상세 정보를 반복 호출하던fetchPopularFeedsWithDetails함수를 삭제하고,fetchPopularFeeds내에서 유효한 피드만 필터링하도록 로직 간소화HomeViewModel.kt: 상세 정보 조회가 통합된feedRepository.fetchPopularFeeds를 호출하도록 수정 및 이에 따른 데이터 접근 방식 변경하여 상세 조회 하던 문제 해결📷𝘚𝘤𝘳𝘦𝘦𝘯𝘴𝘩𝘰𝘵
Screen_recording_20260730_012524.mp4
💬𝘛𝘰 𝘙𝘦𝘷𝘪𝘦𝘸𝘦𝘳𝘴
변경 된 api에 맞춰 수정하여 지금 뜨는 글 조회 N+1 되는 문제 해결
Summary by CodeRabbit