Conversation
Walkthrough다운타임 피커의 인덱스 및 범위를 0부터 시작하도록 조정하고, DowntimeContent에 활성 카드 및 바텀시트 가시성 파라미터를 추가해 카드 포커스 상태(SelectableFocused)를 도입했습니다. 또한 날짜 검증 기준과 일부 UI 텍스트/포커스 동작을 변경했습니다. Changes
Sequence Diagram(s)(생성 조건 미충족 — 해당 섹션 생략) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
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: 2
🤖 Fix all issues with AI agents
In
`@app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/SelectedProcedureItem.kt`:
- Around line 82-88: The else branch for building downtimeText in
SelectedProcedureItem.kt is missing the "일" suffix, creating inconsistency with
ProcedureCard.kt; update the construction of downtimeText (the val downtimeText
using minDowntimeDays and maxDowntimeDays) so the else branch appends "일" (e.g.,
produce "다운타임* $minDowntimeDays-$maxDowntimeDays일") to match ProcedureCard.kt
and ensure both components display the same suffix.
In
`@app/src/main/java/com/cherrish/android/presentation/calendar/procedure/ProcedureUiState.kt`:
- Around line 74-78: The when-branch contains a duplicate condition (both use
inputDate.isBefore(startDay)) and the today variable is unused; change the first
condition to compare inputDate against today (inputDate.isBefore(today)) so the
two branches are distinct, keep the second branch as
inputDate.isBefore(startDay) with its current message, and ensure the declared
today (LocalDate.now()) is actually used by the when expression; update
ProcedureUiState.kt’s when that references inputDate/startDay/today accordingly.
| when { | ||
| inputDate.isBefore(today) -> "이미 지난 날짜는 입력할 수 없어요." | ||
| inputDate.isBefore(startDay) -> "이미 지난 날짜는 입력할 수 없어요." | ||
| inputDate.isBefore(startDay) -> "목표일은 시술 날짜 이후로만 설정할 수 있어요." | ||
| else -> null | ||
| } |
There was a problem hiding this comment.
중복 조건으로 인한 도달 불가능 코드 - 로직 오류입니다.
Line 75와 76의 조건이 동일합니다 (inputDate.isBefore(startDay)). 이로 인해 Line 76의 분기는 절대 실행되지 않습니다.
또한 Line 70의 today 변수가 선언만 되고 사용되지 않아, 리팩토링이 불완전하게 진행된 것으로 보입니다.
PR 목표("과거 시술 등록 허용")에 따르면, 기존에 today와 비교하던 로직을 startDay와 비교하도록 변경한 것으로 보이나, 조건 중 하나가 잘못 복사되었거나 의도한 조건이 누락된 것 같습니다.
🐛 수정이 필요한 부분 확인
현재 코드:
val today = LocalDate.now() // 사용되지 않음
when {
inputDate.isBefore(startDay) -> "이미 지난 날짜는 입력할 수 없어요."
inputDate.isBefore(startDay) -> "목표일은 시술 날짜 이후로만 설정할 수 있어요." // 도달 불가
else -> null
}의도한 로직을 확인하고 수정해 주세요. 예를 들어, 첫 번째 조건이 today와의 비교였다면:
- val today = LocalDate.now()
-
val inputDate = LocalDate.of(yearInt, monthInt, dayInt)
when {
- inputDate.isBefore(startDay) -> "이미 지난 날짜는 입력할 수 없어요."
inputDate.isBefore(startDay) -> "목표일은 시술 날짜 이후로만 설정할 수 있어요."
else -> null
}또는 두 조건이 서로 다른 검증을 수행해야 한다면 올바른 조건으로 수정해 주세요.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| when { | |
| inputDate.isBefore(today) -> "이미 지난 날짜는 입력할 수 없어요." | |
| inputDate.isBefore(startDay) -> "이미 지난 날짜는 입력할 수 없어요." | |
| inputDate.isBefore(startDay) -> "목표일은 시술 날짜 이후로만 설정할 수 있어요." | |
| else -> null | |
| } | |
| when { | |
| inputDate.isBefore(startDay) -> "목표일은 시술 날짜 이후로만 설정할 수 있어요." | |
| else -> null | |
| } |
🤖 Prompt for AI Agents
In
`@app/src/main/java/com/cherrish/android/presentation/calendar/procedure/ProcedureUiState.kt`
around lines 74 - 78, The when-branch contains a duplicate condition (both use
inputDate.isBefore(startDay)) and the today variable is unused; change the first
condition to compare inputDate against today (inputDate.isBefore(today)) so the
two branches are distinct, keep the second branch as
inputDate.isBefore(startDay) with its current message, and ensure the declared
today (LocalDate.now()) is actually used by the when expression; update
ProcedureUiState.kt’s when that references inputDate/startDay/today accordingly.
There was a problem hiding this comment.
@sohee6989, 네, 제 경고가 맞습니다! 🔴
현재 코드에는 심각한 로직 오류가 있습니다:
문제점:
- Line 75와 76의 조건이 완전히 동일합니다 (
inputDate.isBefore(startDay)) - 이로 인해 Line 76의 메시지 "목표일은 시술 날짜 이후로만 설정할 수 있어요."는 절대 실행되지 않습니다
- Line 70의
today변수가 선언만 되고 사용되지 않습니다
실제 동작:
when {
inputDate.isBefore(startDay) -> "이미 지난 날짜는 입력할 수 없어요." // 이것만 실행됨
inputDate.isBefore(startDay) -> "목표일은 시술 날짜 이후로만 설정할 수 있어요." // ❌ 도달 불가
else -> null
}수정 방안:
PR 목표(과거 시술 등록 허용)를 고려하면, Line 75 조건을 삭제하고 하나의 검증만 남기는 것이 맞아 보입니다:
when {
inputDate.isBefore(startDay) -> "목표일은 시술 날짜 이후로만 설정할 수 있어요."
else -> null
}그리고 사용하지 않는 today 변수도 삭제해야 합니다.
이 부분은 반드시 수정이 필요합니다! 👍
There was a problem hiding this comment.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
| val downtimeText = if (minDowntimeDays == 0 && maxDowntimeDays == 0) { | ||
| "다운타임* 0일" | ||
| } else { | ||
| "다운타임* $minDowntimeDays-$maxDowntimeDays" |
There was a problem hiding this comment.
p1: 여기도 일 붙여줘야 되는 거 아닌가여?!
| val downtimeText = if (minDowntimeDay == 0 && maxDowntimeDay == 0) { | ||
| "다운타임* 0일" | ||
| } else { | ||
| "다운타임* $minDowntimeDay-${maxDowntimeDay}일" |
There was a problem hiding this comment.
p2: minDowntimeDay도 {} 감싸주자요오~
| "다운타임* $minDowntimeDay-${maxDowntimeDay}일" | |
| "다운타임* ${minDowntimeDay}-${maxDowntimeDay}일" |
There was a problem hiding this comment.
이건 린트 돌리면 없어집니다옹!?!?!?!?!?!?!? ..^^
| modifier: Modifier = Modifier, | ||
| description: String = "본 정보는 인터넷 빅데이터 검색 및 분석을 통해 " + | ||
| "수집된 정보\n이며, 공식적인 의료 정보가 아닙니다." | ||
| "수집된 정보이며, \n공식적인 의료 정보가 아닙니다." |
There was a problem hiding this comment.
p1: 이거 '수집된 정보이며, \n공식적인'에서
,일아 \n 사이 공백 빼야되지 않나여?!
| when { | ||
| inputDate.isBefore(today) -> "이미 지난 날짜는 입력할 수 없어요." | ||
| inputDate.isBefore(startDay) -> "이미 지난 날짜는 입력할 수 없어요." | ||
| inputDate.isBefore(startDay) -> "목표일은 시술 날짜 이후로만 설정할 수 있어요." | ||
| else -> null | ||
| } |
nhyeonii
left a comment
There was a problem hiding this comment.
굿굿 ~~ 소희 언니랑 래빗이 리뷰 한번씩만 확인해줘잉 !
| modifier: Modifier = Modifier, | ||
| description: String = "본 정보는 인터넷 빅데이터 검색 및 분석을 통해 " + | ||
| "수집된 정보\n이며, 공식적인 의료 정보가 아닙니다." | ||
| "수집된 정보이며, \n공식적인 의료 정보가 아닙니다." |



Related issue 🛠
Work Description ✏️
Screenshot 📸
Uncompleted Tasks 😅
N/A
To Reviewers 📢
야호~
Summary by CodeRabbit
새로운 기능
개선 사항
기타
✏️ Tip: You can customize this high-level summary in your review settings.