Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
Walkthrough이 PR은 앱의 스플래시 화면 기능을 구현합니다. 새로운 스플래시 네비게이션 그래프, UI 컴포넌트, 디자인 시스템 색상 추가, 시스템 바 투명성 설정을 포함하여 앱 시작 흐름을 개선합니다. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant MainActivity
participant NavController
participant SplashRoute
participant SplashScreen
participant Onboarding
User->>MainActivity: 앱 시작
MainActivity->>NavController: 네비게이션 초기화 (Splash 시작)
NavController->>SplashRoute: Splash 라우트 표시
SplashRoute->>SplashScreen: SplashScreen UI 렌더링
SplashScreen->>User: 로고 및 배경 그래디언트 표시
SplashRoute->>SplashRoute: 3초 대기 (LaunchedEffect)
SplashRoute->>Onboarding: navigateToOnboarding() 호출
Onboarding->>User: 온보딩 화면 표시
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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/main/MainScreen.kt`:
- Around line 43-46: The splash navigation is wired to an empty lambda causing
SplashRoute's LaunchedEffect call to navigateToOnboarding() to do nothing;
update the MainScreen call site that invokes splashNavGraph to pass a real
navigation lambda (e.g., a lambda that calls your NavController.navigate(...) or
invokes the host-level navigation function) instead of {} so SplashRoute can
actually transition after its delay; locate the splashNavGraph call in
MainScreen and replace the empty navigateToOnboarding = {} with the appropriate
navigation action referencing your NavController or higher-level
navigateToOnboarding handler.
🧹 Nitpick comments (2)
app/src/main/java/com/cherrish/android/presentation/splash/SplashScreen.kt (2)
27-35: LaunchedEffect 내 콜백 최신값 유지 고려.recomposition으로 navigateToOnboarding이 변경될 가능성을 대비해 최신 람다를 참조하도록 업데이트하는 편이 안전합니다.
♻️ 제안 변경
+import androidx.compose.runtime.getValue +import androidx.compose.runtime.rememberUpdatedState @@ fun SplashRoute( navigateToOnboarding: () -> Unit, paddingValues: PaddingValues, ) { - LaunchedEffect(Unit) { - delay(3000) - navigateToOnboarding() - } + val latestNavigateToOnboarding by rememberUpdatedState(navigateToOnboarding) + LaunchedEffect(Unit) { + delay(3000) + latestNavigateToOnboarding() + }
49-59: paddingValues 적용 순서/배경 분리로 인셋 처리 안정화.현재는 drawBehind 후에 padding을 적용해 배경이 인셋 영역을 덮지 못하고, 향후 추가 패딩 시 순서 이슈가 생길 수 있습니다. 배경과 컨텐츠를 분리하고 패딩을 컨텐츠에 먼저 적용하는 구성이 안정적입니다.
Based on learnings, ...♻️ 제안 변경
+import androidx.compose.foundation.layout.Box @@ - Column( - modifier = modifier - .fillMaxSize() - .drawBehind { - val brush = Brush.linearGradient( - colors = gradationColors, - start = Offset(size.width / 2f, size.height / 2f), - ) - drawRect(brush) - } - .padding(paddingValues), - horizontalAlignment = Alignment.CenterHorizontally - ) { - Spacer(modifier = Modifier.weight(283f)) - Image( - painter = painterResource(id = R.drawable.ic_app_logo), - contentDescription = null, - modifier = Modifier.size(width = 114.dp, height = 100.dp), - ) - Spacer(modifier = Modifier.height(14.dp)) - Image( - imageVector = ImageVector.vectorResource(id = R.drawable.ic_app_logo_title), - contentDescription = null - ) - Spacer(modifier = Modifier.weight(298f)) - } + Box( + modifier = modifier + .fillMaxSize() + .drawBehind { + val brush = Brush.linearGradient( + colors = gradationColors, + start = Offset(size.width / 2f, size.height / 2f), + ) + drawRect(brush) + } + ) { + Column( + modifier = Modifier + .fillMaxSize() + .padding(paddingValues), + horizontalAlignment = Alignment.CenterHorizontally + ) { + Spacer(modifier = Modifier.weight(283f)) + Image( + painter = painterResource(id = R.drawable.ic_app_logo), + contentDescription = null, + modifier = Modifier.size(width = 114.dp, height = 100.dp), + ) + Spacer(modifier = Modifier.height(14.dp)) + Image( + imageVector = ImageVector.vectorResource(id = R.drawable.ic_app_logo_title), + contentDescription = null + ) + Spacer(modifier = Modifier.weight(298f)) + } + }
| splashNavGraph( | ||
| navigateToOnboarding = {}, // TODO: 로직 넣어서 바꿀 예정 | ||
| paddingValues = innerPadding | ||
| ) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# SplashRoute가 navigateToOnboarding을 호출하는지 확인
rg -n --type=kt 'navigateToOnboarding' -A 3 -B 3Repository: TEAM-Cherrish/Cherrish-Android
Length of output: 100
🏁 Script executed:
# splashNavGraph 함수 정의 찾기
rg -n --type=kt 'fun splashNavGraph' -A 10Repository: TEAM-Cherrish/Cherrish-Android
Length of output: 100
🏁 Script executed:
# MainScreen.kt의 전체 코드 구조 확인
fd 'MainScreen.kt' --exec cat -n {} \;Repository: TEAM-Cherrish/Cherrish-Android
Length of output: 2649
🏁 Script executed:
# splashNavGraph 함수 정의 찾기
rg 'fun splashNavGraph' -A 15Repository: TEAM-Cherrish/Cherrish-Android
Length of output: 56
🏁 Script executed:
# SplashRoute 또는 SplashScreen 찾기
fd 'Splash' --type f -name '*.kt' | head -20Repository: TEAM-Cherrish/Cherrish-Android
Length of output: 304
🏁 Script executed:
# startDestination이 어디서 설정되는지 확인
rg 'startDestination' -A 2 -B 2Repository: TEAM-Cherrish/Cherrish-Android
Length of output: 1153
🏁 Script executed:
# splashNavGraph 함수 정의 찾기
rg 'fun splashNavGraph'Repository: TEAM-Cherrish/Cherrish-Android
Length of output: 56
🏁 Script executed:
# Splash 관련 파일 찾기
fd 'Splash' -type f -name '*.kt'Repository: TEAM-Cherrish/Cherrish-Android
Length of output: 244
🏁 Script executed:
# navigateToOnboarding 사용 전체 검색
rg 'navigateToOnboarding'Repository: TEAM-Cherrish/Cherrish-Android
Length of output: 703
🏁 Script executed:
# SplashScreen.kt 전체 읽기
cat app/src/main/java/com/cherrish/android/presentation/splash/SplashScreen.ktRepository: TEAM-Cherrish/Cherrish-Android
Length of output: 2760
🏁 Script executed:
# SplashNavigation.kt 전체 읽기
cat app/src/main/java/com/cherrish/android/presentation/splash/navigation/SplashNavigation.ktRepository: TEAM-Cherrish/Cherrish-Android
Length of output: 960
splash 이후 전환이 막힐 수 있습니다.
SplashRoute는 3초 후 LaunchedEffect에서 navigateToOnboarding()을 호출하는데, MainScreen.kt에서 빈 람다 {}를 전달하면 전환이 일어나지 않습니다. 이로 인해 스플래시 화면에서 앱이 멈출 가능성이 높습니다. 준비되기 전에 실제 전환 로직을 연결해 주세요.
🤖 Prompt for AI Agents
In `@app/src/main/java/com/cherrish/android/presentation/main/MainScreen.kt`
around lines 43 - 46, The splash navigation is wired to an empty lambda causing
SplashRoute's LaunchedEffect call to navigateToOnboarding() to do nothing;
update the MainScreen call site that invokes splashNavGraph to pass a real
navigation lambda (e.g., a lambda that calls your NavController.navigate(...) or
invokes the host-level navigation function) instead of {} so SplashRoute can
actually transition after its delay; locate the splashNavGraph call in
MainScreen and replace the empty navigateToOnboarding = {} with the appropriate
navigation action referencing your NavController or higher-level
navigateToOnboarding handler.
Related issue 🛠
Work Description ✏️
Screenshot 📸
Uncompleted Tasks 😅
To Reviewers 📢
Summary by CodeRabbit
릴리스 노트
새 기능
스타일
✏️ Tip: You can customize this high-level summary in your review settings.