Skip to content

Conversation

@comst19
Copy link
Collaborator

@comst19 comst19 commented Dec 27, 2025

1. ⭐️ 변경된 내용

  • 퍼즐 사용 api에 .also로 다이얼로그 끄는 로직 제거

2. 🖼️ 스크린샷(선택)

3. 💡 알게된 부분

4. 📌 이 부분은 꼭 봐주세요!

Summary by CodeRabbit

  • Refactor
    • Simplified navigation event handling by removing automatic dialog state cleanup that followed certain route transitions.

✏️ Tip: You can customize this high-level summary in your review settings.

@comst19 comst19 self-assigned this Dec 27, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 27, 2025

📝 Walkthrough

Walkthrough

The pull request removes finalizer state updates (isShowDialog = false) that were triggered after navigation to MatchingDetailRoute and ContactRoute in MatchingViewModel, while preserving the existing error handling logic with onFailure { handleMatchingError(it) }.

Changes

Cohort / File(s) Summary
Dialog state cleanup removal
feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingViewModel.kt
Removed .also { setState { copy(isShowDialog = false) } } finalizer blocks following two navigation calls, eliminating the automatic dialog state reset after navigating to MatchingDetailRoute and ContactRoute

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

Poem

🐰 A dialog state bid adieu,
No more false resets in view,
Navigation flows cleaner and light,
One less .also block in sight! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: fixing a bug where a puzzle shortage dialog closes immediately after appearing.
Description check ✅ Passed The description follows the required template structure with the main change explained in section 1, though sections 2-4 are mostly empty or minimal.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/PC-000_fix_dialog

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingViewModel.kt (1)

235-267: Optional: Consider explicit dialog state cleanup on success.

While the current fix correctly addresses the bug, isShowDialog remains true after successful navigation. Although this doesn't cause visible issues (since navigation occurs), you could optionally add explicit cleanup in the onSuccess blocks for cleaner state management:

}.onSuccess {
    // ... existing code ...
    setState { copy(isShowDialog = false) }
}.onFailure { handleMatchingError(it) }

This is a minor refinement and can be deferred if preferred.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c5e4a42 and 1234a8a.

📒 Files selected for processing (1)
  • feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingViewModel.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (2)
feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingViewModel.kt (2)

235-247: LGTM! Dialog state fix is correct.

Removing the .also { setState { copy(isShowDialog = false) } } block correctly fixes the issue where the puzzle shortage dialog was closing immediately. Previously, when the API failed with NOT_ENOUGH_PUZZLE, handleMatchingError would show the dialog, but the .also block would execute afterward and close it immediately.


256-267: LGTM! Consistent fix applied.

The same fix is correctly applied here—removing the .also block prevents the dialog from being closed immediately after handleMatchingError shows it on failure. The error handling logic is preserved correctly.

@comst19 comst19 merged commit 803c8a6 into develop Dec 27, 2025
2 checks passed
@comst19 comst19 deleted the fix/PC-000_fix_dialog branch December 27, 2025 07:44
comst19 added a commit that referenced this pull request Jan 3, 2026
* [PC-1507] MatchingScreen 에서 발생하는 에러 예외 처리 (#187) (#188)

* fix: gson 제거 및 proto datastore로 마이그레이션 하면서 consumer-rules 수정

* [PC-1507] MatchingViewmodel 에러 처리 로직 수정

* [PC-000] 퍼즐 부족 다이얼로그 표출되자마자 꺼지는 이슈 수정 (#189)

* [PC-1514] 매칭 풀 소진 다이얼로그 구현

* [PC-1514] 매칭 풀 소진 다이얼로그 show, hide 로직 추가

* [PC-1514] 이미 구매한 연락처 에러 처리 로직 추가

* [PC-1514] 퍼즐 부족 에러 시 사용자 퍼즐 요청

* [PC-1514] 뉴 매치일 때 checkMatchingPiece 하도록 변경

* [PC-1514] MatchingPoolEmptyDialog 미구현 로직 주석 추가

* [PC-1514] 연락처 조회 실패 시 에러 로직 함수 호출 시 matchId 인자 추가

* [PC-1514] 새 매칭 진입 시 펼쳐진 카드 변경

* [PC-1514] ci 실패 수정

* [PC-1514] getInstantNewMatch에 퍼즐 사용 파라미터 추가

* [PC-1514] onRefresh -> onPullToRefresh 변경

* [PC-1514] PreviewMatchingPoolEmptyDialog 가시성 추가

* [PC-1514] getInstantNewMatch 파라미터 명 변경

* [PC-1514] PreviewTimerCompleteDialog가시성 추가

* [PC-1537] 다중매칭 관련 Amplitude logging 추가 (#191)

* [PC-1537] analyticsHelper 미구현 screen 로깅 추가 및 최상단이 아닌 컴포넌트단으로 위치 이동

* [PC-1537] MatchingDetailScreen에 entryRoute 추가

* [PC-1537] entryRoute -> entryRouteForLog 로 파라미터명 수정

* [PC-1537] entryRoute -> entryRouteForLog 로 파라미터명 수정

* [PC-1537] AmplitudeEvent를 track, revenue 타입으로 변경

* [PC-1537] billing 모듈에 analytics 의존성 추가

* [PC-1537] trackRevenue 추가

* [PC-1534] 매칭 풀 소진 다이얼로그(기본) 구현 (#192)

* [PC-1534] 매칭 풀 다이얼로그(기본) show/hide 로직 구현

* [PC-1534] 매칭 풀 다이얼로그 show/hide 로직 수정

* [PC-1534] showPurchaseDialog -> showDialog

* [PC-1534] MatchingPoolType -> MatchingPoolEmptyType

* [PC-1534] isModalShownToday -> isBasicMatchingPoolEmptyDialogShownToday

* [PC-1534] getStandardDate -> getResetDateString

* [PC-1534] getResetDateString 함수 테스트 코드 작성

* [PC-1534] LastModal -> LastMatchingPoolEmptyDialog

* [PC-1534] 로그아웃, 탈퇴 시 매칭 풀 소진 다이얼로그 clear

* [PC-1534] LastModal -> LastMatchingPoolEmptyDialog

* [PC-1534] LastModal -> LastMatchingPoolEmptyDialog

* [PC-1534] 로그인, 로그아웃 테스트 코드에 lastMatchingPoolEmptyDialogShownDate 빈 값 확인 코드 추가

* [PC-1534] 매칭 풀 소진 다이얼로그(기본) show/hide 테스트 코드 추가

* [PC-1534] 매칭 풀 소진 다이얼로그(기본) subText 수정

* [PC-1534] 매칭 풀 소진 다이얼로그 표출 확인 테스트 코드 작성

* [PC-1534] 매칭 풀 소진 다이얼로그 본 날짜 토큰 만료시 제거하도록 변경

* [PC-1534] 맛보기 매칭 풀 소진일 때는 Basic 매칭 풀 소진 표출되도록 변경

* [PC-1534] lastMatchingPoolEmptyDialogShownDate 타입 non-null로 변경

* [PC-1514] ci 실패 수정

* [PC-1514] ci 실패 수정

---------

Co-authored-by: Kim Kuen Hyung <120651330+kkh725@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants