Skip to content

Conversation

@kkh725
Copy link
Collaborator

@kkh725 kkh725 commented Jan 15, 2026

1. ⭐️ 변경된 내용

  • 맛보기 매칭 버튼 500ms throttleClick으로 변경
  • 퍼즐개수 갱신 로직을 fetchUserInfo 내부로 위치이동. suspend 로 바꿔 순서보장
  • 프로필 이미지 다이얼로그에 snackbar 추가

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

3. 💡 알게된 부분

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

Summary by CodeRabbit

  • Performance Improvements

    • Puzzle count now loads only when the user is eligible, reducing unnecessary background work.
    • Card taps are throttled (500ms) to prevent rapid double-activation.
  • New Features / UI

    • Piece/profile image dialog shows a temporary "puzzle used" toast when applicable.
    • Purchasing an image marks it as used (affects dialog/state) and dialog dismissal clears the used flag.

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

@kkh725 kkh725 requested review from comst19 and tgyuuAn and removed request for tgyuuAn January 15, 2026 12:51
@coderabbitai
Copy link

coderabbitai bot commented Jan 15, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

Removed automatic puzzle count fetch from startup; converted fetchPuzzleCount() to a suspending function and moved the USER-role guard to its call sites; removed it from the refresh parallel flow; added click throttling to the matching card; threaded a new isPuzzleUsed flag through profile image dialog and related state.

Changes

Cohort / File(s) Summary
Main screen & ViewModel
feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingScreen.kt, feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingViewModel.kt
Removed fetchPuzzleCount() invocation from LifecycleStartEffect; changed fetchPuzzleCount() to internal suspend fun using suspendRunCatching; moved user-role check to call sites; removed from joinAll in refresh flow.
Card click handling
feature/matching/src/main/java/com/puzzle/matching/graph/main/component/card/MatchingCard.kt
Replaced clickable with throttledClickable (500ms) on NewMatchingCard row to throttle rapid clicks.
Profile image dialog API & propagation
feature/matching/src/main/java/com/puzzle/matching/graph/detail/dialog/ProfileImageDialog.kt, feature/matching/src/main/java/com/puzzle/matching/graph/detail/MatchingDetailScreen.kt
Added isPuzzleUsed: Boolean = false parameter to ProfileImageDialog; call site in MatchingDetailScreen now passes state.isPuzzleUsedForImage and wraps onDismissRequest in a lambda.
Detail state & ViewModel updates
feature/matching/src/main/java/com/puzzle/matching/graph/detail/contract/MatchingDetailState.kt, feature/matching/src/main/java/com/puzzle/matching/graph/detail/MatchingDetailViewModel.kt
Added isPuzzleUsedForImage: Boolean = false to state. ViewModel sets isPuzzleUsedForImage = true on successful purchase and clears it when dismissing dialog; removed a SnackBar emission on purchase success.
Design system dialog (toast for used puzzle)
core/designsystem/src/main/java/com/puzzle/designsystem/component/Dialog.kt
Added isPuzzleUsed: Boolean = false parameter to PieceImageDialog and a temporary Crossfade/LaunchedEffect toast UI that shows when isPuzzleUsed is true.

Sequence Diagram(s)

(omitted — changes are incremental UI/state updates and API threading, not a new multi-component control flow)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

픽스 👨‍🔧, 리뷰 원해요🔥

Suggested reviewers

  • tgyuuAn
  • kkh725

Poem

🐰 I hop and tap with throttled paws so light,

Puzzle counts now wait for USER's right,
Dialogs whisper that a piece was used,
State remembers, UI gently fused,
Hooray — a quiet, tidy matching night! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main changes: fixing tasting matching issues and puzzle count retrieval issues, which aligns with the core modifications across the codebase.
Description check ✅ Passed The description covers the required template sections with main changes documented, though some optional sections lack detail, which is acceptable per guidelines.

✏️ 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.

❤️ Share

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

@kkh725 kkh725 added 리뷰 원해요🔥 피어의 리뷰를 기다리는 ing.. 🔥 ㄱㅎ근형 🌙 labels Jan 15, 2026
Copy link
Collaborator

@comst19 comst19 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다.
카드 순서 관련해서 이슈 올라왔는데 확인하고 해당 브랜치에서 고쳐주세요

@kkh725

internal fun fetchPuzzleCount() = viewModelScope.launch(dispatcher) {

if (currentState.userRole != UserRole.USER) return@launch
internal suspend fun fetchPuzzleCount() = suspendRunCatching {
Copy link
Collaborator

@comst19 comst19 Jan 15, 2026

Choose a reason for hiding this comment

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

viewmodel에서만 사용하면 private해도 될 거 같습니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

5dc2cf0 수정했습니다~

@comst19 comst19 marked this pull request as draft January 15, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ㄱㅎ근형 🌙 리뷰 원해요🔥 피어의 리뷰를 기다리는 ing.. 🔥

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants