Conversation
collectAsRetainedState의 초기값을 IDLE로 설정
… 으로 이동 이거 실수하기 너무 좋은 듯
Walkthrough자동 로그인 기능을 위한 상태 관리와 흐름이 도입되었습니다. 새로운 AutoLoginState enum이 추가되었고, AuthRepository 및 DefaultAuthRepository에 autoLoginState 플로우가 구현되었습니다. SplashPresenter와 SplashUiState는 온보딩 및 자동 로그인 상태를 기반으로 동작하도록 변경되었습니다. 앱 이름 문자열 리소스도 변경되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant SplashPresenter
participant UserRepository
participant AuthRepository
participant Navigator
SplashPresenter->>UserRepository: onboardingState 구독
SplashPresenter->>AuthRepository: autoLoginState 구독
Note right of SplashPresenter: 상태 변화 감지
alt 온보딩 미완료
SplashPresenter->>Navigator: 온보딩 화면 이동
else 온보딩 완료 & 자동 로그인 LOGGED_IN
SplashPresenter->>Navigator: 메인 화면 이동
else 온보딩 완료 & 자동 로그인 NOT_LOGGED_IN
SplashPresenter->>Navigator: 로그인 화면 이동
else 상태 IDLE
Note right of SplashPresenter: 대기
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used🧠 Learnings (4)📓 Common learnings📚 Learning: kotlin에서 같은 패키지 내의 파일들은 패키지 레벨에 정의된 const val 상수를 import 없이 직접 접근할 수 있습니다. onboardingpresenter.kt와 o...Applied to files:
📚 Learning: in circuit architecture, presenters receive the screen object directly as a constructor parameter (e...Applied to files:
📚 Learning: in the reed-android project using circuit architecture, delegatingnavigator was restored because nav...Applied to files:
⏰ 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)
🔇 Additional comments (11)
✨ 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: 0
🧹 Nitpick comments (1)
core/data/impl/src/main/kotlin/com/ninecraft/booket/core/data/impl/repository/DefaultUserRepository.kt (1)
7-8: 자동 로그인 상태 구현이 올바릅니다.토큰의 존재 여부에 따른 로그인 상태 매핑이 적절하며, 반응형 Flow 변환을 올바르게 사용했습니다.
when표현식을 더 간단한if-else로 개선할 수 있습니다:- override val autoLoginState: Flow<AutoLoginState> = tokenDataSource.accessToken - .map { accessToken -> - when { - accessToken.isBlank() -> AutoLoginState.NOT_LOGGED_IN - else -> AutoLoginState.LOGGED_IN - } - } + override val autoLoginState: Flow<AutoLoginState> = tokenDataSource.accessToken + .map { accessToken -> + if (accessToken.isBlank()) { + AutoLoginState.NOT_LOGGED_IN + } else { + AutoLoginState.LOGGED_IN + } + }Also applies to: 10-11, 17-17, 29-35
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
core/data/api/src/main/kotlin/com/ninecraft/booket/core/data/api/repository/UserRepository.kt(2 hunks)core/data/impl/src/main/kotlin/com/ninecraft/booket/core/data/impl/repository/DefaultUserRepository.kt(2 hunks)core/datastore/api/src/main/kotlin/com/ninecraft/booket/core/datastore/api/datasource/AutoLoginDataSource.kt(1 hunks)core/designsystem/src/main/res/values/strings.xml(1 hunks)core/model/src/main/kotlin/com/ninecraft/booket/core/model/AutoLoginState.kt(1 hunks)feature/main/src/main/kotlin/com/ninecraft/booket/feature/main/splash/SplashPresenter.kt(2 hunks)feature/main/src/main/kotlin/com/ninecraft/booket/feature/main/splash/SplashUiState.kt(1 hunks)
🧰 Additional context used
🧠 Learnings (9)
📓 Common learnings
Learnt from: easyhooon
PR: YAPP-Github/Reed-Android#61
File: feature/webview/build.gradle.kts:17-21
Timestamp: 2025-07-20T12:34:23.786Z
Learning: Reed-Android 프로젝트에서는 `booket.android.feature` convention plugin을 사용하여 feature 모듈들의 공통 의존성을 관리한다. 이 plugin은 Circuit, Compose, 그리고 core 모듈들의 의존성을 자동으로 포함하므로, 각 feature 모듈의 build.gradle.kts에서는 특별한 의존성(예: libs.logger, libs.kakao.auth)만 별도로 선언하면 된다.
📚 Learning: reed-android 프로젝트는 현재 다국어 지원 계획이 없어서 모델에 한글 문자열을 직접 포함하는 것이 허용된다....
Learnt from: easyhooon
PR: YAPP-Github/Reed-Android#88
File: core/model/src/main/kotlin/com/ninecraft/booket/core/model/EmotionModel.kt:11-18
Timestamp: 2025-07-31T16:58:59.404Z
Learning: Reed-Android 프로젝트는 현재 다국어 지원 계획이 없어서 모델에 한글 문자열을 직접 포함하는 것이 허용된다.
Applied to files:
core/designsystem/src/main/res/values/strings.xml
📚 Learning: reed android 프로젝트에서 타이포그래피 사용 규칙: 톱 앱바(top app bar)에서는 `headline2semibold`를 사용하고, 바텀시트(bottom sheet)...
Learnt from: seoyoon513
PR: YAPP-Github/Reed-Android#45
File: core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/appbar/ReedTopAppBar.kt:65-65
Timestamp: 2025-07-12T01:33:57.101Z
Learning: Reed Android 프로젝트에서 타이포그래피 사용 규칙: 톱 앱바(Top App Bar)에서는 `headline2SemiBold`를 사용하고, 바텀시트(Bottom Sheet)에서는 `heading2SemiBold`를 사용한다. 이는 의도적인 디자인 시스템 차별화이다.
Applied to files:
core/designsystem/src/main/res/values/strings.xml
📚 Learning: reed-android 프로젝트에서 core:model 모듈은 순수 kotlin 모듈이므로 android 리소스(r.string 등)에 접근할 수 없다....
Learnt from: easyhooon
PR: YAPP-Github/Reed-Android#88
File: core/model/src/main/kotlin/com/ninecraft/booket/core/model/EmotionModel.kt:11-18
Timestamp: 2025-07-31T16:58:59.404Z
Learning: Reed-Android 프로젝트에서 core:model 모듈은 순수 Kotlin 모듈이므로 Android 리소스(R.string 등)에 접근할 수 없다.
Applied to files:
core/designsystem/src/main/res/values/strings.xml
📚 Learning: in the reed-android project's termsagreementscreen.kt, the ontermdetailclick event is intentionally ...
Learnt from: seoyoon513
PR: YAPP-Github/Reed-Android#35
File: feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/TermsAgreementScreen.kt:127-127
Timestamp: 2025-07-09T01:14:29.836Z
Learning: In the Reed-Android project's TermsAgreementScreen.kt, the OnTermDetailClick event is intentionally passed an empty string for the URL parameter because the actual URLs for terms detail pages haven't been decided yet. This is a temporary implementation that will be updated once the URLs are finalized.
Applied to files:
core/designsystem/src/main/res/values/strings.xml
📚 Learning: reed-android 프로젝트에서는 api가 준비되지 않은 상황에서 ui를 먼저 구현하고, api 연동 시점에 하드코딩된 데이터를 실제 데이터로 교체하는 개발 방식을 사용한다. ...
Learnt from: easyhooon
PR: YAPP-Github/Reed-Android#88
File: feature/detail/src/main/kotlin/com/ninecraft/booket/feature/detail/book/component/RecordItem.kt:29-37
Timestamp: 2025-07-31T23:17:40.054Z
Learning: Reed-Android 프로젝트에서는 API가 준비되지 않은 상황에서 UI를 먼저 구현하고, API 연동 시점에 하드코딩된 데이터를 실제 데이터로 교체하는 개발 방식을 사용한다. RecordItem 컴포넌트의 emotionTags 매개변수도 API 연동 시점에 `text = emotionTags.joinToString(separator = "·") { "#$it" }`로 적용될 예정이다.
Applied to files:
core/designsystem/src/main/res/values/strings.xml
📚 Learning: reed-android 프로젝트에서는 `booket.android.feature` convention plugin을 사용하여 feature 모듈들의 공통 의존성을 관리한다. 이 p...
Learnt from: easyhooon
PR: YAPP-Github/Reed-Android#61
File: feature/webview/build.gradle.kts:17-21
Timestamp: 2025-07-20T12:34:23.786Z
Learning: Reed-Android 프로젝트에서는 `booket.android.feature` convention plugin을 사용하여 feature 모듈들의 공통 의존성을 관리한다. 이 plugin은 Circuit, Compose, 그리고 core 모듈들의 의존성을 자동으로 포함하므로, 각 feature 모듈의 build.gradle.kts에서는 특별한 의존성(예: libs.logger, libs.kakao.auth)만 별도로 선언하면 된다.
Applied to files:
core/designsystem/src/main/res/values/strings.xml
📚 Learning: reed android 프로젝트에서는 다크모드/라이트모드 대응 계획이 없고 기본 테마 값만 사용할 예정이다....
Learnt from: seoyoon513
PR: YAPP-Github/Reed-Android#32
File: core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/theme/Theme.kt:15-21
Timestamp: 2025-07-08T03:21:24.693Z
Learning: Reed Android 프로젝트에서는 다크모드/라이트모드 대응 계획이 없고 기본 테마 값만 사용할 예정이다.
Applied to files:
core/designsystem/src/main/res/values/strings.xml
📚 Learning: kotlin에서 같은 패키지 내의 파일들은 패키지 레벨에 정의된 const val 상수를 import 없이 직접 접근할 수 있습니다. onboardingpresenter.kt와 o...
Learnt from: easyhooon
PR: YAPP-Github/Reed-Android#77
File: feature/onboarding/src/main/kotlin/com/ninecraft/booket/feature/onboarding/OnboardingUi.kt:73-73
Timestamp: 2025-07-29T07:02:18.885Z
Learning: Kotlin에서 같은 패키지 내의 파일들은 패키지 레벨에 정의된 const val 상수를 import 없이 직접 접근할 수 있습니다. OnboardingPresenter.kt와 OnboardingUi.kt 모두 com.ninecraft.booket.feature.onboarding 패키지에 속해 있어서 ONBOARDING_STEPS_COUNT 상수를 공유할 수 있습니다.
Applied to files:
feature/main/src/main/kotlin/com/ninecraft/booket/feature/main/splash/SplashUiState.ktfeature/main/src/main/kotlin/com/ninecraft/booket/feature/main/splash/SplashPresenter.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: ci-build
🔇 Additional comments (11)
core/designsystem/src/main/res/values/strings.xml (1)
2-2: 앱 이름 변경 적용 확인 완료
app_name문자열이 "Booket"에서 "Reed"로 정상적으로 변경되었습니다. 다른 리소스나 매니페스트의android:label값도 함께 업데이트되었는지 최종 점검만 해주세요. 기능상 문제는 없습니다.core/data/api/src/main/kotlin/com/ninecraft/booket/core/data/api/repository/UserRepository.kt (1)
3-3: 인터페이스 확장이 적절합니다.자동 로그인 상태를 위한
autoLoginState프로퍼티 추가가 기존onboardingState패턴과 일관성 있게 구현되었습니다.Flow<AutoLoginState>타입 사용으로 반응형 상태 관찰이 가능합니다.Also applies to: 15-15
core/model/src/main/kotlin/com/ninecraft/booket/core/model/AutoLoginState.kt (1)
3-7: 자동 로그인 상태 enum 승인 및 IDLE 상태 사용 확인
AutoLoginState.IDLE가 다음 위치에서 정상적으로 사용되고 있음을 확인했습니다:
- feature/main/src/main/kotlin/com/ninecraft/booket/feature/main/splash/SplashUiState.kt
val autoLoginState: AutoLoginState = AutoLoginState.IDLEidle = onboardingState == OnboardingState.IDLE || autoLoginState == AutoLoginState.IDLE- feature/main/src/main/kotlin/com/ninecraft/booket/feature/main/splash/SplashPresenter.kt
val autoLoginState by userRepository.autoLoginState.collectAsRetainedState(initial = AutoLoginState.IDLE)when (autoLoginState) { AutoLoginState.IDLE -> { /* 자동 로그인 상태를 기다리는 중 */ } … }추가 검토나 수정은 필요하지 않습니다.
core/datastore/api/src/main/kotlin/com/ninecraft/booket/core/datastore/api/datasource/AutoLoginDataSource.kt (1)
6-8: 깔끔한 데이터소스 인터페이스 설계입니다.단일 책임 원칙을 따르며, 반응형 Flow를 사용한 자동 로그인 상태 노출이 적절합니다. 기존 datasource 패턴과 일관성을 유지하고 있습니다.
feature/main/src/main/kotlin/com/ninecraft/booket/feature/main/splash/SplashUiState.kt (1)
3-4: 상태 관리가 개선되었습니다.단순한 boolean 플래그에서 표현력 있는 enum 상태로 리팩토링되어 타입 안전성과 명확성이 향상되었습니다. 두 상태 모두
IDLE로 기본값 설정이 적절합니다.Also applies to: 9-10
feature/main/src/main/kotlin/com/ninecraft/booket/feature/main/splash/SplashPresenter.kt (6)
6-6: 새로운 자동 로그인 상태 모델 import 추가 확인자동 로그인 기능 구현을 위해 필요한
AutoLoginState모델이 올바르게 import되었습니다.
8-8: 메인 화면 네비게이션을 위한 import 추가 확인자동 로그인 성공 시 메인 화면으로 이동하기 위한
BottomNavigationScreenimport가 적절하게 추가되었습니다.
30-30: 자동 로그인 상태 관찰 로직 구현 확인
collectAsRetainedState를 사용하여 자동 로그인 상태를 안전하게 관찰하고 있으며, 적절한 초기값(AutoLoginState.IDLE)이 설정되었습니다.
32-32: RememberedEffect 의존성 업데이트 확인
autoLoginState를 의존성에 추가하여 자동 로그인 상태 변경 시에도 네비게이션 로직이 적절히 재실행되도록 구현되었습니다.
39-54: 자동 로그인 기반 네비게이션 로직 구현 확인온보딩 완료 후 자동 로그인 상태에 따른 네비게이션 로직이 올바르게 구현되었습니다.
로직 흐름:
- 로그인됨: 메인 화면으로 이동
- 로그인 안됨: 로그인 화면으로 이동
- 대기 중: 상태 로딩 완료까지 대기
IDLE 상태에서의 대기 처리도 적절하게 구현되어 사용자 경험을 보장합니다.
59-61: UI 상태 반환 로직 개선 확인
SplashUiState가 두 상태를 모두 고려하도록 개선되었습니다:
idle조건에autoLoginState도 포함하여 완전한 로딩 상태 반영- 명시적인 상태 전달로 UI에서 더 정확한 상태 처리 가능
boolean 기반에서 enum 기반으로의 전환이 코드의 명확성과 유지보수성을 향상시켰습니다.
code style check success
|
오 잘 되네요! LGTM~ |
🔗 관련 이슈
📙 작업 설명
🧪 테스트 내역 (선택)
💬 추가 설명 or 리뷰 포인트 (선택)
Summary by CodeRabbit
신규 기능
기능 개선
버그 수정