Skip to content

[FEAT/#100] 캘린더 다운타임 모드 디데이 칩 구현#108

Merged
nhyeonii merged 7 commits intodevelopfrom
feat/#100-calendar-dday-component
Jan 20, 2026
Merged

[FEAT/#100] 캘린더 다운타임 모드 디데이 칩 구현#108
nhyeonii merged 7 commits intodevelopfrom
feat/#100-calendar-dday-component

Conversation

@nhyeonii
Copy link
Copy Markdown
Contributor

@nhyeonii nhyeonii commented Jan 19, 2026

Related issue 🛠

Work Description ✏️

  • 캘린더 다운타임 모드의 디데이 칩을 구현했어요.
  • 다운타임 모드일 시 달 변경해도 다운타임 모드가 유지되도록 수정했어요.

Screenshot 📸

dDay component onChangeMonth
image
Screen_Recording_20260120_044108_Cherrish.mp4

Uncompleted Tasks 😅

  • N/A

To Reviewers 📢

이걸 100번 이슈의 악몽이라고 할 수도 없고......................................................................

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 다운타임 화면에 복구 목표일 정보 추가
    • 중요한 날짜를 표시하는 D-Day 지표 추가
  • 개선 사항

    • 다운타임 일정 뷰의 레이아웃 및 UI 개선
    • 캘린더 표시 모드에 따른 조건부 데이터 로딩 최적화

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

@nhyeonii nhyeonii requested a review from a team as a code owner January 19, 2026 19:50
@nhyeonii nhyeonii self-assigned this Jan 19, 2026
@nhyeonii nhyeonii added FEAT✨ 새로운 기능 구현 나현🍒 나현 담당 labels Jan 19, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 19, 2026

Walkthrough

이 PR은 캘린더의 D-Day 기능을 구현합니다. 백엔드 응답에서 recoveryTargetDate를 추가하여 모델에 매핑하고, 이를 dDayDate로 변환하여 뷰모델과 UI 컴포넌트에 전파합니다. D-Day 표시 아이콘과 조건부 렌더링 로직이 추가됩니다.

Changes

Cohort / File(s) 변경 사항
데이터 모델 및 DTO
app/src/main/java/com/cherrish/android/data/model/CalendarDownTimeResponseModel.kt, app/src/main/java/com/cherrish/android/data/remote/dto/response/CalendarDownTimeResponseDto.kt
recoveryTargetDate: String 필드 추가 및 DTO에서 모델로의 매핑 구현
뷰모델 및 디스플레이 모드
app/src/main/java/com/cherrish/android/presentation/calendar/CalendarViewModel.kt, app/src/main/java/com/cherrish/android/presentation/calendar/model/CalendarDisplayMode.kt
onMonthChange 로직을 모드별 조건부 실행으로 변경, dDayDate: LocalDate? 필드를 Downtime에 추가
캘린더 데이 모델 및 렌더링
app/src/main/java/com/cherrish/android/presentation/calendar/model/CalendarDay.kt, app/src/main/java/com/cherrish/android/presentation/calendar/component/DayItem.kt, app/src/main/java/com/cherrish/android/presentation/calendar/util/MonthData.kt
isDDay: Boolean 플래그 추가, D-Day 여부를 dDayDate 기반으로 계산, D-Day 아이콘 렌더링 로직 구현
리소스
app/src/main/res/drawable/ic_calendar_d_day.xml
D-Day 표시용 벡터 드로어블 리소스 신규 추가

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/>(빨강 또는 회색)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

FEAT✨, 나현🍒

Suggested reviewers

  • usuuhyn
  • hyeminililo
  • sohee6989
🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 주요 변경 사항을 명확하게 요약하고 있으며, 캘린더 다운타임 모드의 디데이 칩 구현이라는 핵심 기능 변경을 직접적으로 나타낸다.
Description check ✅ Passed PR 설명이 템플릿을 따르며, 관련 이슈, 작업 내용, 스크린샷/영상을 포함하고 있으며 미완료 항목이 명확하게 표기되어 있다.
Linked Issues check ✅ Passed PR의 코드 변경 사항들이 이슈 #100의 캘린더 D-Day 기능 구현 요구 사항을 충족한다. recoveryTargetDate 필드 추가, DTO/모델 연결, UI 컴포넌트 구현, 다운타임 모드 유지 로직 구현 등이 모두 포함되어 있다.
Out of Scope Changes check ✅ Passed 모든 변경 사항이 이슈 #100의 캘린더 D-Day 기능 구현 범위 내에 있으며, 관련 없는 코드 변경이 발견되지 않는다. 월 변경 시 다운타임 모드 유지 로직도 해당 이슈의 요구 사항 내에 포함된다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

Copy link
Copy Markdown

@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: 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/…)로 분리하는 것을 검토해 주세요. 고정 디자인이라면 현재도 문제는 없습니다.

Copy link
Copy Markdown
Contributor

@sohee6989 sohee6989 left a comment

Choose a reason for hiding this comment

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

ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링ㅅㄱ링

Copy link
Copy Markdown
Contributor

@usuuhyn usuuhyn left a comment

Choose a reason for hiding this comment

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

수고하셧습니다
02c9be9f4b9add6eea00082c2ebfb855

@nhyeonii nhyeonii merged commit 88d396e into develop Jan 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FEAT✨ 새로운 기능 구현 나현🍒 나현 담당

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 캘린더 d-day 구현

3 participants