[REFACTOR/#216] 유빈 QA - #223
Conversation
매칭을 시작한 적 없는 강사가 매칭 화면 진입 시 fetchMatchingActive/fetchOfferDetail이 409(MATCHING_NOT_ACTIVE)를 반환하면 토스트 없이 SettingExposure로 전환. 소비자가 결제 취소 시 OfferReceivedEvent(PendingConfirm) → restoreActiveOffer()로 변경해 stale offerId로 인한 409 토스트도 제거.
- InstructorMatching 라우트에 startFresh 플래그 추가, init에서 startFresh면 상태 복구 스킵(I05 유지) - 홈 '즉시매칭 시작'(promo) 진입은 startFresh=true로 조건 설정 화면 유지 - 홈 활성 매칭 카드(MATCHING/제안단계)는 NavigateToMatchingWaiting으로 상태 복구 진입 - NavHost의 InstructorMatching() 괄호 누락, 홈 화면 navigateToMatchingWaiting() 호출 괄호 누락(미동작) 수정
- priceSummary를 강사 정산 금액(instructorSettlementAmount)로 정렬 (기존 소비자용 lessonPriceAmount/resortPassFeeAmount/totalPaymentAmount 제거) → MissingFieldException 파싱 크래시 해결 - 종료된 offer 조회 시 409 MATCHING_NOT_ACTIVE를 홈 재조회로 처리(확정 강습이면 lessonId 이동, 아니면 대기) - 강습 확정 시 즉시노출 중단(cancelMatchingExposure) 호출로 신규 매칭 유입 차단(정상 플로우 한정, 서버 보강 TODO)
- 홈 응답 lessonCards에 CONFIRMED/IN_PROGRESS가 있으면 hasActiveLesson=true로 판정 - 즉시매칭 시작(onMatchingClick) 시 hasActiveLesson이면 토스트로 안내하고 진입 차단
- 강습 상세(진입 시 홈 위까지 백스택 정리(popUpTo(InstructorHome)) - 매칭 확정→상세, 홈 카드→상세, 취소→씽매칭 돌아가기 경로 모두 적용 - 뒤로가기가 이전 매칭 스택이 아닌 항상 I04 홈으로 이동 - 매칭 스택 제거로 잔여 소켓 연결도 함께 정리
- 강사 거절 시 offerId 무효화 후 active 재조회 (새 offer 갱신) - OfferClosedEvent도 죽은 offerId 상세조회 대신 restoreActiveOffer()로 현재 활성 상태 재동기화 - offerId를 추적 var로 분리해 진입/조회 시 최신값 유지
- 확정 전(제안도착/수락대기) 홈 이동 후 카드 재진입 시 대기화면 오노출 수정 (resyncActiveOffer는 Waiting 상태에서만 재조회) - 대기 중지(종료) 시 조건 입력 화면이 아니라 홈으로 이동
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough강사 홈 재개 갱신, 활성 레슨 차단, 오퍼 복원 및 매칭 상태 동기화가 변경되었습니다. 매칭 가격 모델은 강사 정산 금액을 사용하며, 홈·매칭·레슨 간 내비게이션에 공통 스택 옵션이 적용됩니다. Changes강사 매칭 흐름
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant InstructorHome
participant InstructorMainNavHost
participant MatchingRoute
participant MatchingViewModel
participant MatchingRepository
InstructorHome->>InstructorMainNavHost: 매칭 화면으로 이동
InstructorMainNavHost->>MatchingRoute: offerId 또는 startFresh 전달
MatchingRoute->>MatchingViewModel: 화면 재개 시 resyncActiveOffer 호출
MatchingViewModel->>MatchingRepository: 활성 오퍼 복원 요청
MatchingRepository-->>MatchingViewModel: 오퍼 및 정산 금액 반환
MatchingViewModel-->>MatchingRoute: 매칭 상태 갱신
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
🧹 Nitpick comments (3)
app/instructor/src/main/java/com/ssing/instructor/InstructorMainNavHost.kt (1)
57-72: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value일관된 내비게이션 옵션(navOptions) 적용 권장 및 요약 불일치
navigateToLessonDetail에는navController.backToHomeNavOptions()가 적용되어 백스택 정리 및 중복 실행 방지(SingleTop)가 보장되지만, 동일하게 홈 화면에서 진입하는navigateToMatching및navigateToMatchingWaiting에는 해당 옵션이 누락되어 있습니다. (참고로 AI 요약에서는navigateToMatchingWaiting에도 동일한navOptions가 적용되었다고 설명하지만, 실제 코드에는 포함되지 않았습니다.)안정적인 백스택 관리와 일관성을 위해 홈 화면에서 이동하는 세 진입점 모두 동일한
navOptions를 적용하는 것을 권장합니다.💡 제안하는 수정
navigateToMatching = { navController.navigate( route = InstructorMatching(startFresh = true), + navOptions = navController.backToHomeNavOptions(), ) }, navigateToLessonDetail = { lessonId -> navController.navigate( route = InstructorLesson(lessonId = lessonId ?: 0), navOptions = navController.backToHomeNavOptions(), ) }, navigateToMatchingWaiting = { offerId -> navController.navigate( route = InstructorMatching(offerId = offerId), + navOptions = navController.backToHomeNavOptions(), ) },🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/instructor/src/main/java/com/ssing/instructor/InstructorMainNavHost.kt` around lines 57 - 72, Apply navController.backToHomeNavOptions() to the navigate calls in both navigateToMatching and navigateToMatchingWaiting, matching navigateToLessonDetail. Keep the existing route parameters unchanged so all three home-originated navigation entry points use consistent back-stack and single-top behavior.presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeScreen.kt (1)
48-56: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value파라미터 순서 정리 권장.
navigateToMatchingWaiting(디폴트 없음)이modifier/viewModel(디폴트 있음) 뒤에 위치해 관례에서 벗어납니다. 현재는 호출부가 모두 named argument를 사용해 컴파일엔 문제없지만, 가독성을 위해 디폴트 없는 파라미터를 앞쪽에 모아두는 것을 권장합니다.♻️ 제안
internal fun InstructorHomeRoute( contentPadding: PaddingValues, navigateToLessonDetail: (Long?) -> Unit, navigateToMatching: () -> Unit, navigateToNotification: () -> Unit, - modifier: Modifier = Modifier, - viewModel: InstructorHomeViewModel = hiltViewModel(), - navigateToMatchingWaiting: (Long?) -> Unit, + navigateToMatchingWaiting: (Long?) -> Unit, + modifier: Modifier = Modifier, + viewModel: InstructorHomeViewModel = hiltViewModel(), ) {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeScreen.kt` around lines 48 - 56, Reorder the parameters of InstructorHomeRoute so the required navigateToMatchingWaiting parameter appears before the optional modifier and viewModel parameters, keeping all parameter names, types, defaults, and behavior unchanged.presentation/instructor-matching/src/main/java/com/ssing/presentation/instructormatching/MatchingViewModel.kt (1)
108-120: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low valueTODO로 명시된 서버 보강 필요 사항 확인.
주석에 이미 알려진 제약(소켓 미연결 시 노출 차단이 완전하지 않음)이 명시돼 있으며 서버 측 보강이 필요한 사안으로 보입니다. 클라이언트만으로 확실히 해결하기 어려워 별도 조치를 요구하지는 않습니다.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@presentation/instructor-matching/src/main/java/com/ssing/presentation/instructormatching/MatchingViewModel.kt` around lines 108 - 120, TODO에 명시된 서버 보강 필요 사항은 현재 클라이언트 구현에서 추가 변경하지 말고 유지한다. onMatchingConfirmed의 기존 노출 중단, 소켓 해제, 상세 화면 이동 흐름은 그대로 보존한다.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@app/instructor/src/main/java/com/ssing/instructor/InstructorMainNavHost.kt`:
- Around line 57-72: Apply navController.backToHomeNavOptions() to the navigate
calls in both navigateToMatching and navigateToMatchingWaiting, matching
navigateToLessonDetail. Keep the existing route parameters unchanged so all
three home-originated navigation entry points use consistent back-stack and
single-top behavior.
In
`@presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeScreen.kt`:
- Around line 48-56: Reorder the parameters of InstructorHomeRoute so the
required navigateToMatchingWaiting parameter appears before the optional
modifier and viewModel parameters, keeping all parameter names, types, defaults,
and behavior unchanged.
In
`@presentation/instructor-matching/src/main/java/com/ssing/presentation/instructormatching/MatchingViewModel.kt`:
- Around line 108-120: TODO에 명시된 서버 보강 필요 사항은 현재 클라이언트 구현에서 추가 변경하지 말고 유지한다.
onMatchingConfirmed의 기존 노출 중단, 소켓 해제, 상세 화면 이동 흐름은 그대로 보존한다.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a7247de7-3ad9-404e-a7a4-55a9fb9b5115
📒 Files selected for processing (13)
app/instructor/src/main/java/com/ssing/instructor/InstructorMainNavHost.ktdata/src/main/java/com/ssing/data/lesson/consumer/remote/dto/response/ConsumerLessonDetailResponse.ktdata/src/main/java/com/ssing/data/lesson/consumer/repository/impl/ConsumerLessonRepositoryImpl.ktdata/src/main/java/com/ssing/data/matching/instructormatching/model/InstructorMatchingOffer.ktdata/src/main/java/com/ssing/data/matching/instructormatching/remote/dto/response/InstructorMatchingOffersResponse.ktdata/src/main/java/com/ssing/data/matching/instructormatching/repository/impl/InstructorMatchingRepositoryImpl.ktpresentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeContract.ktpresentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeScreen.ktpresentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeViewModel.ktpresentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/navigation/InstructorHomeNavigation.ktpresentation/instructor-matching/src/main/java/com/ssing/presentation/instructormatching/MatchingViewModel.ktpresentation/instructor-matching/src/main/java/com/ssing/presentation/instructormatching/navigation/InstructorMatchingNavigation.ktpresentation/instructor-matching/src/main/java/com/ssing/presentation/instructormatching/screen/MatchingScreen.kt
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeViewModel.kt (1)
132-139: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win조회 중에는 즉시매칭 차단이 우회될 수 있습니다.
loadHome()이 비동기로 실행되는 동안hasActiveLesson은 초기값 또는 이전 조회값입니다. 이 시점에 클릭하면 API 응답이CONFIRMED/IN_PROGRESS여도 매칭 화면으로 이동할 수 있습니다. 최소한isLoading동안 클릭을 차단하고, 최초 조회 완료 전에는 매칭 버튼을 활성화하지 마세요.제안
fun onMatchingClick() { - if (uiState.value.hasActiveLesson) { + val state = uiState.value + if (state.isLoading) return + if (state.hasActiveLesson) { sendEffect(InstructorHomeContract.Effect.ShowToast(MSG_ACTIVE_LESSON_BLOCK)) return }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeViewModel.kt` around lines 132 - 139, Update onMatchingClick so immediate matching is blocked while the home data is loading, including the initial load before the first completed response; show the existing blocking toast or otherwise prevent navigation during this state. Ensure the matching button remains disabled until loadHome has completed, while preserving the existing hasActiveLesson check and NavigateToMatching behavior after loading.
🧹 Nitpick comments (1)
presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeViewModel.kt (1)
113-115: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win상태 매핑 변경에 대한 회귀 테스트를 추가하세요.
PAYMENT_PENDING,CONFIRMED,IN_PROGRESS의 UI 상태 매핑은 홈 카드 표시와 후속 내비게이션에 직접 영향을 줍니다. 각 상태가 의도한Status로 변환되는지 파라미터화된 테스트로 고정하는 편이 안전합니다.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeViewModel.kt` around lines 113 - 115, InstructorHomeViewModel의 상태 매핑을 대상으로 회귀 테스트를 추가하세요. PAYMENT_PENDING은 Status.Matched로, CONFIRMED와 IN_PROGRESS는 Status.Default로 변환되는지 각 입력을 포함한 파라미터화된 테스트로 검증하고, 기존 매핑 동작은 유지하세요.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In
`@presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeViewModel.kt`:
- Around line 132-139: Update onMatchingClick so immediate matching is blocked
while the home data is loading, including the initial load before the first
completed response; show the existing blocking toast or otherwise prevent
navigation during this state. Ensure the matching button remains disabled until
loadHome has completed, while preserving the existing hasActiveLesson check and
NavigateToMatching behavior after loading.
---
Nitpick comments:
In
`@presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeViewModel.kt`:
- Around line 113-115: InstructorHomeViewModel의 상태 매핑을 대상으로 회귀 테스트를 추가하세요.
PAYMENT_PENDING은 Status.Matched로, CONFIRMED와 IN_PROGRESS는 Status.Default로 변환되는지
각 입력을 포함한 파라미터화된 테스트로 검증하고, 기존 매핑 동작은 유지하세요.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 9c9daf66-1222-40dc-8f99-76375e51d16d
📒 Files selected for processing (1)
presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeViewModel.kt

Related issue 🛠
Work Description ✏️
Screenshot 📸
Uncompleted Tasks 😅
To Reviewers 📢
아직 다 안끝남
Summary by CodeRabbit