Conversation
- `feature/collection/build.gradle.kts`: collection 피처 모듈 빌드 스크립트 정의 및 네임스페이스 설정 - `feature/collection/src/main/AndroidManifest.xml`: 모듈용 매니페스트 파일 추가 - `settings.gradle.kts`: 프로젝트 모듈 목록에 `:feature:collection` 추가
- `libs.versions.toml`: Navigation Compose 라이브러리 버전(2.9.8) 및 카탈로그 정의 추가 - `feature/collection/build.gradle.kts`: `navigation-compose` 라이브러리 의존성 추가 적용
- `CollectionScreen.kt`: `CollectionScreen` 컴포저블 구현 및 프리뷰 추가
- `CollectionActivity.kt`: Hilt 의존성 주입을 위해 `CollectionActivity` 클래스에 `@AndroidEntryPoint` 어노테이션 추가
- `AndroidManifest.xml`: 컬렉션 화면 진입을 위한 `CollectionActivity` 추가 및 세로 방향(portrait) 고정 설정
- `fragment_my_page.xml`: 컬렉션 진입점을 위한 `ComposeView`(`cv_my_page_collection_entry`) 및 하단 구분선(`view_my_page_collection_divider`) 추가 - `fragment_my_page.xml`: 기존 장르 취향 섹션 및 취향 분석 섹션의 상단 제약 조건을 신규 구분선 기준으로 변경하여 레이아웃 구조 조정
- `MyPageFragment.kt`: `cvMyPageCollectionEntry`에 `CollectionEntry` 컴포저블을 적용하는 `setupCollectionEntry` 함수 추가 - `MyPageFragment.kt`: 컬렉션 화면으로 이동하는 `navigateToCollection` 함수 구현 및 연결 - `MyPageFragment.kt`: Compose View의 효율적인 생명주기 관리를 위한 `ViewCompositionStrategy` 설정 추가
- `CollectionAppBar.kt`: 뒤로가기 버튼과 "컬렉션" 타이틀을 포함한 상단 앱바 컴포저블 신규 구현 - `CollectionScreen.kt`: `CollectionAppBar` 적용 및 `statusBarsPadding` 추가, 내부 레이아웃 구조 조정 - `CollectionEntry.kt`: 파일 위치를 `component` 패키지로 이동 - `CollectionNavHost.kt` & `CollectionActivity.kt`: 뒤로가기 동작(finish)을 위한 `onNavigateBack` 콜백 추가 및 전달 로직 구현 - `MyPageFragment.kt`: `CollectionEntry` 패키지 위치 변경에 따른 임포트 경로 수정
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough컬렉션 전용 모듈과 Compose 화면을 추가했습니다. 컬렉션 생성, 작품 검색, 도서관 작품 선택 흐름을 구성했습니다. 도서관에 필터 없는 페이징 API를 추가했습니다. 마이페이지에서 Changes컬렉션 기능
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant MyPageFragment
participant CollectionActivity
participant CollectionNavHost
participant CollectionNovelSearchScreen
participant CollectionLibraryNovelSelectionViewModel
participant LibraryRepository
MyPageFragment->>CollectionActivity: 컬렉션 Intent 실행
CollectionActivity->>CollectionNavHost: Compose 콘텐츠 구성
CollectionNavHost->>CollectionNovelSearchScreen: 검색 화면 표시
CollectionNovelSearchScreen->>CollectionNavHost: 도서관 선택 화면 이동
CollectionNavHost->>CollectionLibraryNovelSelectionViewModel: 선택 화면 구성
CollectionLibraryNovelSelectionViewModel->>LibraryRepository: 필터 없는 소설 페이징 요청
LibraryRepository-->>CollectionLibraryNovelSelectionViewModel: PagingData 반환
CollectionLibraryNovelSelectionViewModel-->>CollectionNavHost: 선택된 소설 ID 전달
CollectionNavHost-->>CollectionNovelSearchScreen: SavedStateHandle로 선택 결과 복원
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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
`@feature/collection/src/main/java/com/into/websoso/feature/collection/CollectionScreen.kt`:
- Around line 51-55: Update CollectionScreen so users no longer see the
temporary “임시화면” content: either replace it with the implemented collection UI
or, until that exists, hide the MyPage entry point that launches
CollectionActivity. Ensure the user cannot navigate into an unfinished
collection screen.
In
`@feature/collection/src/main/java/com/into/websoso/feature/collection/component/CollectionAppBar.kt`:
- Around line 42-45: Update the back-navigation Image inside the
CollectionAppBar IconButton to use the existing Korean string resource for “뒤로
가기” as its contentDescription instead of null, preserving the current icon and
button behavior.
In
`@feature/collection/src/main/java/com/into/websoso/feature/collection/component/CollectionEntry.kt`:
- Line 29: Update the CollectionEntry usage in MyPageFragment so it receives the
actual collection count, or make collectionCount nullable and omit the count
display when unavailable. Remove the misleading default value that causes valid
collection data to render as “0개,” while preserving the existing count rendering
when a real value is provided.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4a57c726-409d-47d7-b8bc-1322bd22bc2d
📒 Files selected for processing (13)
app/build.gradle.ktsapp/src/main/AndroidManifest.xmlapp/src/main/java/com/into/websoso/ui/collection/CollectionActivity.ktapp/src/main/java/com/into/websoso/ui/main/myPage/MyPageFragment.ktapp/src/main/res/layout/fragment_my_page.xmlfeature/collection/build.gradle.ktsfeature/collection/src/main/AndroidManifest.xmlfeature/collection/src/main/java/com/into/websoso/feature/collection/CollectionNavHost.ktfeature/collection/src/main/java/com/into/websoso/feature/collection/CollectionScreen.ktfeature/collection/src/main/java/com/into/websoso/feature/collection/component/CollectionAppBar.ktfeature/collection/src/main/java/com/into/websoso/feature/collection/component/CollectionEntry.ktgradle/libs.versions.tomlsettings.gradle.kts
| Image( | ||
| painter = painterResource(id = ic_navigate_left), | ||
| contentDescription = null, | ||
| modifier = Modifier.size(24.dp), |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== locate file =="
fd -a 'CollectionAppBar\.kt$' .
echo "== file excerpt =="
file=$(fd 'CollectionAppBar\.kt$' . | head -n1)
if [ -n "${file:-}" ]; then
wc -l "$file"
sed -n '1,120p' "$file" | cat -n
fi
echo "== accessibility contentDescription occurrences in Jetpack Compose Image usage =="
rg -n "Image\\(|contentDescription\\s*=" feature/collection/src/main/java/com/into/websoso/feature/collection/component/CollectionAppBar.ktRepository: Team-WSS/WSS-Android
Length of output: 2963
뒤로가기 버튼에 접근성 라벨을 지정해 주세요.
IconButton 내부 이미지의 contentDescription이 null이라 TalkBack에서 버튼의 목적을 알 수 없습니다. "뒤로 가기" 문자열 리소스를 사용해 접근성 라벨을 지정해 주세요.
🤖 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
`@feature/collection/src/main/java/com/into/websoso/feature/collection/component/CollectionAppBar.kt`
around lines 42 - 45, Update the back-navigation Image inside the
CollectionAppBar IconButton to use the existing Korean string resource for “뒤로
가기” as its contentDescription instead of null, preserving the current icon and
button behavior.
| fun CollectionEntry( | ||
| onClick: () -> Unit, | ||
| modifier: Modifier = Modifier, | ||
| collectionCount: Int = 0, |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
실제 컬렉션 수를 전달하거나 기본값을 제거해 주세요.
MyPageFragment.kt의 현재 호출부는 CollectionEntry(onClick = ...)만 전달하므로 collectionCount가 항상 기본값 0입니다. 실제 컬렉션이 있어도 마이페이지에 항상 컬렉션 0개가 표시됩니다. 실제 수를 전달하거나, 수가 준비되지 않았다면 카운트를 렌더링하지 않도록 계약을 정리해 주세요.
🤖 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
`@feature/collection/src/main/java/com/into/websoso/feature/collection/component/CollectionEntry.kt`
at line 29, Update the CollectionEntry usage in MyPageFragment so it receives
the actual collection count, or make collectionCount nullable and omit the count
display when unavailable. Remove the misleading default value that causes valid
collection data to render as “0개,” while preserving the existing count rendering
when a real value is provided.
- `CollectionTabRow.kt`: "내 컬렉션"과 "좋아요한 컬렉션"을 전환할 수 있는 탭 바 컴포저블 `CollectionTabRow` 및 내부 `CollectionTab` 구현 - `CollectionScreen.kt`: 상단 앱바 하단에 `CollectionTabRow` 배치
- `CollectionTab.kt`: 컬렉션 탭 구분을 위한 `CollectionTab` Enum 클래스 정의
- `CollectionScreen.kt`: `rememberSaveable`을 이용해 선택된 탭 상태(`selectedTab`)를 관리하고 `CollectionTabRow`와 연동
- `CollectionTabRow.kt`:
- `CollectionTab` Enum을 순회하며 탭 항목을 생성하도록 로직 수정
- 탭 클릭 처리를 위해 `onTabSelected` 콜백 추가 및 `selectable` Modifier 적용
- 기존 `CollectionTab` 컴포저블을 `CollectionTabItem`으로 명칭 변경
- Enum 값에 따른 탭 타이틀 문자열을 반환하는 확장 프로퍼티 `title` 추가
- `CollectionCreateButton.kt`: "컬렉션 만들기" 버튼 구현 - `CollectionScreen.kt`: 컬렉션 화면 내 상단 탭 하단에 `CollectionCreateButton` 추가 및 레이아웃 적용
- `CollectionScreen.kt`: 화면 중앙에 위치하던 "컬렉션", "임시화면" 안내 문구와 이를 포함하던 `Box` 레이아웃 및 미사용 임포트 삭제
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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
`@feature/collection/src/main/java/com/into/websoso/feature/collection/component/CollectionCreateButton.kt`:
- Around line 26-60: Update CollectionCreateButton in
feature/collection/src/main/java/com/into/websoso/feature/collection/component/CollectionCreateButton.kt:26-60
to accept an onClick callback and make its Row invoke it with clickable
semantics such as Role.Button. Update CollectionScreen in
feature/collection/src/main/java/com/into/websoso/feature/collection/CollectionScreen.kt:23-46
to accept onCreateCollection and pass it to CollectionCreateButton so callers
can launch the actual creation flow.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: ffde6f8d-ba28-4bac-a82c-e0a3854724ef
📒 Files selected for processing (5)
core/resource/src/main/res/drawable/ic_collection_create.xmlfeature/collection/src/main/java/com/into/websoso/feature/collection/CollectionScreen.ktfeature/collection/src/main/java/com/into/websoso/feature/collection/component/CollectionCreateButton.ktfeature/collection/src/main/java/com/into/websoso/feature/collection/component/CollectionTabRow.ktfeature/collection/src/main/java/com/into/websoso/feature/collection/model/CollectionTab.kt
- `CollectionCreateButton.kt`: 컴포저블 함수 파라미터와 Modifier 체이닝의 불필요한 줄바꿈을 제거하고 임포트 구문을 정렬하여 가독성 개선
- `CollectionTabRow.kt`: `TabItem` 내 `modifier` 체이닝의 불필요한 줄바꿈 제거 및 코드 정렬 수정
- `CollectionCreateButton.kt`: `onClick` 콜백 매개변수를 추가하고 `Modifier.clickable` 및 `clip`을 적용하여 클릭 상호작용 구현 - `CollectionScreen.kt`: `CollectionCreateButton` 호출부에 `onClick` 핸들러 추가
- `CollectionScreen.kt`: 생성 버튼 클릭 시 호출될 `onNavigateToCreate` 콜백 파라미터 추가 및 `CollectionCreateButton`에 연결 - `CollectionNavHost.kt`: `CollectionScreen`에서 `COLLECTION_CREATE_ROUTE`로 이동하는 네비게이션 로직 구현 및 전달
- `CollectionLibraryNovelSelectionScreen.kt`: `novels.loadState.refresh`가 `LoadState.Error`인 경우 노출될 에러 화면(이미지, 안내 문구, 재시도 버튼) 구현 - `CollectionLibraryNovelSelectionScreen.kt`: 에러 화면 내 재시도 버튼 클릭 시 `PagingData`의 `retry()`를 호출하는 로직 추가
- `CollectionLibraryNovelSelectionScreen.kt`: 데이터 추가 로딩(`append`) 중 에러가 발생한 경우에도 에러 UI가 노출되도록 조건식을 수정하고, `when` 문의 가독성 개선을 위해 구조 변경
- `data/novel/build.gradle.kts`: Retrofit, Paging, Serialization 등 의존성 설정 및 Android 라이브러리 모듈 환경 구성 - `settings.gradle.kts`: 전체 프로젝트 구성 내 `:data:novel` 모듈 추가 - `data/novel/src/main/AndroidManifest.xml`: 라이브러리 구성을 위한 기본 매니페스트 파일 추가
- `NovelSearchEntity.kt`: 작품 ID, 제목, 작가, 이미지 URL 정보를 포함하는 `NovelSearchEntity` 데이터 클래스 정의
- `CollectionNovelSearchRoute`: ViewModel의 검색 상태(`selectedNovels`, `submittedQuery`) 및 페이징 데이터를 UI에 전달하는 Route 구현 - `CollectionNovelSearchScreen`: `LazyColumn`을 활용하여 선택된 작품 목록과 페이징 기반 검색 결과 리스트를 통합하여 표시 - `CollectionNovelSearchEmpty`: 검색 결과가 없을 때 노출되는 안내 뷰 구현 및 작품 문의를 위한 외부 링크(`LocalUriHandler`) 연동 - 검색 필드 내 검색 실행(`onSearchClick`) 및 초기화(`onClearClick`) 시의 검색 상태 동기화 로직 추가 - 검색 결과 리스트에서 이미 선택된 작품은 제외하고 표시하도록 필터링 로직 적용 - 데이터 로딩 상태(Loading) 및 네트워크 에러(Error)에 따른 대응 UI 추가
- `CollectionNovelSearchItem.kt`: 검색된 소설과 선택된 소설을 표시하기 위한 공통 `CollectionNovelSearchItem` 컴포저블 및 이를 활용한 `CollectionNovelSearchItem`, `CollectionSelectedNovelItem` 구현 - `ic_collection_novel_add.xml`: 소설 추가 버튼을 위한 플러스(+) 아이콘 리소스 추가 - `ic_collection_novel_delete.xml`: 소설 삭제 버튼을 위한 엑스(x) 아이콘 리소스 추가
- `CollectionSelectedNovel.kt`: 소설 ID, 제목, 작가, 이미지 URL 정보를 포함하는 `CollectionSelectedNovel` 데이터 클래스 정의
- `NovelSearchRepository.kt`: `NovelSearchPagingSource`를 사용하여 작품 검색 결과를 PagingData로 반환하는 `searchNovels` 함수 구현 - 페이징 처리를 위한 `PAGE_SIZE` 상수를 20으로 정의 및 `PagingConfig` 설정 적용
- `CollectionNovelSearchViewModel.kt`: 작품 검색 및 선택 상태 관리를 위한 `CollectionNovelSearchViewModel` 구현 - `searchResults`: 입력된 검색어에 따라 `NovelSearchRepository`로부터 검색 결과를 페이징 데이터로 가져오는 Flow 정의 - `addNovel`/`removeNovel`: 선택된 작품 리스트에 작품을 추가하거나 제거하는 기능 구현 - `toSelectedNovel`: `NovelSearchEntity`를 컬렉션 선택 모델로 변환하는 확장 함수 추가
- `CollectionNetworkError.kt`: 네트워크 로딩 실패 시 노출되는 이미지, 안내 문구 및 재시도 버튼을 포함한 `CollectionNetworkError` 컴포저블 구현
- `CollectionNovelSearchField.kt`: 검색 수행을 위한 `onSearchClick` 콜백 파라미터 추가 및 `BasicTextField`의 `keyboardActions`에 연결 - `CollectionNovelSearchField.kt`: 검색 아이콘 영역에 `clickable` 속성을 추가하여 클릭 시 `onSearchClick`이 호출되도록 수정 - `CollectionNovelSearchField.kt`: 검색 아이콘에 `Role.Button`을 지정하고 `contentDescription`을 추가하여 접근성 개선
- `CollectionLibraryNovelSelectionViewModel.kt`:
- `selectedNovelIds`를 `selectedNovels`(`List<CollectionSelectedNovel>`)로 변경하여 선택된 작품의 ID뿐만 아니라 제목, 이미지 등의 정보를 함께 관리하도록 수정
- `toggleNovelSelection`의 파라미터를 `Long`에서 `CollectionLibraryNovelUiModel`로 변경하고, 선택 여부에 따라 리스트 내 객체를 추가/삭제하도록 로직 수정
- 기존 `setSelectedNovelIds`를 `setSelectedNovels`로 변경하여 초기 선택 상태 설정 방식 수정
- `CollectionLibraryNovelUiModel`을 `CollectionSelectedNovel` 데이터 모델로 변환하는 확장 함수 `toSelectedNovel` 추가
- `CollectionNovelSearchItem.kt`: 작품 제목의 최대 줄 수를 1줄에서 2줄(`maxLines = 2`)로 변경 - `CollectionNovelSearchItem.kt`: 작품 정보 영역과 액션 버튼 사이에 16dp 간격(`Spacer`) 추가
- `CollectionNovelSearchItem.kt`: import 구문 순서 정렬 및 최적화
📌𝘐𝘴𝘴𝘶𝘦𝘴
📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯
📷𝘚𝘤𝘳𝘦𝘦𝘯𝘴𝘩𝘰𝘵
💬𝘛𝘰 𝘙𝘦𝘷𝘪𝘦𝘸𝘦𝘳𝘴
Summary by CodeRabbit