Conversation
|
""" Walkthrough이 변경 사항은 앱의 주요 네비게이션 구조를 대폭 확장하여 홈, 추천 루틴, 마이페이지, 설정, 온보딩, 감정 기록 등 다양한 화면 간의 이동을 지원하도록 했습니다. 여러 화면에 네비게이션 콜백이 추가되고, 관련 데이터 및 UI 컴포넌트, MVI 상태, 도메인/데이터 계층의 로그아웃·탈퇴 기능이 구현되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant MainNavHost
participant HomeNavHost
participant SettingScreen
participant AuthRepository
User->>MainNavHost: 앱 시작/로그인 완료
MainNavHost->>HomeNavHost: 홈 네비게이션 진입
User->>HomeNavHost: 바텀 네비게이션 클릭(홈/추천/마이페이지)
HomeNavHost->>HomeNavHost: 화면 전환
User->>HomeNavHost: 설정 진입
HomeNavHost->>SettingScreen: navigateToSetting
User->>SettingScreen: 로그아웃/탈퇴 버튼 클릭
SettingScreen->>AuthRepository: logout()/withdrawal()
AuthRepository-->>SettingScreen: Result<Unit>
SettingScreen-->>MainNavHost: NavigateToLogin SideEffect
MainNavHost->>User: 로그인 화면 이동
Estimated code review effort🎯 4 (Complex) | ⏱️ ~40 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
""" Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
app/src/main/res/drawable/ic_mypage_fill.xml (1)
6-13: 중복 path 데이터 및 하드코드 색상 동일 이슈
ic_home_fill.xml에서 언급한 두 가지 포인트(중복 path, 고정 색상)가 동일하게 존재합니다.
한 번 최적화 방법을 정해두고 모든 fill 아이콘에 공통 적용해 주세요.
🧹 Nitpick comments (10)
app/src/main/res/drawable/ic_mypage_empty.xml (1)
6-8: 하드코드된 색상 값 대신 테마/리소스 색상 사용 권장
android:fillColor="#B4B8C4"처럼 직접 HEX 값을 박아 두면 다크 모드·브랜드 컬러 변경 시 매번 벡터 파일을 수정해야 합니다.
@color/...또는?attr/colorOnSurfaceVariant같은 테마 색상으로 치환해 두면 유지보수성이 크게 좋아집니다.app/src/main/res/drawable/ic_home_empty.xml (1)
7-12: 색상·선 굵기 하드코딩 → 리소스 치환 및 일관성 점검 필요
strokeColor="#B4B8C4",strokeWidth="2"모두 고정 값입니다. UI 전반에서 동일 굵기·색상을 쓰는 아이콘이라면@dimen/icon_stroke_width와@color/neutral400같은 공통 리소스로 빼 두는 편이 좋습니다.- 다크 모드 대응 시 stroke 색상이 눈에 띄게 어둡거나 밝을 수 있으니 테마 속성 활용을 고려해 주세요.
app/src/main/res/drawable/ic_home_fill.xml (2)
6-13: 중복 path 데이터로 인한 파일 용량·렌더링 오버헤드두 개의
<path>가 동일한pathData를 갖고 있고, 두 번째는 단순히 20% 투명 블랙을 덧씌워 그림자를 만드는 용도입니다.
가능하면 다음을 고려해 보세요:
- 첫 번째
path만 두고android:fillAlpha를 활용해 음영을 조절- 또는
<group android:alpha="0.2">로 감싼 뒤 path를 한 번만 선언아이콘 수가 많아지면 불필요한 중복이 앱 크기와 런타임 메모리에 영향을 줄 수 있습니다.
8-12: 색상 하드코딩 대신 테마 색상 사용 권장
#0D1B41과#000000역시 컬러 리소스/테마 속성으로 치환해 두면 향후 브랜드 색상 변경, 다크 모드 대응이 쉬워집니다.app/src/main/res/drawable/ic_recommend_empty.xml (1)
8-15: 아이콘 stroke/색상 하드코딩 → 테마 대응 어려움
strokeWidth="2"와strokeColor="#B4B8C4"는 다른 빈 상태 아이콘들과 동일한 문제를 공유합니다.
공통dimen·color리소스로 분리하여 일관성 및 다크 모드 대응력을 높여 주세요.presentation/src/main/java/com/threegap/bitnagil/presentation/recommendroutine/model/RecommendRoutine.kt (1)
12-12: ID 기본값 선택에 대한 검토 제안
id속성에 기본값으로"0"을 사용하는 것이 의도된 것인지 확인해 주세요. API 명세에 따라 다르겠지만, 초기화되지 않은 상태를 나타낼 때는 빈 문자열("") 또는 nullable 타입(String?)이 더 명확할 수 있습니다.- val id: String = "0", + val id: String = "",또는 nullable 타입 사용:
- val id: String = "0", + val id: String? = null,app/src/main/res/drawable/ic_report_fill.xml (1)
6-12: 중복된 path 데이터를 최적화하는 것을 고려해보세요.같은 pathData가 두 번 반복되어 있습니다. 시각적 효과를 위한 레이어링이라면 이해할 수 있지만, 성능 최적화를 위해 단일 path로 원하는 색상 효과를 구현할 수 있는지 검토해보세요.
만약 단순히 하나의 색상으로 충분하다면 다음과 같이 최적화할 수 있습니다:
- <path - android:pathData="M18.667,4C19.4,4 20,4.8 20,5.777V18.223C20,19.2 19.4,20 18.667,20H5.333C4.6,20 4,19.2 4,18.223V5.777C4,4.8 4.6,4 5.333,4H18.667ZM7.369,12C6.817,12 6.369,12.448 6.369,13C6.369,13.552 6.817,14 7.369,14H14.378C14.93,14 15.378,13.552 15.378,13C15.378,12.448 14.93,12 14.378,12H7.369ZM7.369,8C6.817,8 6.369,8.448 6.369,9C6.369,9.552 6.817,10 7.369,10H16.631C17.183,10 17.631,9.552 17.631,9C17.631,8.448 17.183,8 16.631,8H7.369Z" - android:fillColor="#0D1B41"/> - <path - android:pathData="M18.667,4C19.4,4 20,4.8 20,5.777V18.223C20,19.2 19.4,20 18.667,20H5.333C4.6,20 4,19.2 4,18.223V5.777C4,4.8 4.6,4 5.333,4H18.667ZM7.369,12C6.817,12 6.369,12.448 6.369,13C6.369,13.552 6.817,14 7.369,14H14.378C14.93,14 15.378,13.552 15.378,13C15.378,12.448 14.93,12 14.378,12H7.369ZM7.369,8C6.817,8 6.369,8.448 6.369,9C6.369,9.552 6.817,10 7.369,10H16.631C17.183,10 17.631,9.552 17.631,9C17.631,8.448 17.183,8 16.631,8H7.369Z" - android:fillColor="#000000" - android:fillAlpha="0.2"/> + <path + android:pathData="M18.667,4C19.4,4 20,4.8 20,5.777V18.223C20,19.2 19.4,20 18.667,20H5.333C4.6,20 4,19.2 4,18.223V5.777C4,4.8 4.6,4 5.333,4H18.667ZM7.369,12C6.817,12 6.369,12.448 6.369,13C6.369,13.552 6.817,14 7.369,14H14.378C14.93,14 15.378,13.552 15.378,13C15.378,12.448 14.93,12 14.378,12H7.369ZM7.369,8C6.817,8 6.369,8.448 6.369,9C6.369,9.552 6.817,10 7.369,10H16.631C17.183,10 17.631,9.552 17.631,9C17.631,8.448 17.183,8 16.631,8H7.369Z" + android:fillColor="#0D1B41"/>presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineScreen.kt (1)
119-119: 뒷버튼 아이콘 확인이 필요합니다.현재 뒷버튼에
R.drawable.ic_media_play아이콘을 사용하고 있는데, 이는 미디어 재생 아이콘으로 보입니다. 적절한 뒷버튼 아이콘으로 교체하는 것을 검토해보세요.app/src/main/java/com/threegap/bitnagil/MainNavHost.kt (1)
64-78: URL 하드코딩 개선을 권장합니다.약관 동의와 개인정보처리방침 URL이 여러 곳에서 반복적으로 하드코딩되어 있습니다. 상수나 설정 파일로 분리하는 것을 고려해보세요.
상수 파일을 만들어 URL을 관리하는 것을 제안합니다:
object WebUrls { const val TERMS_OF_SERVICE = "https://complex-wombat-99f.notion.site/2025-7-20-236f4587491d8071833adfaf8115bce2" const val PRIVACY_POLICY = "https://complex-wombat-99f.notion.site/2025-07-20-236f4587491d80308016eb810692d18b" }Also applies to: 125-138
app/src/main/java/com/threegap/bitnagil/navigation/home/HomeNavHost.kt (1)
22-22: Scaffold 패딩 파라미터 사용을 고려해보세요.
@SuppressLint로 경고를 억제하는 대신,paddingValues를 적절히 사용하는 것을 권장합니다.다음과 같이 패딩을 적용할 수 있습니다:
- content = { _ -> + content = { paddingValues -> NavHost( navController = navigator.navController, startDestination = navigator.startDestination, - modifier = modifier, + modifier = modifier.padding(paddingValues), ) {Also applies to: 42-42
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (30)
app/src/main/java/com/threegap/bitnagil/MainNavHost.kt(5 hunks)app/src/main/java/com/threegap/bitnagil/Route.kt(1 hunks)app/src/main/java/com/threegap/bitnagil/navigation/home/HomeBottomNavigationBar.kt(1 hunks)app/src/main/java/com/threegap/bitnagil/navigation/home/HomeNavHost.kt(1 hunks)app/src/main/java/com/threegap/bitnagil/navigation/home/HomeNavigator.kt(1 hunks)app/src/main/java/com/threegap/bitnagil/navigation/home/HomeRoute.kt(1 hunks)app/src/main/res/drawable/ic_home_empty.xml(1 hunks)app/src/main/res/drawable/ic_home_fill.xml(1 hunks)app/src/main/res/drawable/ic_mypage_empty.xml(1 hunks)app/src/main/res/drawable/ic_mypage_fill.xml(1 hunks)app/src/main/res/drawable/ic_recommend_empty.xml(1 hunks)app/src/main/res/drawable/ic_recommend_fill.xml(1 hunks)app/src/main/res/drawable/ic_report_empty.xml(1 hunks)app/src/main/res/drawable/ic_report_fill.xml(1 hunks)data/src/main/java/com/threegap/bitnagil/data/auth/datasource/AuthRemoteDataSource.kt(1 hunks)data/src/main/java/com/threegap/bitnagil/data/auth/datasourceimpl/AuthRemoteDataSourceImpl.kt(2 hunks)data/src/main/java/com/threegap/bitnagil/data/auth/repositoryimpl/AuthRepositoryImpl.kt(1 hunks)data/src/main/java/com/threegap/bitnagil/data/auth/service/AuthService.kt(1 hunks)domain/src/main/java/com/threegap/bitnagil/domain/auth/repository/AuthRepository.kt(1 hunks)domain/src/main/java/com/threegap/bitnagil/domain/auth/usecase/LogoutUseCase.kt(1 hunks)domain/src/main/java/com/threegap/bitnagil/domain/auth/usecase/WithdrawalUseCase.kt(1 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/home/HomeScreen.kt(7 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/recommendroutine/RecommendRoutineScreen.kt(6 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/recommendroutine/model/RecommendRoutine.kt(1 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingScreen.kt(6 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingViewModel.kt(5 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/setting/model/mvi/SettingIntent.kt(1 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/setting/model/mvi/SettingSideEffect.kt(1 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/setting/model/mvi/SettingState.kt(1 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineScreen.kt(4 hunks)
🧰 Additional context used
🧠 Learnings (5)
presentation/src/main/java/com/threegap/bitnagil/presentation/setting/model/mvi/SettingSideEffect.kt (1)
Learnt from: l5x5l
PR: #41
File: presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/model/MyPageIntent.kt:6-6
Timestamp: 2025-07-23T13:32:26.263Z
Learning: In the Bitnagil Android project's MVI architecture, Intent classes like LoadMyPageSuccess are named to represent successful API response results that carry loaded data, not just user actions. This naming convention is used for future API integration where the intent will be triggered when my page data loading succeeds from the server.
presentation/src/main/java/com/threegap/bitnagil/presentation/setting/model/mvi/SettingIntent.kt (1)
Learnt from: l5x5l
PR: #41
File: presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/model/MyPageIntent.kt:6-6
Timestamp: 2025-07-23T13:32:26.263Z
Learning: In the Bitnagil Android project's MVI architecture, Intent classes like LoadMyPageSuccess are named to represent successful API response results that carry loaded data, not just user actions. This naming convention is used for future API integration where the intent will be triggered when my page data loading succeeds from the server.
presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineScreen.kt (1)
Learnt from: l5x5l
PR: #38
File: presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/component/atom/textbutton/TextButton.kt:30-35
Timestamp: 2025-07-21T10:38:49.104Z
Learning: presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/component/atom/textbutton/TextButton.kt의 TextButton 컴포넌트는 임시로 구현된 컴포넌트로, 디자인 시스템 구현시 대체 예정입니다.
app/src/main/java/com/threegap/bitnagil/navigation/home/HomeRoute.kt (2)
Learnt from: l5x5l
PR: #41
File: presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/model/MyPageState.kt:6-14
Timestamp: 2025-07-23T13:31:46.809Z
Learning: In the Bitnagil Android project, MviState interface extends Parcelable, so any class implementing MviState automatically implements Parcelable. Therefore, @parcelize annotation works correctly without explicitly adding Parcelable implementation.
Learnt from: l5x5l
PR: #41
File: presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/model/MyPageState.kt:6-14
Timestamp: 2025-07-23T13:31:46.809Z
Learning: In the Bitnagil Android project, MviState interface extends Parcelable, so any class implementing MviState automatically implements Parcelable. Therefore, @parcelize annotation works correctly without explicitly adding Parcelable implementation.
presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingViewModel.kt (3)
Learnt from: l5x5l
PR: #41
File: presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/model/MyPageIntent.kt:6-6
Timestamp: 2025-07-23T13:32:26.263Z
Learning: In the Bitnagil Android project's MVI architecture, Intent classes like LoadMyPageSuccess are named to represent successful API response results that carry loaded data, not just user actions. This naming convention is used for future API integration where the intent will be triggered when my page data loading succeeds from the server.
Learnt from: l5x5l
PR: #41
File: presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/model/MyPageState.kt:6-14
Timestamp: 2025-07-23T13:31:46.809Z
Learning: In the Bitnagil Android project, MviState interface extends Parcelable, so any class implementing MviState automatically implements Parcelable. Therefore, @parcelize annotation works correctly without explicitly adding Parcelable implementation.
Learnt from: l5x5l
PR: #41
File: presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/model/MyPageState.kt:6-14
Timestamp: 2025-07-23T13:31:46.809Z
Learning: In the Bitnagil Android project, MviState interface extends Parcelable, so any class implementing MviState automatically implements Parcelable. Therefore, @parcelize annotation works correctly without explicitly adding Parcelable implementation.
🧬 Code Graph Analysis (4)
data/src/main/java/com/threegap/bitnagil/data/auth/datasourceimpl/AuthRemoteDataSourceImpl.kt (1)
data/src/main/java/com/threegap/bitnagil/data/common/SafeApiCall.kt (1)
safeUnitApiCall(27-35)
presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingViewModel.kt (1)
presentation/src/main/java/com/threegap/bitnagil/presentation/common/mviviewmodel/MviViewModel.kt (2)
sendSideEffect(23-23)sendIntent(30-37)
app/src/main/java/com/threegap/bitnagil/navigation/home/HomeBottomNavigationBar.kt (1)
app/src/main/java/com/threegap/bitnagil/navigation/home/HomeNavigator.kt (1)
rememberHomeNavigator(14-18)
presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingScreen.kt (1)
presentation/src/main/java/com/threegap/bitnagil/presentation/setting/component/block/settingrowbutton/SettingRowButton.kt (1)
SettingRowButton(17-42)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (38)
presentation/src/main/java/com/threegap/bitnagil/presentation/setting/model/mvi/SettingSideEffect.kt (1)
5-7: MVI 아키텍처 패턴을 잘 따른 구현입니다로그아웃/탈퇴 기능과 연계된 네비게이션 사이드 이펙트가 올바르게 추가되었습니다.
data object사용과 명명 규칙이 프로젝트의 MVI 패턴과 일치합니다.presentation/src/main/java/com/threegap/bitnagil/presentation/setting/model/mvi/SettingState.kt (2)
12-12: 로딩 상태 관리 구현이 적절합니다로그아웃/탈퇴 기능의 비동기 작업 처리를 위한
loading상태가 올바르게 추가되었습니다. 기존 상태 구조와 일관성을 유지하고 있습니다.
20-20: 초기값 설정이 올바릅니다
Init객체에서loading = false로 초기값을 설정한 것이 적절합니다.data/src/main/java/com/threegap/bitnagil/data/auth/datasource/AuthRemoteDataSource.kt (1)
12-14: 인터페이스 확장이 잘 설계되었습니다로그아웃과 탈퇴 기능을 위한 새로운 메서드들이 기존 패턴과 일관성 있게 추가되었습니다.
Result<Unit>반환 타입과suspend함수 사용이 적절합니다.app/src/main/res/drawable/ic_report_empty.xml (1)
1-18: 벡터 드로어블 리소스가 올바르게 구현되었습니다레포트 아이콘의 empty 상태가 적절한 크기(24dp)와 색상(#B4B8C4)으로 구현되었습니다. 네비게이션 시스템의 아이콘 세트와 일관성을 유지하고 있습니다.
domain/src/main/java/com/threegap/bitnagil/domain/auth/repository/AuthRepository.kt (1)
15-17: 인터페이스 확장이 적절합니다.로그아웃과 회원탈퇴 메서드가 기존 패턴과 일관성 있게 정의되었습니다.
Result<Unit>반환 타입이 적절하며, 매개변수가 필요하지 않은 것도 맞습니다.domain/src/main/java/com/threegap/bitnagil/domain/auth/usecase/WithdrawalUseCase.kt (1)
6-10: 클린 아키텍처 원칙을 잘 따르고 있습니다.UseCase 구현이 단순하고 명확합니다. operator 함수를 사용한 것도 단일 목적의 use case에 적합한 패턴입니다. 의존성 주입과 repository 위임 방식도 올바릅니다.
data/src/main/java/com/threegap/bitnagil/data/auth/service/AuthService.kt (1)
25-29: 인증 서비스 인터페이스 변경 승인 및 엔드포인트 정의 확인
- data/src/main/java/com/threegap/bitnagil/data/auth/service/AuthService.kt 에
postWithdrawal()와postLogout()가 정상 추가됨- core/network/src/main/java/com/threegap/bitnagil/network/token/ReissueService.kt 에서도
/api/v1/auth/*경로 일관성 확인됨해당 변경은 RESTful 설계 원칙과 기존 패턴을 잘 준수하고 있습니다.
백엔드 API 문서상의 엔드포인트 경로와 실제 구현이 완전히 일치하는지 최종 검증을 부탁드립니다.presentation/src/main/java/com/threegap/bitnagil/presentation/setting/model/mvi/SettingIntent.kt (1)
15-20: 로그아웃 및 탈퇴 Intent 구현이 적절합니다.MVI 아키텍처에 맞게 Loading, Success, Failure 상태를 명확히 구분하여 정의했으며, 기존 코드 패턴과 일관성을 유지하고 있습니다. 네이밍도 직관적이고 명확합니다.
domain/src/main/java/com/threegap/bitnagil/domain/auth/usecase/LogoutUseCase.kt (1)
6-10: 깔끔한 로그아웃 Use Case 구현입니다.Clean Architecture 원칙에 따라 잘 구현되었습니다.
Result<Unit>반환 타입과 suspend 함수 사용이 적절하며, 의존성 주입도 올바르게 적용되었습니다.app/src/main/res/drawable/ic_recommend_fill.xml (1)
1-30: 벡터 드로어블이 잘 구현되었습니다.돋보기 아이콘을 layered stroke 효과로 구현하여 시각적으로 깔끔합니다. 스트로크 두께와 색상이 일관성 있게 적용되었고, 24dp 표준 크기를 사용했습니다.
presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineScreen.kt (1)
49-49: 뒷버튼 네비게이션 콜백이 올바르게 구현되었습니다.컨테이너에서 화면까지 콜백이 적절히 전달되고, MVI 사이드 이펙트와 잘 연동되어 있습니다. Compose의 표준 패턴을 따르고 있습니다.
Also applies to: 82-82, 98-98, 115-115
app/src/main/java/com/threegap/bitnagil/Route.kt (1)
28-41: 새로운 Route 정의가 적절합니다.기존 패턴을 일관성 있게 따르고 있으며,
@Serializable어노테이션도 올바르게 적용되었습니다.WriteRoutine의 매개변수 설계도 합리적입니다 -routineId의 nullable 타입과isRegister의 기본값true가 적절합니다.app/src/main/java/com/threegap/bitnagil/navigation/home/HomeRoute.kt (1)
5-15: 잘 구현된 네비게이션 라우트 정의입니다.Kotlin Serialization과 sealed class를 적절히 활용하여 타입 안전한 네비게이션 구조를 만들었습니다. 라우트 경로 패턴도 일관성 있게 정의되어 있습니다.
data/src/main/java/com/threegap/bitnagil/data/auth/datasourceimpl/AuthRemoteDataSourceImpl.kt (1)
25-33: 로그아웃 및 회원탈퇴 기능이 올바르게 구현되었습니다.
safeUnitApiCall을 사용하여 일관된 에러 처리를 구현하고 있으며, 기존 코드 패턴을 잘 따르고 있습니다.app/src/main/java/com/threegap/bitnagil/navigation/home/HomeNavigator.kt (1)
8-18: 효율적인 네비게이터 패턴 구현입니다.
remember를 사용한 상태 관리와 기본값 제공으로 사용성이 좋습니다. HomeRoute와의 결합도도 적절히 관리되고 있습니다.app/src/main/java/com/threegap/bitnagil/MainNavHost.kt (3)
32-38: 적절한 백스택 관리로 네비게이션 플로우가 개선되었습니다.스플래시와 로그인에서 홈으로 이동할 때
popUpTo를 사용하여 백버튼으로 되돌아가지 않도록 처리한 것이 좋습니다.Also applies to: 50-56
87-107: 홈 네비게이션 구조가 잘 확장되었습니다.
HomeNavHost로 대체하면서 다양한 네비게이션 콜백을 체계적으로 관리하고 있습니다. 라우트 매개변수 전달 방식도 적절합니다.
140-146: 로그아웃 시 전체 백스택 클리어가 올바르게 구현되었습니다.
popUpTo(0)을 사용하여 로그아웃 후 모든 화면 기록을 제거하는 것이 보안상 적절합니다.app/src/main/java/com/threegap/bitnagil/navigation/home/HomeNavHost.kt (2)
21-76: 홈 섹션 네비게이션 구조가 체계적으로 구현되었습니다.Scaffold를 활용한 바텀 네비게이션과 각 화면별 네비게이션 콜백 전달이 잘 조직되어 있습니다.
78-90: DoubleBackButtonPressedHandler Activity 캐스팅 안전성 검증 완료
rg검색 결과 해당 패턴은HomeNavHost.kt의 한 곳뿐이며, Compose UI가 Activity 내에서 호출되므로LocalContext.current가 Activity 컨텍스트를 반환하는 것이 보장됩니다. 이미as? Activity로 안전하게 캐스팅하고 있어 null일 경우 아무 동작도 하지 않으므로 예외 발생 위험이 없습니다. 추가 조치는 필요하지 않습니다.presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingViewModel.kt (2)
5-6: 의존성 주입이 올바르게 구현되었습니다.LogoutUseCase와 WithdrawalUseCase가 적절히 주입되어 인증 관련 기능을 처리할 수 있도록 구성되었습니다.
Also applies to: 21-22
92-112: 비동기 작업 처리가 적절히 구현되었습니다.viewModelScope를 사용하여 코루틴을 관리하고, Result 타입의 onSuccess/onFailure를 통해 적절히 상태를 전환하고 있습니다. MVI 패턴에 따라 Intent를 통해 상태 변경을 처리하는 것도 올바른 접근입니다.
app/src/main/java/com/threegap/bitnagil/navigation/home/HomeBottomNavigationBar.kt (3)
29-81: 하단 네비게이션 바 구현이 잘 되었습니다.NavController를 사용하여 현재 백스택 엔트리를 추적하고,
popUpTo(0) { inclusive = true }를 통해 백스택을 정리하는 네비게이션 로직이 적절합니다. 각 네비게이션 아이템의 선택 상태 관리도 올바르게 구현되었습니다.
83-123: 네비게이션 아이템 컴포넌트가 잘 구현되었습니다.MutableInteractionSource를 사용하여 터치 상태를 관리하고, 상태에 따른 색상 변경 로직이 적절합니다. 선택된 상태에 따라 아이콘을 변경하는 로직도 올바르게 구현되었습니다.
125-134: Preview 구현이 적절합니다.rememberHomeNavigator를 사용하여 NavController를 제공하는 방식이 올바르며, 컴포넌트의 시각적 확인이 가능하도록 구성되었습니다.
presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingScreen.kt (4)
39-42: 네비게이션 콜백 파라미터가 적절히 정의되었습니다.설정 화면에서 필요한 모든 네비게이션 동작을 위한 콜백들이 명확하게 정의되어 있습니다.
46-50: 사이드 이펙트 처리가 올바르게 구현되었습니다.
collectAsEffect를 사용하여 사이드 이펙트를 구독하고, NavigateToLogin 사이드 이펙트 발생 시 적절히 네비게이션 콜백을 호출하고 있습니다.
57-61: UI 콜백 연결이 적절히 구현되었습니다.이전의 빈 람다들을 실제 네비게이션 콜백과 ViewModel 메서드로 교체하여 기능이 동작하도록 구현되었습니다. 뒤로가기, 약관 페이지 이동, 로그아웃, 탈퇴 등 모든 기능이 적절한 콜백에 연결되었습니다.
Also applies to: 71-75, 93-93, 183-183, 185-185, 195-195, 197-197
211-211: Preview 업데이트가 적절합니다.새로 추가된 loading 상태와 네비게이션 콜백 파라미터들이 Preview에 올바르게 반영되었습니다.
Also applies to: 216-220
presentation/src/main/java/com/threegap/bitnagil/presentation/recommendroutine/RecommendRoutineScreen.kt (4)
45-46: 네비게이션 콜백 파라미터가 적절히 추가되었습니다.감정 기록 화면과 루틴 등록 화면으로의 네비게이션을 위한 콜백들이 명확하게 정의되고 하위 컴포넌트로 전달되고 있습니다.
Also applies to: 64-65
76-77: Screen 컴포넌트 시그니처가 올바르게 업데이트되었습니다.네비게이션 콜백들이 적절한 타입으로 정의되어 있으며, 감정 추천 루틴 버튼과 루틴 등록을 위한 콜백이 명확히 구분되어 있습니다.
174-174: UI 콜백 연결이 적절히 구현되었습니다.EmotionRecommendRoutineButton의 onClick과 RecommendRoutineItem의 onAddRoutineClick이 각각 적절한 네비게이션 콜백에 연결되었습니다. 특히 루틴 ID를 전달하는 부분이 올바르게 구현되었습니다.
Also applies to: 185-185
212-213: Preview 업데이트가 적절합니다.새로 추가된 네비게이션 콜백 파라미터들이 빈 람다로 적절히 처리되어 Preview가 정상 동작하도록 구성되었습니다.
presentation/src/main/java/com/threegap/bitnagil/presentation/home/HomeScreen.kt (4)
48-50: 네비게이션 콜백 파라미터가 적절hi 정의되었습니다.홈 화면에서 필요한 루틴 등록, 루틴 편집, 감정 기록으로의 네비게이션을 위한 콜백들이 명확하게 정의되어 있습니다. 루틴 편집의 경우 루틴 ID를 받는 타입으로 적절히 구성되었습니다.
71-71: 하위 컴포넌트로의 콜백 전달이 올바르게 구현되었습니다.RoutineDetailsBottomSheet의 onEdit에 navigateToEditRoutine을 전달하고, HomeScreen의 onRegisterRoutineClick과 onRegisterEmotionClick에 각각 적절한 콜백을 전달하고 있습니다.
Also applies to: 122-123
137-138: Screen 컴포넌트의 콜백 사용이 적절합니다.RoutineEmptyView와 CollapsibleHomeHeader에서 각각 루틴 등록과 감정 기록 콜백이 올바르게 연결되어 사용자 액션이 적절한 네비게이션으로 이어지도록 구현되었습니다.
Also applies to: 186-186, 250-250
267-268: Preview 업데이트가 적절합니다.새로 추가된 네비게이션 콜백 파라미터들이 빈 람다로 적절히 처리되어 Preview가 정상 동작하도록 구성되었습니다.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
data/src/main/java/com/threegap/bitnagil/data/auth/datasourceimpl/AuthLocalDataSourceImpl.kt (1)
21-24: 구현이 올바르지만 minor 일관성 이슈가 있습니다.
clearAuthToken()메서드 구현이 기존 패턴을 잘 따르고 있습니다. 다만 기존updateAuthToken()메서드는runCatching을 사용하는 반면, 새 메서드는kotlin.runCatching을 사용하고 있어 import 사용에 약간의 불일치가 있습니다.일관성을 위해 다음과 같이 수정하는 것을 고려해보세요:
- override suspend fun clearAuthToken(): Result<Unit> = - kotlin.runCatching { - authTokenDataStore.clearAuthToken() - } + override suspend fun clearAuthToken(): Result<Unit> = + runCatching { + authTokenDataStore.clearAuthToken() + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
data/src/main/java/com/threegap/bitnagil/data/auth/datasource/AuthLocalDataSource.kt(1 hunks)data/src/main/java/com/threegap/bitnagil/data/auth/datasourceimpl/AuthLocalDataSourceImpl.kt(1 hunks)data/src/main/java/com/threegap/bitnagil/data/auth/repositoryimpl/AuthRepositoryImpl.kt(1 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingViewModel.kt(5 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- data/src/main/java/com/threegap/bitnagil/data/auth/repositoryimpl/AuthRepositoryImpl.kt
- presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingViewModel.kt
🧰 Additional context used
🧠 Learnings (1)
data/src/main/java/com/threegap/bitnagil/data/auth/datasource/AuthLocalDataSource.kt (3)
Learnt from: wjdrjs00
PR: #25
File: presentation/src/main/java/com/threegap/bitnagil/presentation/splash/SplashViewModel.kt:50-65
Timestamp: 2025-07-11T03:54:23.348Z
Learning: AuthTokenDataStoreImpl.hasToken() 메소드에서 예외 발생 시 false를 반환하도록 이미 예외 처리가 구현되어 있어, 상위 레이어에서 추가적인 예외 처리가 불필요합니다.
Learnt from: wjdrjs00
PR: #25
File: presentation/src/main/java/com/threegap/bitnagil/presentation/splash/SplashViewModel.kt:50-65
Timestamp: 2025-07-11T03:54:23.348Z
Learning: AuthTokenDataStoreImpl.hasToken() 메소드에서 예외 발생 시 false를 반환하도록 이미 예외 처리가 구현되어 있어, 상위 레이어에서 추가적인 예외 처리가 불필요합니다.
Learnt from: wjdrjs00
PR: #25
File: presentation/src/main/java/com/threegap/bitnagil/presentation/splash/SplashViewModel.kt:50-65
Timestamp: 2025-07-11T03:54:23.348Z
Learning: AuthTokenDataStoreImpl.hasToken() 메소드에서 예외 발생 시 false를 반환하도록 이미 예외 처리가 구현되어 있어, 상위 레이어에서 추가적인 예외 처리가 불필요합니다.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (1)
data/src/main/java/com/threegap/bitnagil/data/auth/datasource/AuthLocalDataSource.kt (1)
8-8: 인터페이스 메서드 추가가 일관성 있게 구현되었습니다.새로 추가된
clearAuthToken()메서드가 기존updateAuthToken()메서드와 동일한 패턴(suspend fun과Result<Unit>반환 타입)을 따르고 있어 인터페이스 설계의 일관성을 유지하고 있습니다. 로그아웃 및 탈퇴 기능 구현을 위한 적절한 추가입니다.
wjdrjs00
left a comment
There was a problem hiding this comment.
네비 작업,, 고생 많으셨습니다요..!
몇가지 리뷰를 남겨봤는데 확인 부탁 드립니다요~!
추가로 현재 mainNavigator를 단순 startDestination용으로만 사용하고 있는데, 네비게이션 관련 코드들을 해당 클래스안에 구현하여 접근하는 방식도 좋을거 같습니다.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/src/main/java/com/threegap/bitnagil/MainNavHost.kt (1)
119-148: 설정 화면 네비게이션이 올바르게 구현되었으나 URL 중복이 있습니다.로그아웃/탈퇴 시나리오에서 전체 백스택을 정리하는 것이 적절합니다.
URL 상수를 별도로 추출하여 중복을 제거하는 것을 권장합니다:
object WebViewUrls { const val TERMS_OF_SERVICE = "https://complex-wombat-99f.notion.site/2025-7-20-236f4587491d8071833adfaf8115bce2" const val PRIVACY_POLICY = "https://complex-wombat-99f.notion.site/2025-07-20-236f4587491d80308016eb810692d18b" }이를 통해 127-128, 135-136번 라인과 67-68, 75-76번 라인의 URL 중복을 제거할 수 있습니다.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
app/src/main/java/com/threegap/bitnagil/MainNavHost.kt(5 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingScreen.kt(6 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingViewModel.kt(5 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/setting/model/mvi/SettingSideEffect.kt(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
- presentation/src/main/java/com/threegap/bitnagil/presentation/setting/model/mvi/SettingSideEffect.kt
- presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingScreen.kt
- presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingViewModel.kt
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/src/main/java/com/threegap/bitnagil/MainNavHost.kt (5)
app/src/main/java/com/threegap/bitnagil/navigation/home/HomeNavHost.kt (1)
HomeNavHost(23-76)presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingScreen.kt (1)
SettingScreenContainer(36-63)presentation/src/main/java/com/threegap/bitnagil/presentation/onboarding/OnBoardingScreen.kt (1)
OnBoardingScreenContainer(27-57)presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineScreen.kt (1)
WriteRoutineScreenContainer(46-84)presentation/src/main/java/com/threegap/bitnagil/presentation/emotion/EmotionScreen.kt (1)
EmotionScreenContainer(36-54)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (7)
app/src/main/java/com/threegap/bitnagil/MainNavHost.kt (7)
8-9: 새로운 화면들에 대한 임포트가 적절히 추가되었습니다.네비게이션 구조 확장에 필요한 모든 화면 컨테이너들이 올바르게 임포트되었습니다.
Also applies to: 12-13, 17-17
32-38: 스플래시 화면 네비게이션이 올바르게 구현되었습니다.홈 화면으로 이동할 때 백스택을 정리하여 사용자가 스플래시 화면으로 되돌아가지 않도록 하는 적절한 UX 패턴입니다.
50-56: 로그인 화면 네비게이션이 적절히 구현되었습니다.로그인 성공 후 백스택을 정리하여 사용자가 로그인 화면으로 되돌아가지 않도록 하는 올바른 인증 플로우입니다.
79-81: 약관 동의 후 온보딩 네비게이션이 적절히 구현되었습니다.사용자가 온보딩 중에 약관을 다시 확인할 수 있도록 백스택을 유지하는 것이 적절합니다.
87-107: 홈 화면의 네비게이션 구조가 크게 개선되었습니다.
HomeNavHost를 사용한 중첩 네비게이션 구조가 잘 구현되었습니다. 공지사항과 Q&A 콜백이 비어있는 것은 PR 목표에서 언급한 대로 향후 구현 예정인 것으로 보입니다.루틴 등록과 편집이 동일한 라우트를 사용하되
isRegister파라미터로 구분하는 것이 적절합니다.
150-163: 온보딩 화면 네비게이션이 적절히 구현되었습니다.온보딩 완료 후 홈 화면으로 이동할 때 백스택을 정리하고, 온보딩 과정 중에는 이전 화면으로 돌아갈 수 있도록 하는 올바른 UX 플로우입니다.
165-179: 루틴 작성 화면과 감정 화면의 네비게이션이 올바르게 구현되었습니다.두 화면 모두 간단한 뒤로 가기 네비게이션을 제공하며, 루틴 작성 화면은 라우트 파라미터를 통해 등록/편집 모드를 자동으로 구분할 수 있습니다.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
app/src/main/java/com/threegap/bitnagil/navigation/home/HomeRoute.kt (2)
5-10: 프로퍼티 네이밍 일관성 개선이 필요합니다.아이콘 리소스 ID 프로퍼티의 네이밍에 일관성이 부족합니다. 코틀린 네이밍 컨벤션을 따라 개선하는 것을 권장합니다.
다음과 같이 개선할 수 있습니다:
enum class HomeRoute( val route: String, val title: String, - val selectIconResourceId: Int, - val unSelectIconResourceId: Int, + val selectedIconResourceId: Int, + val unselectedIconResourceId: Int, ) {
11-31: enum 엔트리 구조는 좋지만 불필요한 세미콜론을 제거해주세요.각 enum 엔트리의 구조와 네이밍 패턴이 일관성 있게 잘 정의되어 있습니다. 다만 코틀린에서는 마지막 enum 엔트리 뒤의 세미콜론이 불필요합니다.
MyPage( route = "home/my_page", title = "마이페이지", selectIconResourceId = R.drawable.ic_mypage_fill, unSelectIconResourceId = R.drawable.ic_mypage_empty, ), - ;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
app/src/main/java/com/threegap/bitnagil/navigation/home/HomeBottomNavigationBar.kt(1 hunks)app/src/main/java/com/threegap/bitnagil/navigation/home/HomeRoute.kt(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- app/src/main/java/com/threegap/bitnagil/navigation/home/HomeBottomNavigationBar.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (2)
app/src/main/java/com/threegap/bitnagil/navigation/home/HomeRoute.kt (2)
1-3: 패키지 구조와 임포트가 적절합니다.네비게이션 관련 코드의 패키지 구조가 명확하고, 필요한 리소스만 임포트하고 있어 좋습니다.
5-32: 현재 구현이 Bottom Navigation 요구사항에 적합합니다.이전 리뷰에서 Type-safe navigation 사용을 제안했지만, BottomNavigationBar에서 현재 route를 확인하기 위해 문자열 사용이 필요하다는 설명이 타당합니다. 현재 구현이 요구사항을 잘 충족하고 있습니다.
[ PR Content ]
지금까지 구현한 화면들을 연결합니다.
Related issue
Screenshot 📸
KakaoTalk_Video_2025-07-27-19-28-33.mp4
Work Description
To Reviewers 📢
Summary by CodeRabbit
신규 기능
UI 개선
버그 수정 및 개선
로딩 상태 표시