Conversation
Walkthrough이 PR은 캘린더의 D-Day 기능을 구현합니다. 백엔드 응답에서 Changes
Sequence Diagram(s)sequenceDiagram
participant API as 백엔드 API
participant ViewModel as CalendarViewModel
participant DisplayMode as CalendarDisplayMode
participant MonthData as MonthData 유틸
participant DayItem as DayItem (UI)
API->>ViewModel: onDowntimeDetailLoaded(recoveryTargetDate)
ViewModel->>DisplayMode: Downtime 생성 (dDayDate 파싱)
ViewModel->>MonthData: 월간 캘린더 데이터 생성
MonthData->>MonthData: isDDay 계산<br/>(date == dDayDate)
MonthData->>DisplayMode: CalendarDay.Date.Downtime<br/>(isDDay 포함)
DisplayMode->>DayItem: 렌더링 데이터 전달
DayItem->>DayItem: isDDay=true 시<br/>ic_calendar_d_day 아이콘 표시
DayItem->>DayItem: 텍스트 색상 조정<br/>(빨강 또는 회색)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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: 3
🤖 Fix all issues with AI agents
In
`@app/src/main/java/com/cherrish/android/presentation/calendar/CalendarViewModel.kt`:
- Around line 251-258: The LocalDate.parse call in CalendarViewModel (dDayDate =
LocalDate.parse(response.recoveryTargetDate)) can throw DateTimeParseException
for empty or malformed strings; change to safely parse into a nullable LocalDate
(dDayDate: LocalDate?) by checking for blank response.recoveryTargetDate and/or
wrapping parsing in a try/catch or runCatching that returns null on failure,
then pass that nullable dDayDate into CalendarDisplayMode.Downtime
(selectedProcedureId = userProcedureId, dDayDate = dDayDate) so the state no
longer crashes on invalid dates.
- Around line 83-107: onMonthChange currently calls _uiState.update inside the
_uiState.updateSuccess lambda which creates nested CAS operations; instead, make
the updateSuccess call return the new UiState.Success directly (set
selectedYearMonth and selectedDate via currentState.copy(...) and return
UiState.Success(...)) and remove the inner _uiState.update call; for the
non-Downtime branch, do not invoke loadMonthlyCalendar from inside the
updateSuccess lambda — compute newSelectedDate and selectedYearMonth in the
outer scope, call _uiState.updateSuccess once to atomically set the state (using
UiState.Success(currentState.copy(...))), and then call
loadMonthlyCalendar(yearMonth, newSelectedDate) after updateSuccess completes so
there are no nested updates or CAS retries.
In
`@app/src/main/java/com/cherrish/android/presentation/calendar/component/DayItem.kt`:
- Around line 111-143: 현재 아이콘이 offset(y = 8.dp)으로 부모 경계를 넘어 렌더링될 수 있으므로,
DayItem의 부모 Box(첫 번째 Box with Modifier.aspectRatio(1f), contentAlignment =
Alignment.Center)를 수정해 오버플로우를 차단하도록 Modifier.clipToBounds()를 추가하세요; 이렇게 하면
Icon(...)의 offset이 밖으로 그려지는 것을 막아 아래 셀과 겹치는 문제를 해결합니다.
🧹 Nitpick comments (1)
app/src/main/res/drawable/ic_calendar_d_day.xml (1)
1-17: 색상 하드코딩은 테마 대응에 불리할 수 있어요
다크 모드나 브랜드 컬러 변경을 고려한다면 색상을 리소스(@color/…)로 분리하는 것을 검토해 주세요. 고정 디자인이라면 현재도 문제는 없습니다.
sohee6989
left a comment
There was a problem hiding this comment.
ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링

Related issue 🛠
Work Description ✏️
Screenshot 📸
Screen_Recording_20260120_044108_Cherrish.mp4
Uncompleted Tasks 😅
To Reviewers 📢
이걸 100번 이슈의 악몽이라고 할 수도 없고......................................................................
Summary by CodeRabbit
릴리스 노트
새로운 기능
개선 사항
✏️ Tip: You can customize this high-level summary in your review settings.