Skip to content

[REFACTOR/#216] 유빈 QA - #223

Merged
oilbeaneda merged 22 commits into
developfrom
refactor/#216-yubin_qa
Jul 17, 2026
Merged

[REFACTOR/#216] 유빈 QA #223
oilbeaneda merged 22 commits into
developfrom
refactor/#216-yubin_qa

Conversation

@oilbeaneda

@oilbeaneda oilbeaneda commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Related issue 🛠

Work Description ✏️

  • 노션 QA 한유빈 참고 !!

Screenshot 📸

Uncompleted Tasks 😅

  • 매칭 순서에 따라

To Reviewers 📢

아직 다 안끝남

Summary by CodeRabbit

  • 새로운 기능
    • 강사 홈에서 진행 중 강습이 있으면 매칭 시작을 차단하고 안내를 표시합니다.
    • 매칭 대기 이동 시 선택된 오퍼 정보를 반영해 더 정확히 이어집니다.
    • 매칭 금액 표기를 강사 정산 금액 기준으로 변경했습니다.
  • 버그 수정
    • 화면 재진입 시 매칭 정보를 최신으로 다시 동기화합니다.
    • 딥링크/복귀 및 제안 거절 이후 오퍼 복원이 더 안정적으로 동작합니다.
    • 강사 프로필 이미지 값이 일관되게 처리됩니다.

매칭을 시작한 적 없는 강사가 매칭 화면 진입 시 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 상태에서만 재조회)
- 대기 중지(종료) 시 조건 입력 화면이 아니라 홈으로 이동
@oilbeaneda oilbeaneda added this to the [Ssing] APPJAM milestone Jul 16, 2026
@oilbeaneda
oilbeaneda requested a review from a team July 16, 2026 17:37
@oilbeaneda oilbeaneda self-assigned this Jul 16, 2026
@oilbeaneda oilbeaneda added 🔨 FIX 버그 수정 ♻️ REFACTOR 전면 수정, 리팩토링 🛠️ HOTFIX 긴급 수정 🩷 유빈 labels Jul 16, 2026
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@oilbeaneda, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ab3ce600-b5f4-4d4f-9f74-440a08e6c75a

📥 Commits

Reviewing files that changed from the base of the PR and between 77ba598 and 4584e70.

📒 Files selected for processing (2)
  • app/instructor/src/main/java/com/ssing/instructor/InstructorMainNavHost.kt
  • presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeScreen.kt
📝 Walkthrough

Walkthrough

강사 홈 재개 갱신, 활성 레슨 차단, 오퍼 복원 및 매칭 상태 동기화가 변경되었습니다. 매칭 가격 모델은 강사 정산 금액을 사용하며, 홈·매칭·레슨 간 내비게이션에 공통 스택 옵션이 적용됩니다.

Changes

강사 매칭 흐름

Layer / File(s) Summary
매칭 가격 및 프로필 계약 변경
data/src/main/java/com/ssing/data/matching/instructormatching/..., data/src/main/java/com/ssing/data/lesson/consumer/...
가격 요약 필드가 instructorSettlementAmount로 대체되고, 응답 매핑에서 null은 0으로 처리됩니다. 프로필 이미지 URL은 non-null 모델로 매핑됩니다.
홈 상태 및 매칭 진입
presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/...
홈 재개 시 데이터를 갱신하며, 활성 레슨이 있으면 매칭 진입을 차단합니다. 예약의 lessonIdofferId 존재 여부에 따라 레슨 또는 매칭 대기로 이동합니다.
매칭 상태 및 오퍼 동기화
presentation/instructor-matching/src/main/java/com/ssing/presentation/instructormatching/...
offerIdstartFresh 라우트 인자를 처리하고, 화면 재개·소켓 연결 시 활성 오퍼를 재동기화합니다. 오퍼 확정·거절·노출 수정·중지 시 상태와 내비게이션 효과가 조정됩니다.
강사 흐름 내비게이션 배선
app/instructor/src/main/java/com/ssing/instructor/InstructorMainNavHost.kt
홈으로 돌아가는 popUpTolaunchSingleTop 옵션을 공통 적용하고, 매칭 진입 시 새 시작 또는 offerId를 전달합니다.

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: 매칭 상태 갱신
Loading

Possibly related PRs

Suggested reviewers: doorimng, doyeon0307, joyrii

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.76% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 제목은 #216 유빈 QA 반영을 가리켜 변경 내용과 관련이 있습니다.
Description check ✅ Passed 필수 섹션이 모두 있고 관련 이슈, 작업 내용, 미완료 작업, 리뷰어 항목을 포함합니다.
Linked Issues check ✅ Passed 변경 사항이 유빈 QA 반영과 매칭 흐름 수정에 맞춰져 있어 #216의 목적과 대체로 일치합니다.
Out of Scope Changes check ✅ Passed 네비게이션, 매칭, 홈 상태 수정 등은 QA 보완으로 보여 명확한 범위 이탈은 보이지 않습니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/#216-yubin_qa

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 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)가 보장되지만, 동일하게 홈 화면에서 진입하는 navigateToMatchingnavigateToMatchingWaiting에는 해당 옵션이 누락되어 있습니다. (참고로 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 value

TODO로 명시된 서버 보강 필요 사항 확인.

주석에 이미 알려진 제약(소켓 미연결 시 노출 차단이 완전하지 않음)이 명시돼 있으며 서버 측 보강이 필요한 사안으로 보입니다. 클라이언트만으로 확실히 해결하기 어려워 별도 조치를 요구하지는 않습니다.

🤖 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4b887df and 9826212.

📒 Files selected for processing (13)
  • app/instructor/src/main/java/com/ssing/instructor/InstructorMainNavHost.kt
  • data/src/main/java/com/ssing/data/lesson/consumer/remote/dto/response/ConsumerLessonDetailResponse.kt
  • data/src/main/java/com/ssing/data/lesson/consumer/repository/impl/ConsumerLessonRepositoryImpl.kt
  • data/src/main/java/com/ssing/data/matching/instructormatching/model/InstructorMatchingOffer.kt
  • data/src/main/java/com/ssing/data/matching/instructormatching/remote/dto/response/InstructorMatchingOffersResponse.kt
  • data/src/main/java/com/ssing/data/matching/instructormatching/repository/impl/InstructorMatchingRepositoryImpl.kt
  • presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeContract.kt
  • presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeScreen.kt
  • presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeViewModel.kt
  • presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/navigation/InstructorHomeNavigation.kt
  • presentation/instructor-matching/src/main/java/com/ssing/presentation/instructormatching/MatchingViewModel.kt
  • presentation/instructor-matching/src/main/java/com/ssing/presentation/instructormatching/navigation/InstructorMatchingNavigation.kt
  • presentation/instructor-matching/src/main/java/com/ssing/presentation/instructormatching/screen/MatchingScreen.kt

@joyrii joyrii left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9826212 and 77ba598.

📒 Files selected for processing (1)
  • presentation/instructor-home/src/main/java/com/ssing/presentation/instructorhome/InstructorHomeViewModel.kt

@oilbeaneda
oilbeaneda merged commit b215d12 into develop Jul 17, 2026
2 checks passed
@oilbeaneda oilbeaneda changed the title [Refactor/#216] 유빈 QA [REFACTOR/#216] 유빈 QA Jul 17, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Jul 17, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 FIX 버그 수정 🛠️ HOTFIX 긴급 수정 ♻️ REFACTOR 전면 수정, 리팩토링 🩷 유빈

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor] 유빈 QA

2 participants