[Feature] 콜밴 글쓰기 네비게이션 연결#1329
[Feature] 콜밴 글쓰기 네비게이션 연결#1329JaeYoung290 wants to merge 3 commits intofeature/#1283-callvan-create-viewmodelfrom
Conversation
개요Callvan 생성 화면의 네비게이션 흐름을 변경하여 상세 화면 이동 대신 메인 화면으로 돌아가는 방식으로 수정했습니다. 관련 콜백, Side Effect, ViewModel에서 일관되게 NavigateToDetail을 NavigateToMain으로 교체했습니다. 변경 사항
예상 코드 리뷰 난이도🎯 2 (Simple) | ⏱️ ~12분 관련 PR
제안 리뷰어
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
4abbee0 to
5a34625
Compare
260f604 to
d634c40
Compare
|
✅ CI 완료. CodeRabbit 리뷰를 요청합니다. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@feature/callvan/src/main/java/in/koreatech/koin/feature/callvan/navigation/Navigation.kt`:
- Around line 20-22: The onNavigateToMain callback currently pushes
CallvanNavType.CallvanMain without clearing the back stack, causing
CallvanCreate to remain and be returned to on back; update the navigation call
inside onNavigateToMain (the navController.navigate invocation that references
CallvanNavType.CallvanMain) to perform a popUpTo the CallvanMain destination and
set inclusive = true so the previous CallvanCreate entry is removed (match the
project pattern used by feature/store and feature/dining).
🪄 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
Run ID: f49cb1a4-3c0d-495a-a794-2b8f3cf999c4
📒 Files selected for processing (4)
feature/callvan/src/main/java/in/koreatech/koin/feature/callvan/navigation/Navigation.ktfeature/callvan/src/main/java/in/koreatech/koin/feature/callvan/ui/create/CallvanCreateScreen.ktfeature/callvan/src/main/java/in/koreatech/koin/feature/callvan/ui/create/CallvanCreateSideEffect.ktfeature/callvan/src/main/java/in/koreatech/koin/feature/callvan/ui/create/CallvanCreateViewModel.kt
| onNavigateToMain = { | ||
| navController.navigate(CallvanNavType.CallvanMain) | ||
| }, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# navigation-compose 버전 및 현재 네비게이션 옵션 사용 여부를 확인합니다.
# 1) Navigation 관련 의존성 선언 확인
fd 'build.gradle.kts|build.gradle' -x rg -n 'navigation-compose|androidx.navigation'
# 2) CallvanMain 이동 지점에서 popUpTo/launchSingleTop 사용 여부 확인
rg -nP --type=kt -C3 'navigate\(CallvanNavType\.CallvanMain\)|popUpTo|launchSingleTop'Repository: BCSDLab/KOIN_ANDROID
Length of output: 598
🏁 Script executed:
#!/bin/bash
# Read the actual Navigation.kt file to see full context
echo "=== Navigation.kt file content ==="
cat -n feature/callvan/src/main/java/in/koreatech/koin/feature/callvan/navigation/Navigation.kt
echo -e "\n=== Check CallvanNavType definition ==="
find . -type f -name "*.kt" | xargs rg -l "CallvanNavType" | head -5
fd -t f ".*NavType.*kt$" -path "*/callvan/*"
echo -e "\n=== Search for popUpTo usage patterns in navigation ==="
rg -C2 "popUpTo" --type=kotlin 2>/dev/null || rg -C2 "popUpTo" --type=kt 2>/dev/null || rg -C2 "popUpTo" 2>/dev/null | head -40
echo -e "\n=== Check other feature navigation patterns ==="
rg "onNavigateTo.*{" --type=kotlin 2>/dev/null || rg "onNavigateTo.*{" 2>/dev/null | head -30Repository: BCSDLab/KOIN_ANDROID
Length of output: 13005
onNavigateToMain 콜백에서 백스택 정리가 필요합니다.
Line 21은 CallvanMain을 단순히 push만 하고 있어서, CallvanMain → CallvanCreate → CallvanMain 순서로 스택이 쌓입니다. 제출 성공 후 뒤로 가기 시 CallvanCreate로 돌아가는 문제가 발생합니다. 프로젝트 전역에서 유사한 네비게이션 패턴(예: feature/store의 navigateToMain, feature/dining)에서는 모두 popUpTo와 inclusive = true를 사용하고 있으므로, 아래와 같이 백스택을 정리해야 합니다.
제안 수정안
onNavigateToMain = {
- navController.navigate(CallvanNavType.CallvanMain)
+ navController.navigate(CallvanNavType.CallvanMain) {
+ popUpTo<CallvanNavType.CallvanCreate> { inclusive = true }
+ launchSingleTop = true
+ }
},🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@feature/callvan/src/main/java/in/koreatech/koin/feature/callvan/navigation/Navigation.kt`
around lines 20 - 22, The onNavigateToMain callback currently pushes
CallvanNavType.CallvanMain without clearing the back stack, causing
CallvanCreate to remain and be returned to on back; update the navigation call
inside onNavigateToMain (the navController.navigate invocation that references
CallvanNavType.CallvanMain) to perform a popUpTo the CallvanMain destination and
set inclusive = true so the previous CallvanCreate entry is removed (match the
project pattern used by feature/store and feature/dining).
PR 개요
이슈 번호: #1283
PR 체크리스트
작업사항
작업사항의 상세한 설명
NavGraph에서 CallvanCreate 라우트에 CallvanCreateScreen을 실제로 연결합니다.
논의 사항
스크린샷
추가내용
Summary by CodeRabbit
릴리스 노트