fix/#107: SplashViewModel 업데이트 판별 로직 엣지 케이스 수정#108
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
개요SplashViewModel의 앱 업데이트 다이얼로그 판별 로직을 재사용 가능한 변경 사항SplashViewModel 업데이트 로직 리팩토링 및 검증
🎯 2 (Simple) | ⏱️ ~12 분🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
🛠 Related issue
closed #107
어떤 변경사항이 있었나요?
✅ CheckPoint
PR이 다음 요구 사항을 충족하는지 확인하세요.
✏️ Work Description
SplashViewModel.determineDialogType에서 발견된 3가지 엣지 케이스 수정[Fix 1] FORCE 전략 + 버전 조건 추가
updateStrategy == FORCE이면 현재 버전과 무관하게 항상 강제 업데이트 팝업 표시currentVersion < latestVersion일 때만 FORCE 팝업 표시 (이미 최신 버전이면 스킵)[Fix 2] 디바이스 시계 역행 시 소프트 업데이트 영구 미표시 버그 수정
currentTime - lastShown < 0이면 24시간 조건 불만족 → 소프트 업데이트 영원히 미표시lastShown > now이면effectiveLastShown = 0으로 처리하여 즉시 표시[Fix 3]
dismissSoftUpdateDataStore 저장 실패 시 무음 처리 개선Log.e로 에러 기록 +CancellationException명시적 재전파[Refactor] 순수 결정 로직 추출
resolveUpdateDialogTypeinternal 함수로 분리 (Android 의존성 없음)[Test] 업데이트 판별 로직 유닛 테스트 12개 추가
SplashUpdateLogicTest— 모든 전략/버전 조합 및 시계 역행, 최초 설치 케이스 커버😅 Uncompleted Tasks
📢 To Reviewers
resolveUpdateDialogType이internal인 이유: Kotlin top-levelprivate은 파일-private이라 동일 모듈의 다른 파일(테스트)에서 접근 불가.internal이 테스트 접근을 위한 최소 공개 범위입니다.currentVersion >= latestVersion이면 팝업을 표시하지 않습니다. 서버에서 이미 최신 버전인 유저에게 FORCE를 보내는 경우는 잘못된 서버 설정으로 간주하여 클라이언트에서 방어합니다.Summary by CodeRabbit
릴리스 노트
버그 수정
테스트