[Feature] 학교 부서정보 화면 구현#1550
Conversation
|
Warning Review limit reached
Next review available in: 37 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 (1)
Walkthrough새 ChangesDepartment 기능
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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
🧹 Nitpick comments (3)
feature/department/src/main/java/in/koreatech/koin/feature/department/type/DepartmentCategory.kt (1)
31-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win공개 API 타입을 명시하세요.
feature/department/src/main/java/in/koreatech/koin/feature/department/type/DepartmentCategory.kt#L31-L31:ALL: ImmutableList<DepartmentCategory>타입을 명시하세요.feature/department/src/main/java/in/koreatech/koin/feature/department/state/DepartmentState.kt#L23-L23:toDepartmentState(): DepartmentState반환 타입을 명시하세요.As per coding guidelines, “Keep public APIs explicitly typed.”
🤖 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/department/src/main/java/in/koreatech/koin/feature/department/type/DepartmentCategory.kt` at line 31, 명시적 공개 API 타입을 추가하세요. DepartmentCategory의 ALL 프로퍼티를 ImmutableList<DepartmentCategory>로 선언하고, DepartmentState의 toDepartmentState() 함수 반환 타입을 DepartmentState로 명시하세요.Source: Coding guidelines
feature/department/src/main/java/in/koreatech/koin/feature/department/screen/detail/DepartmentDetailScreenContent.kt (1)
47-47: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win하드코딩된 배경색 대신 디자인 시스템 색상 토큰 사용 권장.
Color(0xFFF8F8FA)가 두 곳에서 하드코딩되어 있습니다. 다른 department 컴포넌트들(예:DepartmentCard)은RebrandKoinTheme.colors.*를 사용하므로, 일관성과 다크모드 대응을 위해 테마 색상 토큰으로 교체하는 것을 권장합니다.♻️ 제안: 테마 색상 사용
Column( - modifier = modifier.background(Color(0xFFF8F8FA)) + modifier = modifier.background(RebrandKoinTheme.colors.neutral50) ) { KoinTopAppBar( title = stringResource(uiState.category.titleRes), onNavigationIconClick = onNavigationIconClick, colors = TopAppBarDefaults.topAppBarColors( - containerColor = Color(0xFFF8F8FA) + containerColor = RebrandKoinTheme.colors.neutral50 ) )정확한 토큰명(예:
neutral50)은RebrandKoinTheme.colors정의를 확인해 실제 존재하는 색상 토큰으로 교체해야 합니다.Also applies to: 53-53
🤖 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/department/src/main/java/in/koreatech/koin/feature/department/screen/detail/DepartmentDetailScreenContent.kt` at line 47, Replace both hardcoded Color(0xFFF8F8FA) values in DepartmentDetailScreenContent with the matching existing RebrandKoinTheme.colors token, confirming the token name from the theme definition and preserving the current background behavior.feature/department/src/main/java/in/koreatech/koin/feature/department/screen/detail/DepartmentDetailViewModel.kt (1)
42-62: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
fetchDepartments()와search()의 중복 로직 정리 제안.두 함수 모두 결과를 매핑해
Empty/Success/Failure로 reduce하는 동일한 패턴을 가지고 있습니다. 공통 헬퍼로 추출하면 중복을 줄일 수 있습니다.♻️ 제안: 공통 헬퍼 추출
- private fun fetchDepartments() = intent { - reduce { state.copy(contentUiState = DepartmentSearchUiState.Loading) } - - departmentRepository.getDepartmentContactsByCategory(category = category.name) - .onSuccess { result -> - val departmentStates = result.categoryContacts.departments.map { it.toDepartmentState() } - reduce { - state.copy( - updatedAt = result.updatedAt.format(DEPARTMENT_UPDATED_AT_FORMATTER), - contentUiState = if (departmentStates.isEmpty()) { - DepartmentSearchUiState.Empty - } else { - DepartmentSearchUiState.Success(departmentStates.toImmutableList()) - } - ) - } - } - .onFailure { - reduce { state.copy(contentUiState = DepartmentSearchUiState.Failure) } - } - } + private fun fetchDepartments() = intent { + reduce { state.copy(contentUiState = DepartmentSearchUiState.Loading) } + departmentRepository.getDepartmentContactsByCategory(category = category.name) + .onSuccess { result -> + reduce { + state.copy( + updatedAt = result.updatedAt.format(DEPARTMENT_UPDATED_AT_FORMATTER), + contentUiState = result.toUiState() + ) + } + } + .onFailure { reduce { state.copy(contentUiState = DepartmentSearchUiState.Failure) } } + } + + private fun DepartmentContactsResult.toUiState(): DepartmentSearchUiState { + val states = categoryContacts.departments.map { it.toDepartmentState() } + return if (states.isEmpty()) DepartmentSearchUiState.Empty else DepartmentSearchUiState.Success(states.toImmutableList()) + }Also applies to: 92-109
🤖 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/department/src/main/java/in/koreatech/koin/feature/department/screen/detail/DepartmentDetailViewModel.kt` around lines 42 - 62, Refactor fetchDepartments() and search() to extract their duplicated result-to-DepartmentSearchUiState mapping and reduce logic into a shared helper. Reuse the helper for both success and failure paths while preserving each operation’s existing state updates, including updatedAt handling in fetchDepartments().
🤖 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/department/src/main/java/in/koreatech/koin/feature/department/screen/detail/DepartmentDetailViewModel.kt`:
- Around line 84-109: Update the shared search flow in search so it sets
searchUiState to Loading before calling
departmentRepository.getDepartmentContactsByCategory. Ensure both onSearch and
onRefresh, including retry from Failure, show Loading immediately while
preserving the existing Success, Empty, and Failure result handling.
- Around line 26-29: DepartmentDetailViewModel must not access
DepartmentRepository directly. Introduce or reuse use cases that encapsulate
fetchDepartments() and search(), inject those use cases into
DepartmentDetailViewModel, and update the corresponding fetchDepartments and
search flows to call only the use cases while preserving existing behavior.
In
`@feature/department/src/main/java/in/koreatech/koin/feature/department/screen/list/DepartmentListViewModel.kt`:
- Around line 24-26: DepartmentListViewModel이 DepartmentRepository를 직접 주입·호출하지
않도록 변경하세요. 기존 36행과 75행의 Repository 호출을 담당하는 적절한 use case로 이동하고, 생성자에는 해당 use
case를 주입해 ViewModel이 use case만 호출하도록 수정하세요.
---
Nitpick comments:
In
`@feature/department/src/main/java/in/koreatech/koin/feature/department/screen/detail/DepartmentDetailScreenContent.kt`:
- Line 47: Replace both hardcoded Color(0xFFF8F8FA) values in
DepartmentDetailScreenContent with the matching existing RebrandKoinTheme.colors
token, confirming the token name from the theme definition and preserving the
current background behavior.
In
`@feature/department/src/main/java/in/koreatech/koin/feature/department/screen/detail/DepartmentDetailViewModel.kt`:
- Around line 42-62: Refactor fetchDepartments() and search() to extract their
duplicated result-to-DepartmentSearchUiState mapping and reduce logic into a
shared helper. Reuse the helper for both success and failure paths while
preserving each operation’s existing state updates, including updatedAt handling
in fetchDepartments().
In
`@feature/department/src/main/java/in/koreatech/koin/feature/department/type/DepartmentCategory.kt`:
- Line 31: 명시적 공개 API 타입을 추가하세요. DepartmentCategory의 ALL 프로퍼티를
ImmutableList<DepartmentCategory>로 선언하고, DepartmentState의 toDepartmentState() 함수
반환 타입을 DepartmentState로 명시하세요.
🪄 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: 387a85e7-f7a0-48fa-87e1-61f2b5d93779
📒 Files selected for processing (42)
feature/department/.gitignorefeature/department/build.gradle.ktsfeature/department/consumer-rules.profeature/department/proguard-rules.profeature/department/src/main/AndroidManifest.xmlfeature/department/src/main/java/in/koreatech/koin/feature/department/DepartmentActivity.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/component/DepartmentCard.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/component/DepartmentCategoryList.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/component/DepartmentFooter.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/component/DepartmentLoadingList.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/component/DepartmentSearchField.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/component/DepartmentSearchResult.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/component/DepartmentStateView.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/component/DepartmentTaskTable.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/mock/DepartmentMock.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/navigation/DepartmentNavigation.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/navigation/Routes.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/screen/detail/DepartmentDetailScreen.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/screen/detail/DepartmentDetailScreenContent.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/screen/detail/DepartmentDetailState.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/screen/detail/DepartmentDetailViewModel.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/screen/list/DepartmentListScreen.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/screen/list/DepartmentListScreenContent.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/screen/list/DepartmentListState.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/screen/list/DepartmentListViewModel.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/state/DepartmentSearchUiState.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/state/DepartmentState.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/type/DepartmentCategory.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/util/ContextExtensions.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/util/DateFormatter.ktfeature/department/src/main/res/drawable/ic_department_academic.xmlfeature/department/src/main/res/drawable/ic_department_arrow_right.xmlfeature/department/src/main/res/drawable/ic_department_caution.xmlfeature/department/src/main/res/drawable/ic_department_copy.xmlfeature/department/src/main/res/drawable/ic_department_employment.xmlfeature/department/src/main/res/drawable/ic_department_facility.xmlfeature/department/src/main/res/drawable/ic_department_international.xmlfeature/department/src/main/res/drawable/ic_department_other.xmlfeature/department/src/main/res/drawable/ic_department_search.xmlfeature/department/src/main/res/drawable/ic_department_search_empty.xmlfeature/department/src/main/res/drawable/ic_department_student_support.xmlfeature/department/src/main/res/values/strings.xml
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/department/src/main/java/in/koreatech/koin/feature/department/state/DepartmentSearchFieldHandler.kt`:
- Around line 22-39: Update onQueryChange() so each non-blank query change
obtains and propagates a new request ID before the debounce delay and before the
prior fetch can complete; pass that ID into search() and ensure the result
application validates it, while preserving cancellation, loading, and
blank-query behavior.
🪄 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: ffd6e777-e4c7-43de-a1f2-73b28484360f
📒 Files selected for processing (12)
feature/department/src/main/java/in/koreatech/koin/feature/department/component/DepartmentSearchResult.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/component/DepartmentStateView.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/screen/detail/DepartmentDetailScreen.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/screen/detail/DepartmentDetailScreenContent.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/screen/detail/DepartmentDetailState.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/screen/detail/DepartmentDetailViewModel.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/screen/list/DepartmentListScreen.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/screen/list/DepartmentListScreenContent.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/screen/list/DepartmentListState.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/screen/list/DepartmentListViewModel.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/state/DepartmentSearchFieldHandler.ktfeature/department/src/main/java/in/koreatech/koin/feature/department/state/DepartmentSearchState.kt
🚧 Files skipped from review as they are similar to previous changes (4)
- feature/department/src/main/java/in/koreatech/koin/feature/department/screen/list/DepartmentListScreenContent.kt
- feature/department/src/main/java/in/koreatech/koin/feature/department/component/DepartmentSearchResult.kt
- feature/department/src/main/java/in/koreatech/koin/feature/department/screen/detail/DepartmentDetailState.kt
- feature/department/src/main/java/in/koreatech/koin/feature/department/screen/list/DepartmentListState.kt
|



PR 개요
이슈 번호: #1546
PR 체크리스트
작업사항
작업사항의 상세한 설명
학교 부서정보 화면 구현입니다
논의 사항
스크린샷
추가내용
Summary by CodeRabbit