Conversation
WalkthroughChallengeLoadingScreen과 SplashScreen의 정적 이미지를 Lottie 애니메이션으로 교체하고, MyPageScreen의 두 개 구분선 색상을 변경하며 새 Lottie JSON 리소스 파일을 추가합니다. Changes
Sequence Diagram(s)(생성 조건 미충족 — 생략) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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: 1
🤖 Fix all issues with AI agents
In `@app/src/main/java/com/cherrish/android/presentation/splash/SplashScreen.kt`:
- Around line 42-48: The current use of LifecycleEventEffect with scope.launch
causes the delay coroutine to run every ON_START and can duplicate calls to
viewModel.isAutoLoginCheck(); replace the LifecycleEventEffect +
rememberCoroutineScope+/scope.launch pattern with a single LaunchedEffect(Unit)
that performs delay(3000) and then calls viewModel.isAutoLoginCheck(), and
remove the now-unused rememberCoroutineScope() to ensure the auto-login check
runs exactly once after composition.
🧹 Nitpick comments (1)
app/src/main/java/com/cherrish/android/presentation/splash/SplashScreen.kt (1)
94-101: 로띠에 접근성 설명(또는 제외) 처리가 필요해요.
LottieAnimation은 기본적으로 TalkBack에 아무 것도 전달하지 않아서 로딩 상태 안내가 어려울 수 있습니다. 로딩 화면이라면semantics로 설명을 추가하거나, 장식용이면clearAndSetSemantics {}로 명시적 제외를 권장합니다.♿️ 접근성 설명 추가 예시
+import androidx.compose.ui.semantics.semantics +import androidx.compose.ui.semantics.contentDescription @@ LottieAnimation( composition = composition, progress = { progress }, modifier = Modifier .fillMaxWidth() .padding(horizontal = 105.dp) .aspectRatio(130f / 154f) .align(Alignment.CenterHorizontally) + .semantics { contentDescription = "로딩 중" } )
| val scope = rememberCoroutineScope() | ||
|
|
||
| LifecycleEventEffect(Lifecycle.Event.ON_START) { | ||
| scope.launch { | ||
| delay(3000) | ||
| viewModel.isAutoLoginCheck() | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n app/src/main/java/com/cherrish/android/presentation/splash/SplashScreen.ktRepository: TEAM-Cherrish/Cherrish-Android
Length of output: 4725
🏁 Script executed:
# SplashViewModel과 isAutoLoginCheck() 메서드 확인하여
# 중복 호출 시 부작용 검증
fd -e kt -path "*presentation/splash*" | head -20Repository: TEAM-Cherrish/Cherrish-Android
Length of output: 242
🏁 Script executed:
find . -name "SplashViewModel.kt" -type fRepository: TEAM-Cherrish/Cherrish-Android
Length of output: 153
🏁 Script executed:
cat -n ./app/src/main/java/com/cherrish/android/presentation/splash/SplashViewModel.ktRepository: TEAM-Cherrish/Cherrish-Android
Length of output: 1412
ON_START 반복 호출로 인한 지연 작업 중복 실행 위험
액티비티가 백그라운드/포그라운드를 전환할 때마다 ON_START 이벤트가 발생하므로, LifecycleEventEffect 블록이 반복 실행됩니다. 이 과정에서 scope.launch로 생성한 지연 코루틴이 누적되어 isAutoLoginCheck()가 중복 호출될 수 있으며, 이는 중복된 side effect 발생 및 반복 네비게이션으로 이어집니다.
단일 실행을 보장하려면 LaunchedEffect(Unit)으로 변경하세요. 컴포지션 생성 시에만 1회 실행되므로 ON_START 반복 호출과 무관하게 3초 후 자동 로그인 확인이 정확히 1회만 실행됩니다.
🔧 수정 예시
-import androidx.compose.runtime.rememberCoroutineScope
-import androidx.lifecycle.Lifecycle
-import androidx.lifecycle.compose.LifecycleEventEffect
+import androidx.compose.runtime.LaunchedEffect
- val scope = rememberCoroutineScope()
-
- LifecycleEventEffect(Lifecycle.Event.ON_START) {
- scope.launch {
- delay(3000)
- viewModel.isAutoLoginCheck()
- }
- }
+ LaunchedEffect(Unit) {
+ delay(3000)
+ viewModel.isAutoLoginCheck()
+ }🤖 Prompt for AI Agents
In `@app/src/main/java/com/cherrish/android/presentation/splash/SplashScreen.kt`
around lines 42 - 48, The current use of LifecycleEventEffect with scope.launch
causes the delay coroutine to run every ON_START and can duplicate calls to
viewModel.isAutoLoginCheck(); replace the LifecycleEventEffect +
rememberCoroutineScope+/scope.launch pattern with a single LaunchedEffect(Unit)
that performs delay(3000) and then calls viewModel.isAutoLoginCheck(), and
remove the now-unused rememberCoroutineScope() to ensure the auto-login check
runs exactly once after composition.
Related issue 🛠
Work Description ✏️
Screenshot 📸
Uncompleted Tasks 😅
To Reviewers 📢
다들 수고가 많으십니다. 얼마 안 남았다 파이팅 합시다 !!
Summary by CodeRabbit
New Features
Style
✏️ Tip: You can customize this high-level summary in your review settings.