Refactor: v1.3.0 추가 QA 피드백 반영 - #178
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
Walkthrough반복 일정 삭제 확인 다이얼로그와 관련 문자열을 추가하고, CalendarIntent의 삭제 액션명을 Changes
Sequence DiagramsequenceDiagram
participant User
participant CalendarBottomSheet
participant CalendarScreen
participant Dialog
participant ViewModel
participant Repository
User->>CalendarBottomSheet: 반복 일정 삭제 제스처
CalendarBottomSheet->>CalendarScreen: onShowScheduleDeleteDialog(scheduleId)
CalendarScreen->>CalendarScreen: scheduleIdPendingDelete = scheduleId
CalendarScreen->>Dialog: 삭제 확인 다이얼로그 표시
User->>Dialog: 확인(삭제) 클릭
Dialog->>CalendarScreen: onDelete(scheduleId, isPast=false)
CalendarScreen->>ViewModel: dispatch DeleteScheduleItem(scheduleId, isPast=false)
ViewModel->>Repository: deleteSchedule(scheduleId)
Repository-->>ViewModel: AppResult.Success
ViewModel->>Repository: getScheduleMarkersInRange(selectedDate, clearOnError=false)
Repository-->>ViewModel: 마커 데이터 반환
ViewModel->>CalendarScreen: 상태 업데이트
CalendarScreen->>User: UI 갱신 (삭제 반영)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@feature/calendar/src/commonMain/kotlin/com/ondot/calendar/contract/CalendarViewModel.kt`:
- Around line 423-424: 재조회 실패 시 기존 월 마커가 비워지는 문제는 삭제 성공 후 호출하는
getScheduleMarkersInRange(selectedDate)가 실패 경로에서 schedulesByDate = emptyMap()를
적용하기 때문입니다; 삭제 흐름에서 재조회는 기존 schedulesByDate를 보존해야 하므로 getScheduleMarkersInRange
호출을 변경하여 실패 시 기존 상태를 유지하도록 처리하세요 — 예를 들어 getScheduleMarkersInRange에
preserveOnError: Boolean 매개변수를 추가하거나(기본 false) 삭제 성공 코드에서 try/catch로 래핑해 예외 발생 시
schedulesByDate를 변경하지 않도록 하며, 관련 상태 갱신 로직(특히 schedulesByDate를 설정하는 코드)을 조건부로만
실행하도록 수정하세요.
In
`@feature/calendar/src/commonMain/kotlin/com/ondot/calendar/ui/component/CalendarDay.kt`:
- Line 109: The hardcoded cell.markers.take(5) in CalendarDay can overflow the
fixed-height grid from CalendarMonthGrid (which computes rowHeight from
bodyHeight/numberOfWeeks); wrap the marker rendering in BoxWithConstraints (in
CalendarDay) and compute availableHeight from constraints.maxHeight (or use the
rowHeight passed/derived) then compute maxMarkers = floor(availableHeight /
singleMarkerHeight) (ensure >=0) and replace take(5) with take(maxMarkers);
ensure you account for vertical paddings/margins when computing availableHeight
so markers fit without overlap.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 99e1efa1-f290-4f42-a5f5-ef67d7ea2604
📒 Files selected for processing (8)
core/design-system/src/commonMain/kotlin/com/ondot/designsystem/theme/String.ktfeature/calendar/src/commonMain/kotlin/com/ondot/calendar/contract/CalendarIntent.ktfeature/calendar/src/commonMain/kotlin/com/ondot/calendar/contract/CalendarViewModel.ktfeature/calendar/src/commonMain/kotlin/com/ondot/calendar/ui/CalendarScreen.ktfeature/calendar/src/commonMain/kotlin/com/ondot/calendar/ui/component/CalendarBottomSheet.ktfeature/calendar/src/commonMain/kotlin/com/ondot/calendar/ui/component/CalendarDay.ktgradle.propertiesiosApp/iosApp.xcodeproj/project.pbxproj
작업내용
Summary by CodeRabbit
새로운 기능
버그 수정
Chores