Skip to content

[FIX/#136] 1차 QA 수정 사항 반영#138

Merged
usuuhyn merged 11 commits intodevelopfrom
fix/#136-qa-procedure
Jan 22, 2026
Merged

[FIX/#136] 1차 QA 수정 사항 반영#138
usuuhyn merged 11 commits intodevelopfrom
fix/#136-qa-procedure

Conversation

@usuuhyn
Copy link
Copy Markdown
Contributor

@usuuhyn usuuhyn commented Jan 21, 2026

Related issue 🛠

Work Description ✏️

  • 1차 QA를 반영했습니다.

Screenshot 📸

image

Uncompleted Tasks 😅

N/A

To Reviewers 📢

야호~

Summary by CodeRabbit

  • 새로운 기능

    • 시술 카드 포커스 집중 모드 추가 — 선택된 카드가 강조되어 보임
  • 개선 사항

    • 다운타임 선택 범위 확장(0–30일)으로 0일 선택 지원
    • 다운타임 선택기 초기값·스크롤/인덱스 동작 정밀화로 선택 동작 안정화
    • 활성 카드 ID와 하단 시트 표시 상태를 반영해 목록의 선택/강조 동작 개선
    • 입력 포커스 해제 동작 개선
  • 기타

    • 설명 문구 줄바꿈 제거 및 내부 리팩터링

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

@usuuhyn usuuhyn self-assigned this Jan 21, 2026
@usuuhyn usuuhyn requested a review from a team as a code owner January 21, 2026 21:24
@usuuhyn usuuhyn added the FIX🐛 오류 및 버그 수정 label Jan 21, 2026
@usuuhyn usuuhyn linked an issue Jan 21, 2026 that may be closed by this pull request
6 tasks
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 21, 2026

Walkthrough

다운타임 피커의 인덱스 및 범위를 0부터 시작하도록 조정하고, DowntimeContent에 활성 카드 및 바텀시트 가시성 파라미터를 추가해 카드 포커스 상태(SelectableFocused)를 도입했습니다. 또한 날짜 검증 기준과 일부 UI 텍스트/포커스 동작을 변경했습니다.

Changes

Cohort / File(s) 변경 사항
다운타임 피커 및 바텀시트
app/src/main/java/com/cherrish/android/presentation/calendar/procedure/ProcedureScreen.kt, app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/DowntimeBottomSheet.kt
피커 초기값 계산에서 -1 제거, 스크롤 상한 29→30, DatePicker 표시 범위 1..300..30로 변경(0일부터 선택 가능).
Downtime 콘텐츠 및 포커스 로직
app/src/main/java/com/cherrish/android/presentation/calendar/procedure/content/DowntimeContent.kt
DowntimeContent 시그니처에 activeCardId: Long? = null, isDowntimeBottomSheetVisible: Boolean = false 추가. 바텀시트 표시 시 해당 카드에 SelectableFocused 모드 적용 및 선택 판정 로직 갱신.
디스플레이 모드/토큰 추가
app/src/main/java/com/cherrish/android/presentation/calendar/procedure/model/ProcedureCardDisplayMode.kt, app/src/main/java/com/cherrish/android/presentation/calendar/procedure/model/ProcedureCardTokens.kt
새로운 display mode SelectableFocused 추가 및 해당 토큰(컨테이너/테두리/아이콘) 정의 추가.
다운타임 텍스트 포맷팅 리팩토링
app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/ProcedureCard.kt, .../component/SelectedProcedureItem.kt
ProcedureCardDuration 내부 문자열 생성 리팩토링(최종 표시 동일). Preview 샘플 값 일부 변경.
날짜 검증 및 예시 데이터 정리
app/src/main/java/com/cherrish/android/presentation/calendar/procedure/ProcedureUiState.kt
날짜 유효성 검사 기준을 todaystartDay로 변경(과거 판단 기준 조정), 샘플 데이터(FakeProcedureCardItems) 제거 및 불필요 import 삭제.
포커스/문구 미세조정
app/src/main/java/com/cherrish/android/presentation/calendar/procedure/content/RecoveryScheduleContent.kt, .../component/CautionDescription.kt
focusManager.clearFocus()focusManager.clearFocus(force = true)로 변경, 주의문 텍스트 줄바꿈 제거 및 Modifier.weight(1f) 추가.

Sequence Diagram(s)

(생성 조건 미충족 — 해당 섹션 생략)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • #84: DowntimeContent 시그니처 및 피커/선택 동작과 동일 영역을 수정한 PR로 코드 레벨 중복 가능성.
  • #122: 다운타임 관련 UI/피커 동작 및 ProcedureUiState 관련 변경이 겹침.
  • #99: ProcedureUiState의 날짜 검증 로직 변경과 직접적인 코드 연관.

Suggested reviewers

  • sohee6989
  • hyeminililo
  • nhyeonii
🚥 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 제목은 QA 수정사항을 반영한다는 주요 변경사항을 명확하게 설명하고 있으며, 이슈 번호와 함께 간결하게 작성되었습니다.
Description check ✅ Passed PR 설명은 템플릿의 필수 섹션을 충실히 따르고 있으며, 관련 이슈, 작업 설명, 스크린샷, 미완료 작업이 모두 포함되어 있습니다.
Linked Issues check ✅ Passed 코드 변경사항들이 이슈 #136의 모든 요구사항(다운타임 피커 0일부터 시작, 날짜 필드 포커스 해제, 과거 시술 등록, 필터 설명 수정, 다운타임 표시 수정, 선택 시 색상 변경)을 구현하고 있습니다.
Out of Scope Changes check ✅ Passed 모든 코드 변경사항이 이슈 #136의 요구사항 범위 내에 있으며, 범위를 벗어난 변경사항은 없습니다.

✏️ 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: 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.

Comment on lines 74 to 78
when {
inputDate.isBefore(today) -> "이미 지난 날짜는 입력할 수 없어요."
inputDate.isBefore(startDay) -> "이미 지난 날짜는 입력할 수 없어요."
inputDate.isBefore(startDay) -> "목표일은 시술 날짜 이후로만 설정할 수 있어요."
else -> null
}
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot Jan 21, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

중복 조건으로 인한 도달 불가능 코드 - 로직 오류입니다.

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.

Suggested change
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

래빗이 경고 괜춘한가여??

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@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 변수도 삭제해야 합니다.

이 부분은 반드시 수정이 필요합니다! 👍

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

예압.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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!

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.

수고하셨습니다!!

val downtimeText = if (minDowntimeDays == 0 && maxDowntimeDays == 0) {
"다운타임* 0일"
} else {
"다운타임* $minDowntimeDays-$maxDowntimeDays"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

p1: 여기도 일 붙여줘야 되는 거 아닌가여?!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

헉 !~ 수정할게용

val downtimeText = if (minDowntimeDay == 0 && maxDowntimeDay == 0) {
"다운타임* 0일"
} else {
"다운타임* $minDowntimeDay-${maxDowntimeDay}일"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

p2: minDowntimeDay도 {} 감싸주자요오~

Suggested change
"다운타임* $minDowntimeDay-${maxDowntimeDay}"
"다운타임* ${minDowntimeDay}-${maxDowntimeDay}"

Copy link
Copy Markdown
Contributor Author

@usuuhyn usuuhyn Jan 22, 2026

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 Author

Choose a reason for hiding this comment

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

6aa324002fac4acf9aa6f0c483fc4bb8

modifier: Modifier = Modifier,
description: String = "본 정보는 인터넷 빅데이터 검색 및 분석을 통해 " +
"수집된 정보\n이며, 공식적인 의료 정보가 아닙니다."
"수집된 정보이며, \n공식적인 의료 정보가 아닙니다."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

p1: 이거 '수집된 정보이며, \n공식적인'에서
,일아 \n 사이 공백 빼야되지 않나여?!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

image

P3 : 요거 이렇게 작성해서 화면크기 따라 줄바꿈 다르게 해줘도 좋을 거 가트요 !!

Copy link
Copy Markdown
Contributor Author

@usuuhyn usuuhyn Jan 22, 2026

Choose a reason for hiding this comment

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

수정하겟슴둥 둥 둥

Comment on lines 74 to 78
when {
inputDate.isBefore(today) -> "이미 지난 날짜는 입력할 수 없어요."
inputDate.isBefore(startDay) -> "이미 지난 날짜는 입력할 수 없어요."
inputDate.isBefore(startDay) -> "목표일은 시술 날짜 이후로만 설정할 수 있어요."
else -> null
}
Copy link
Copy Markdown
Contributor

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

@nhyeonii nhyeonii left a comment

Choose a reason for hiding this comment

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

굿굿 ~~ 소희 언니랑 래빗이 리뷰 한번씩만 확인해줘잉 !

modifier: Modifier = Modifier,
description: String = "본 정보는 인터넷 빅데이터 검색 및 분석을 통해 " +
"수집된 정보\n이며, 공식적인 의료 정보가 아닙니다."
"수집된 정보이며, \n공식적인 의료 정보가 아닙니다."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

image

P3 : 요거 이렇게 작성해서 화면크기 따라 줄바꿈 다르게 해줘도 좋을 거 가트요 !!

@usuuhyn usuuhyn added the 수현🍒 수현 담당 label Jan 22, 2026
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.

스크린샷 2026-01-22 오후 8 19 10

수고하셨습니다!!
거의 끝이길~!!

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

Labels

FIX🐛 오류 및 버그 수정 수현🍒 수현 담당

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 1차 QA 수정사항 반영

3 participants