Skip to content

[FEAT/#16] 캘린더 뷰 컴포넌트 구현#22

Merged
nhyeonii merged 28 commits intodevelopfrom
feat/#16-calendar-view-component
Jan 12, 2026
Merged

[FEAT/#16] 캘린더 뷰 컴포넌트 구현#22
nhyeonii merged 28 commits intodevelopfrom
feat/#16-calendar-view-component

Conversation

@nhyeonii
Copy link
Copy Markdown
Contributor

@nhyeonii nhyeonii commented Jan 9, 2026

Related issue 🛠

Work Description ✏️

  • 캘린더 뷰에 필요한 컴포넌트들을 만들었어요.

Screenshot 📸

AddProcedureButton DownTimeStatusIndicator ProcedureInfoItem ProcedureScheduleCard
스크린샷 2026-01-10 오전 1 46 04 스크린샷 2026-01-10 오전 1 46 26 스크린샷 2026-01-10 오전 1 46 37 스크린샷 2026-01-10 오전 1 46 52

Uncompleted Tasks 😅

  • 아직 디자인이 나오지 않아 시술 EmptyViewCard가 없습니다용

To Reviewers 📢

캘린더 탭의 컴포넌트들 다 만들었어요! 다운 타임 컴포넌트 관련 색상이 필요해서 #15 불가피하게 캘린더 컴포넌트 브랜치 떙겨와서 작업했습니다! 캘린더 컴포넌트 머지된 후 드래프트 풀게요 ~~

Summary by CodeRabbit

  • 새로운 기능
    • 시술 일정 추가 버튼(플러스 아이콘·누름 시 축소 애니메이션) 추가
    • 시술 일정 카드: 항목 리스트화, 항목 클릭·추가 액션, 스크롤 힌트 그라데이션 추가
    • 시술 정보 항목 컴포넌트: 이름·일자·다운타임 표시 및 활성/비활성 스타일
    • 다운타임 상태 표시기(민감/주의/회복 등) 추가
    • 모델·타입(시술 정보·상태·유형)·색 매핑 유틸 및 아이콘·테마 그림자 색상 추가

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

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

coderabbitai Bot commented Jan 9, 2026

Walkthrough

캘린더 화면용 Jetpack Compose 컴포넌트(추가 버튼, 다운타임 상태 표시기, 절차 항목, 일정 카드), 관련 모델/유틸(ProcedureInfoModel, ProcedureType, DownTimeStatus, ProcedureUtil), 테마 색상(shadow) 및 플러스 아이콘 리소스가 추가되고 CalendarDisplayMode.Downtime에 selectedProcedureId가 도입되었습니다.

Changes

코호트 / 파일(s) 변경 요약
캘린더 UI 컴포넌트
app/src/main/java/com/cherrish/android/presentation/calendar/component/AddProcedureButton.kt, app/src/main/java/com/cherrish/android/presentation/calendar/component/DownTimeStatusIndicator.kt, app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureInfoItem.kt, app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt
4개 새 Compose 컴포넌트 추가: 플러스 버튼(press scale 애니메이션, interactionSource), 다운타임 상태 표시(여러 상태 아이템), 절차 정보 항목(타입별 색상·클릭 처리), 절차 일정 카드(LazyColumn 목록, 모드별 헤더 액션, 스크롤 기반 그라데이션). 검토 포인트: 클릭 콜백 흐름, interactionSource 전달, LazyColumn 스크롤 상태/그라데이션 조건, getProcedureType 연동
캘린더 모델
app/src/main/java/com/cherrish/android/presentation/calendar/model/CalendarDisplayMode.kt, app/src/main/java/com/cherrish/android/presentation/calendar/model/DownTimeStatus.kt, app/src/main/java/com/cherrish/android/presentation/calendar/model/ProcedureInfoModel.kt, app/src/main/java/com/cherrish/android/presentation/calendar/model/ProcedureType.kt
모델·열거형 추가/수정: ProcedureInfoModel(@Immutable), ProcedureType enum, DownTimeStatus enum 추가. CalendarDisplayMode.Normal/Downtime@Immutable 추가 및 DowntimeselectedProcedureId: Long? = null 프로퍼티 추가(공개 API 변경).
유틸리티 및 테마 확장
app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureUtil.kt, app/src/main/java/com/cherrish/android/core/designsystem/theme/Color.kt
절차별 색상 매핑 타입(ProcedureColors)과 매핑 로직 getProcedureColors, 모드 기반 타입 판단 getProcedureType(displayMode, procedureId, downTimeDuration) 추가. 테마에 shadow 색상 필드 및 기본값 추가(CherrishColors.shadow). 기존 테마 소비처 호환성 점검 필요.
리소스
app/src/main/res/drawable/ic_plus.xml
24dp 플러스 벡터 드로어블 추가(흰색 경로). 아이콘 색상/크기 일관성 확인 권고.

Sequence Diagram(s)

(생성 조건 미충족 — 생략)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • usuuhyn
  • sohee6989
  • hyeminililo
🚥 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 변경사항이 #16의 목표인 '캘린더 뷰 컴포넌트 구현'을 충족합니다. AddProcedureButton, DownTimeStatusIndicator, ProcedureInfoItem, ProcedureScheduleCard 등 필요한 컴포넌트들이 모두 구현되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 캘린더 뷰 컴포넌트 구현과 관련되어 있습니다. 새로운 UI 컴포넌트, 모델, 유틸리티, 디자인 토큰(shadow 색상) 추가가 포함되어 있으며, 이는 모두 목표 범위 내입니다.

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

@nhyeonii nhyeonii marked this pull request as draft January 9, 2026 16:54
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: 1

🤖 Fix all issues with AI agents
In
@app/src/main/java/com/cherrish/android/presentation/calendar/model/CalendarDisplayMode.kt:
- Around line 5-14: Add the @Immutable annotation to the sealed interface
CalendarDisplayMode so Compose can treat its implementations (the data classes
Normal and Downtime) as immutable; import androidx.compose.runtime.Immutable and
annotate the CalendarDisplayMode sealed interface declaration with @Immutable to
match CalendarDay, CalendarMonth, and ProcedureInfoModel.
🧹 Nitpick comments (15)
app/src/main/java/com/cherrish/android/presentation/calendar/util/CalendarCalculator.kt (1)

5-5: 의도(동일 요일=0 반환) 명시 + 반환 타입 명시 추천

현재 구현은 “앞으로 진행” 기준으로 0..6을 반환하며(같은 요일이면 0), 계산 자체는 깔끔합니다. 다만 달력 로직에서 “다음 주 같은 요일”을 원해 7을 기대하는 케이스가 종종 있어, 의미를 KDoc로 고정하고 반환 타입을 명시해 두는 편이 안전합니다.

제안 diff
-fun DayOfWeek.daysUntil(other: DayOfWeek) = (other.value - value + 7) % 7
+/**
+ * Returns the number of days to reach [other] moving forward within a 7-day cycle.
+ * Range: 0..6 (returns 0 when [other] is the same as this day).
+ */
+fun DayOfWeek.daysUntil(other: DayOfWeek): Int = (other.value - value + 7) % 7
app/src/main/java/com/cherrish/android/presentation/calendar/model/ProcedureType.kt (1)

3-6: KDoc 추가를 고려하세요.

enum 클래스가 간단하지만, 여러 컴포넌트에서 사용되는 공용 모델이므로 각 상태의 의미를 명확히 하는 문서화가 유용합니다.

📝 KDoc 추가 예시
+/**
+ * 시술의 활성화 상태를 나타내는 타입
+ */
 enum class ProcedureType {
+    /** 활성 상태의 시술 */
     ACTIVE,
+    /** 비활성 상태의 시술 */
     INACTIVE
 }
app/src/main/res/drawable/ic_plus.xml (1)

6-10: 테마 색상 적용을 고려하세요.

아이콘의 색상이 #ffffff로 하드코딩되어 있어 다크 모드나 테마 변경 시 유연하게 대응하기 어렵습니다. 또한 fillColorstrokeColor가 동일한 색상을 사용하고 있어 중복입니다.

🎨 개선 방안
  1. Compose에서 Icon 사용 시 tint 파라미터로 색상을 제어하거나
  2. fillColor@android:color/white로 변경하여 시스템 색상 참조
  3. strokeColor 제거 (fill만으로 충분한 경우)
   <path
       android:pathData="M12,5.9C12.225,5.9 12.441,5.99 12.601,6.149C12.76,6.309 12.85,6.525 12.85,6.75V11.15H17.25C17.475,11.15 17.691,11.24 17.851,11.399C18.01,11.559 18.1,11.775 18.1,12C18.1,12.225 18.01,12.441 17.851,12.601C17.691,12.76 17.475,12.85 17.25,12.85H12.85V17.25C12.85,17.475 12.76,17.691 12.601,17.851C12.441,18.01 12.225,18.1 12,18.1C11.775,18.1 11.559,18.01 11.399,17.851C11.24,17.691 11.15,17.475 11.15,17.25V12.85H6.75C6.525,12.85 6.309,12.76 6.149,12.601C5.99,12.441 5.9,12.225 5.9,12C5.9,11.775 5.99,11.559 6.149,11.399C6.309,11.24 6.525,11.15 6.75,11.15H11.15V6.75C11.15,6.525 11.24,6.309 11.399,6.149C11.559,5.99 11.775,5.9 12,5.9Z"
-      android:strokeWidth="0.2"
-      android:fillColor="#ffffff"
-      android:strokeColor="#ffffff"/>
+      android:fillColor="@android:color/white"/>

AddProcedureButton에서 Icon(tint = ...)로 동적으로 색상을 지정하는 것을 권장합니다.

app/src/main/res/drawable/ic_calendar_left.xml (1)

6-13: 테마 색상 사용을 권장합니다.

#1B1D1F 색상이 하드코딩되어 있어 테마 변경 시 일관성을 유지하기 어렵습니다. fillColorstrokeColor가 동일하여 중복되며, Compose의 Icon tint로 색상을 제어하는 것이 더 유연합니다.

🎨 리팩토링 제안
   <path
       android:pathData="M14.854,6.146C15.049,6.342 15.049,6.658 14.854,6.854L9.207,12.5L14.854,18.146C15.049,18.342 15.049,18.658 14.854,18.854C14.658,19.049 14.342,19.049 14.146,18.854L8.146,12.854C7.951,12.658 7.951,12.342 8.146,12.146L14.146,6.146C14.342,5.951 14.658,5.951 14.854,6.146Z"
-      android:strokeLineJoin="round"
-      android:strokeWidth="0.4"
-      android:fillColor="#1B1D1F"
       android:fillType="evenOdd"
-      android:strokeColor="#1B1D1F"
-      android:strokeLineCap="round"/>
+      android:fillColor="@android:color/black"/>

CalendarMonthHeader 등에서 사용 시 Icon(tint = MaterialTheme.colorScheme.onSurface)로 동적 색상을 적용하세요.

app/src/main/res/drawable/ic_calendar_right.xml (1)

6-13: 테마 색상 사용을 권장합니다.

ic_calendar_left.xml과 동일하게 #1B1D1F 색상이 하드코딩되어 있습니다. 일관된 테마 적용을 위해 Compose의 tint 파라미터를 활용하는 것이 좋습니다.

🎨 리팩토링 제안
   <path
       android:pathData="M9.146,6.146C8.951,6.342 8.951,6.658 9.146,6.854L14.793,12.5L9.146,18.146C8.951,18.342 8.951,18.658 9.146,18.854C9.342,19.049 9.658,19.049 9.854,18.854L15.854,12.854C16.049,12.658 16.049,12.342 15.854,12.146L9.854,6.146C9.658,5.951 9.342,5.951 9.146,6.146Z"
-      android:strokeLineJoin="round"
-      android:strokeWidth="0.4"
-      android:fillColor="#1B1D1F"
       android:fillType="evenOdd"
-      android:strokeColor="#1B1D1F"
-      android:strokeLineCap="round"/>
+      android:fillColor="@android:color/black"/>

CalendarMonthHeader에서 사용 시 Icon(tint = MaterialTheme.colorScheme.onSurface)로 테마 색상을 적용하세요.

app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureColors.kt (1)

7-12: Compose 안정성을 위해 @Immutable 어노테이션 추가를 권장합니다.

ProcedureColors는 Compose에서 사용되는 데이터 클래스이며 불변 속성만 포함하므로, @Immutable 어노테이션을 추가하면 Compose의 스마트 리컴포지션 최적화를 활용할 수 있습니다. ProcedureInfoModel과 동일한 패턴입니다.

♻️ 제안하는 수정
+import androidx.compose.runtime.Immutable
+
+@Immutable
 data class ProcedureColors(
     val background: Color,
     val border: Color,
     val text: Color,
     val divider: Color
 )
app/src/main/java/com/cherrish/android/presentation/calendar/component/AddProcedureButton.kt (1)

66-66: 하드코딩된 문자열을 리소스로 추출하는 것을 권장합니다.

"시술 일정 추가하기" 문자열이 하드코딩되어 있습니다. 국제화(i18n) 및 유지보수성을 위해 strings.xml로 추출하는 것이 좋습니다.

♻️ 제안하는 수정

res/values/strings.xml에 추가:

<string name="add_procedure_schedule">시술 일정 추가하기</string>

코드 수정:

+import androidx.compose.ui.res.stringResource
+
 Text(
-    text = "시술 일정 추가하기",
+    text = stringResource(id = R.string.add_procedure_schedule),
     color = CherrishTheme.colors.gray0,
     style = CherrishTheme.typography.title2SB16
 )
app/src/main/java/com/cherrish/android/presentation/calendar/model/DownTimeStatus.kt (1)

3-10: 다국어 지원을 위해 문자열 리소스 사용을 고려하세요.

현재 레이블이 하드코딩되어 있습니다. 향후 다국어 지원이 필요할 경우, strings.xml 리소스를 사용하는 것이 좋습니다. 한국어 전용 앱이라면 현재 구현도 괜찮습니다.

app/src/main/java/com/cherrish/android/presentation/calendar/component/DaysOfWeekTitle.kt (1)

40-47: 하드코딩된 Color.Black 대신 테마 색상을 사용하세요.

다른 컴포넌트들(DownTimeStatusIndicator, CalendarMonthHeader)은 CherrishTheme.colors를 사용하고 있습니다. 일관성과 다크 모드 지원을 위해 테마 색상 사용을 권장합니다.

♻️ 수정 제안
 Text(
     text = dayOfWeek.getDisplayName(
         TextStyle.SHORT,
         Locale.getDefault()
     ),
     textAlign = TextAlign.Center,
-    color = Color.Black
+    color = CherrishTheme.colors.gray1000
 )
app/src/main/java/com/cherrish/android/presentation/calendar/component/DownTimeStatusIndicator.kt (2)

50-61: 불필요한 .padding(vertical = 3.dp) 제거를 권장합니다.

Boxclip, background, border를 적용한 후 padding을 추가해도 12dp 크기의 원형 점에는 시각적 효과가 없습니다. 이 패딩은 제거해도 됩니다.

♻️ 수정 제안
 Box(
     modifier = Modifier
         .size(12.dp)
         .clip(shape = CircleShape)
         .background(color = colors.background)
         .border(
             width = 1.dp,
             color = colors.border,
             shape = CircleShape
         )
-        .padding(vertical = 3.dp)
 )

70-76: Preview 함수명이 실제 미리보기 대상과 일치하지 않습니다.

DownTimeStatusItemPreviewDownTimeStatusIndicator를 미리보기하고 있습니다. 명확성을 위해 DownTimeStatusIndicatorPreview로 변경하는 것을 권장합니다.

♻️ 수정 제안
 @Preview
 @Composable
-private fun DownTimeStatusItemPreview() {
+private fun DownTimeStatusIndicatorPreview() {
     CherrishTheme {
         DownTimeStatusIndicator()
     }
 }
app/src/main/java/com/cherrish/android/presentation/calendar/component/CalendarMonthHeader.kt (1)

44-51: getDisplayName() 호출을 remember로 최적화하는 것을 고려하세요.

현재 구현에서는 매 recomposition마다 getDisplayName()Locale.getDefault()가 호출됩니다. 헤더 컴포넌트는 자주 recompose될 수 있으므로, 다음과 같이 최적화를 고려해보세요:

♻️ 제안하는 최적화
+    val monthText = remember(yearMonth) {
+        "${yearMonth.year}년 ${yearMonth.month.getDisplayName(
+            TextStyle.SHORT,
+            Locale.getDefault()
+        )}"
+    }
+
     Text(
-        text = "${yearMonth.year}년 ${yearMonth.month.getDisplayName(
-            TextStyle.SHORT,
-            Locale.getDefault()
-        )}",
+        text = monthText,
         color = CherrishTheme.colors.gray1000,
         style = CherrishTheme.typography.title2M16
     )
app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt (1)

54-77: 리스트 렌더링 방식을 검토하세요.

현재 forEachIndexed를 사용하여 아이템을 렌더링하고 있습니다. 시술 정보가 적을 때는 문제없지만, 아이템 수가 증가하면 성능 문제가 발생할 수 있습니다.

고려사항:

  • 아이템 수가 적고 스크롤이 필요 없다면 현재 구현 유지 가능
  • 아이템 수가 많아질 가능성이 있다면 LazyColumn 사용을 권장
♻️ LazyColumn을 사용한 대안
+    LazyColumn(
+        modifier = modifier
             .fillMaxWidth()
             .dropShadow(...)
             .clip(shape = RoundedCornerShape(10.dp))
             .background(color = CherrishTheme.colors.gray0, shape = RoundedCornerShape(10.dp))
-            .padding(vertical = 18.dp, horizontal = 19.dp)
-    ) {
+    ) {
+        item {
+            Column(modifier = Modifier.padding(vertical = 18.dp, horizontal = 19.dp)) {
-        ScheduleHeader(displayMode = displayMode)
+                ScheduleHeader(displayMode = displayMode)
-        Spacer(modifier = Modifier.height(15.dp))
+                Spacer(modifier = Modifier.height(15.dp))
+            }
+        }
-        procedureInfo.forEachIndexed { index, procedure ->
+        itemsIndexed(procedureInfo) { index, procedure ->
             val procedureType = when (displayMode) {
                 is CalendarDisplayMode.Normal -> ProcedureType.ACTIVE
                 is CalendarDisplayMode.Downtime -> {
                     if (displayMode.selectedProcedureId == procedure.procedureId) {
                         ProcedureType.ACTIVE
                     } else {
                         ProcedureType.INACTIVE
                     }
                 }
             }

-            ProcedureInfoItem(
+            ProcedureInfoItem(
+                modifier = Modifier.padding(horizontal = 19.dp),
                 procedureName = procedure.procedureName,
                 procedureDay = procedure.procedureDay,
                 downTimeDuration = procedure.downTimeDuration,
                 procedureType = procedureType,
                 onClick = { onClick(procedure.procedureId) }
             )

             if (index < procedureInfo.lastIndex) {
                 Spacer(modifier = Modifier.height(8.dp))
             }
         }
     }
app/src/main/java/com/cherrish/android/presentation/calendar/component/DayItem.kt (1)

40-43: onClick 내부의 중복 조건을 제거하세요.

noRippleClickableenabled 파라미터가 이미 day is CalendarDay.Date로 설정되어 있으므로, onClick 람다 내부의 타입 체크가 중복됩니다. enabledfalse일 때는 onClick이 호출되지 않습니다.

🔧 제안하는 수정
     .noRippleClickable(
         enabled = day is CalendarDay.Date,
-        onClick = { if (day is CalendarDay.Date) onDateClick(day.date) }
+        onClick = { onDateClick((day as CalendarDay.Date).date) }
     ),
app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureInfoItem.kt (1)

37-37: getProcedureColors 호출을 remember로 최적화하세요.

색상 계산이 매 recomposition마다 실행되고 있습니다. procedureType이나 테마 색상이 변경되지 않으면 동일한 결과를 반환하므로 메모이제이션이 필요합니다.

♻️ 제안하는 최적화
+    val cherrishColors = CherrishTheme.colors
+    val colors = remember(procedureType, cherrishColors) {
+        getProcedureColors(procedureType, cherrishColors)
+    }
-    val colors = getProcedureColors(procedureType, CherrishTheme.colors)
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ad96acb and ff7722e.

📒 Files selected for processing (23)
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/AddProcedureButton.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/BasicCalendar.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/CalendarMonthHeader.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/CherrishCalendar.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/DayItem.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/DaysOfWeekTitle.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/DownTimeStatusIndicator.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureInfoItem.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/model/CalendarDay.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/model/CalendarDisplayMode.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/model/CalendarMonth.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/model/DownTimeStatus.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/model/ProcedureInfoModel.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/model/ProcedureType.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/util/CalendarCalculator.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/util/DateExtensions.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/util/DownTimeColors.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/util/MonthData.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureColors.kt
  • app/src/main/res/drawable/ic_calendar_left.xml
  • app/src/main/res/drawable/ic_calendar_right.xml
  • app/src/main/res/drawable/ic_plus.xml
🧰 Additional context used
📓 Path-based instructions (1)
**/*.kt

⚙️ CodeRabbit configuration file

**/*.kt: - Jetpack Compose 구조, 상태 관리, recomposition 최적화에 집중

  • ViewModel, UiState, 단방향 데이터 흐름 패턴 검토
  • 불필요한 recomposition 가능성, remember/derivedStateOf 적절한 사용 확인
  • 네이밍 컨벤션, 가독성, Google 권장 Android 아키텍처 준수 여부

Files:

  • app/src/main/java/com/cherrish/android/presentation/calendar/model/ProcedureType.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/util/DownTimeColors.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureColors.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/DaysOfWeekTitle.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/model/ProcedureInfoModel.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/model/CalendarDisplayMode.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/DownTimeStatusIndicator.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/util/DateExtensions.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/CalendarMonthHeader.kt
  • 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/component/ProcedureInfoItem.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/util/MonthData.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/BasicCalendar.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/util/CalendarCalculator.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/AddProcedureButton.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/model/DownTimeStatus.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/CherrishCalendar.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/model/CalendarMonth.kt
🧬 Code graph analysis (7)
app/src/main/java/com/cherrish/android/presentation/calendar/component/DaysOfWeekTitle.kt (2)
app/src/main/java/com/cherrish/android/core/designsystem/theme/Theme.kt (1)
  • CherrishTheme (38-61)
app/src/main/java/com/cherrish/android/presentation/calendar/util/DateExtensions.kt (1)
  • daysOfWeek (9-13)
app/src/main/java/com/cherrish/android/presentation/calendar/component/DownTimeStatusIndicator.kt (2)
app/src/main/java/com/cherrish/android/presentation/calendar/util/DownTimeColors.kt (1)
  • getDowntimeColors (12-34)
app/src/main/java/com/cherrish/android/core/designsystem/theme/Theme.kt (1)
  • CherrishTheme (38-61)
app/src/main/java/com/cherrish/android/presentation/calendar/component/CalendarMonthHeader.kt (1)
app/src/main/java/com/cherrish/android/core/designsystem/theme/Theme.kt (1)
  • CherrishTheme (38-61)
app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureInfoItem.kt (2)
app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureColors.kt (1)
  • getProcedureColors (14-32)
app/src/main/java/com/cherrish/android/core/designsystem/theme/Theme.kt (1)
  • CherrishTheme (38-61)
app/src/main/java/com/cherrish/android/presentation/calendar/component/BasicCalendar.kt (3)
app/src/main/java/com/cherrish/android/presentation/calendar/util/MonthData.kt (1)
  • generateMonthData (53-61)
app/src/main/java/com/cherrish/android/presentation/calendar/util/DateExtensions.kt (1)
  • daysOfWeek (9-13)
app/src/main/java/com/cherrish/android/presentation/calendar/component/DaysOfWeekTitle.kt (1)
  • DaysOfWeekTitle (24-51)
app/src/main/java/com/cherrish/android/presentation/calendar/component/AddProcedureButton.kt (2)
app/src/main/java/com/cherrish/android/core/designsystem/component/button/CherrishBasicButton.kt (1)
  • CherrishBasicButton (19-42)
app/src/main/java/com/cherrish/android/core/designsystem/theme/Theme.kt (1)
  • CherrishTheme (38-61)
app/src/main/java/com/cherrish/android/presentation/calendar/component/CherrishCalendar.kt (4)
app/src/main/java/com/cherrish/android/presentation/calendar/component/CalendarMonthHeader.kt (1)
  • CalendarMonthHeader (24-60)
app/src/main/java/com/cherrish/android/presentation/calendar/component/BasicCalendar.kt (1)
  • BasicCalendar (24-58)
app/src/main/java/com/cherrish/android/presentation/calendar/component/DayItem.kt (1)
  • DayItem (30-59)
app/src/main/java/com/cherrish/android/core/designsystem/theme/Theme.kt (1)
  • CherrishTheme (38-61)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: PR Lint Check
  • GitHub Check: PR Build Check
🔇 Additional comments (15)
app/src/main/java/com/cherrish/android/presentation/calendar/model/CalendarMonth.kt (1)

6-10: 좋은 구조입니다!

@Immutable 애노테이션을 사용하여 Compose의 recomposition 최적화를 적절히 활용하고 있습니다. YearMonth 타입 사용과 간결한 데이터 클래스 구조가 적절합니다.

app/src/main/java/com/cherrish/android/presentation/calendar/model/ProcedureInfoModel.kt (1)

5-11: 잘 구현되었습니다!

@Immutable 어노테이션을 사용하여 Compose의 리컴포지션 최적화를 올바르게 지원하고 있으며, 데이터 클래스 구조도 명확합니다.

app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureColors.kt (1)

14-32: 색상 매핑 로직이 정확합니다.

ProcedureType에 따른 색상 매핑이 명확하며, when 표현식이 모든 케이스를 처리하고 있습니다.

app/src/main/java/com/cherrish/android/presentation/calendar/component/AddProcedureButton.kt (2)

37-43: 프레스 애니메이션이 올바르게 구현되었습니다.

interactionSource.collectIsPressedAsState()animateFloatAsState를 사용한 스케일 애니메이션 구현이 Compose 모범 사례를 따르고 있습니다.


45-72: 버튼 구조와 스타일링이 적절합니다.

CherrishBasicButton을 활용하고 디자인 시스템의 색상과 타이포그래피를 일관되게 적용하고 있습니다.

app/src/main/java/com/cherrish/android/presentation/calendar/util/DateExtensions.kt (2)

9-13: 주의 시작일 재정렬 로직이 정확합니다.

DayOfWeek.entries를 피벗 기준으로 재정렬하는 로직이 올바르게 구현되어 있습니다. 로케일 기반 주 시작일을 지원합니다.


15-27: 날짜 확장 함수들이 유용하고 명확합니다.

YearMonthLocalDate에 대한 확장 함수 및 속성들이 캘린더 내비게이션과 날짜 계산을 간결하게 지원합니다.

app/src/main/java/com/cherrish/android/presentation/calendar/component/BasicCalendar.kt (2)

32-42: remember를 올바르게 사용하여 불필요한 리컴포지션을 방지하고 있습니다.

yearMonth, displayMode, firstDayOfWeek 변경 시에만 데이터를 재계산하도록 적절한 키를 지정했습니다. Compose 최적화 모범 사례를 따르고 있습니다.


60-87: 캘린더 그리드 레이아웃이 잘 구현되었습니다.

weight(1f)aspectRatio(1f)를 사용하여 정사각형 셀을 구현하고, dayContent 람다를 통해 유연한 컨텐츠 주입을 지원합니다. 컴포저블 구조가 명확합니다.

app/src/main/java/com/cherrish/android/presentation/calendar/util/DownTimeColors.kt (1)

7-34: LGTM!

when 표현식이 모든 DownTimeStatus 값을 exhaustive하게 처리하고 있어 향후 새로운 상태 추가 시 컴파일 에러로 누락을 방지합니다. 순수 함수로 잘 설계되었습니다.

선택적으로 DownTimeColors 데이터 클래스에 @Immutable 어노테이션을 추가하면 Compose 최적화에 도움이 될 수 있습니다.

app/src/main/java/com/cherrish/android/presentation/calendar/model/CalendarDay.kt (1)

6-27: LGTM!

@Immutable 어노테이션이 모든 sealed interface와 data class에 적절히 적용되어 Compose recomposition 최적화가 잘 되어 있습니다. Empty, Normal, Downtime 변형을 통한 sealed hierarchy 설계가 깔끔합니다.

app/src/main/java/com/cherrish/android/presentation/calendar/component/CherrishCalendar.kt (2)

23-53: LGTM!

캘린더 컴포넌트가 잘 구성되어 있습니다:

  • CalendarMonthHeader, BasicCalendar, DayItem을 깔끔하게 조합
  • yearMonth.previousMonth/nextMonth 확장 함수를 활용한 월 네비게이션
  • day is CalendarDay.Date && day.date == selectedDate 스마트 캐스트를 활용한 선택 로직

단방향 데이터 흐름 패턴(onDateClick, onMonthChange 콜백)이 잘 적용되었습니다.


55-103: Preview 함수들이 잘 작성되었습니다.

remembermutableStateOf를 사용하여 인터랙티브 프리뷰를 올바르게 구현했습니다. Normal 모드와 Downtime 모드 모두 테스트할 수 있어 개발 시 유용합니다.

app/src/main/java/com/cherrish/android/presentation/calendar/component/DayItem.kt (1)

101-104: remember를 활용한 색상 계산 최적화가 우수합니다.

day.statuscherrishColors를 키로 사용하여 다운타임 색상 계산을 메모이제이션하고 있습니다. 이는 불필요한 recomposition을 방지하는 좋은 패턴입니다.

app/src/main/java/com/cherrish/android/presentation/calendar/util/MonthData.kt (1)

10-27: calendarMonth가 data class의 equals/hashCode/copy에서 제외됩니다.

MonthDatadata class로 선언되어 있지만, calendarMonth는 primary constructor 외부에서 계산되는 프로퍼티이므로 equals(), hashCode(), copy()에 포함되지 않습니다.

영향:

  • 동일한 month, inDays, displayMode를 가진 두 인스턴스는 동등하게 비교되지만, 실제로 다른 calendarMonth 값을 가질 수 있습니다 (구현상 불가능하지만 의미론적으로 일관성 부족).
  • copy()를 사용하면 calendarMonth가 재계산됩니다.

권장사항:

  • 의도된 설계라면 주석으로 명시
  • 또는 일반 class로 변경 고려

이것이 의도된 설계인지 확인해주세요. 만약 MonthData를 값 객체로 사용하지 않는다면 data class 대신 일반 class를 사용하는 것이 더 명확할 수 있습니다.

@nhyeonii nhyeonii marked this pull request as ready for review January 10, 2026 17:29
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: 0

🧹 Nitpick comments (2)
app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureUtil.kt (2)

15-33: recomposition 최적화 고려 제안

함수 로직은 올바르며 ACTIVE/INACTIVE 상태에 따라 명확한 색상 구분을 제공합니다.

이 함수는 Composable이 아니므로, 호출하는 Composable에서 remember를 사용하여 불필요한 재계산을 방지하는 것을 권장합니다. 예: remember(procedureType) { getProcedureColors(procedureType, colors) }

또는 함수를 @Stable로 표시하거나 ProcedureColors@Immutable로 표시하여 Compose 컴파일러가 최적화를 더 잘 수행하도록 할 수 있습니다.

♻️ 제안하는 개선사항

옵션 1: ProcedureColors를 @immutable로 표시

+import androidx.compose.runtime.Immutable
+
+@Immutable
 data class ProcedureColors(
     val background: Color,
     val border: Color,
     val text: Color,
     val divider: Color
 )

옵션 2: 호출자에서 remember 사용 (호출하는 Composable 함수 내에서)

@Composable
fun SomeComposable(procedureType: ProcedureType) {
    val colors = CherrishTheme.colors
    val procedureColors = remember(procedureType, colors) {
        getProcedureColors(procedureType, colors)
    }
    // procedureColors 사용
}

Based on learnings from Jetpack Compose best practices on recomposition optimization.


35-47: 로직 검증 및 최적화 고려

함수 로직이 정확합니다:

  • Normal 모드에서는 모든 시술이 ACTIVE
  • Downtime 모드에서는 선택된 시술만 ACTIVE

앞서 getProcedureColors와 마찬가지로, 이 함수를 Composable 내에서 호출할 때는 remember를 사용하여 불필요한 재계산을 방지하는 것이 좋습니다.

예시:

@Composable
fun SomeComposable(displayMode: CalendarDisplayMode, procedureId: Long) {
    val procedureType = remember(displayMode, procedureId) {
        getProcedureType(displayMode, procedureId)
    }
    // procedureType 사용
}
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ff7722e and 15a9e41.

📒 Files selected for processing (4)
  • app/src/main/java/com/cherrish/android/core/designsystem/theme/Color.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/DownTimeStatusIndicator.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureUtil.kt
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/DownTimeStatusIndicator.kt
🧰 Additional context used
📓 Path-based instructions (1)
**/*.kt

⚙️ CodeRabbit configuration file

**/*.kt: - Jetpack Compose 구조, 상태 관리, recomposition 최적화에 집중

  • ViewModel, UiState, 단방향 데이터 흐름 패턴 검토
  • 불필요한 recomposition 가능성, remember/derivedStateOf 적절한 사용 확인
  • 네이밍 컨벤션, 가독성, Google 권장 Android 아키텍처 준수 여부

Files:

  • app/src/main/java/com/cherrish/android/core/designsystem/theme/Color.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureUtil.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: PR Lint Check
  • GitHub Check: PR Build Check
🔇 Additional comments (5)
app/src/main/java/com/cherrish/android/core/designsystem/theme/Color.kt (4)

38-39: LGTM!

shadow 색상 정의가 적절합니다. .copy(alpha = 0.12f) 패턴을 사용하여 투명도를 적용하는 것은 Compose에서 권장되는 방식입니다.


96-99: LGTM!

defaultCherrishColors에 shadow 초기화가 올바르게 추가되었습니다. 다른 색상 속성들과 동일한 패턴을 따르고 있습니다.


214-218: LGTM!

Preview에 shadow 색상을 추가한 것은 좋은 관행입니다. 개발자가 새 색상을 시각적으로 확인할 수 있어 유용합니다.


66-69: shadow 필드 추가가 안전하게 처리됨

코드베이스 검토 결과, CherrishColors 데이터 클래스의 shadow 필드 추가는 안전하게 처리되었습니다. 유일한 직접 인스턴스화인 defaultCherrishColors에서 이름 있는 매개변수를 통해 shadow = shadow로 올바르게 포함되어 있으며, 다른 수동 인스턴스화는 없습니다. 모든 코드는 LocalCherrishColorsProvider를 통해 이 기본 인스턴스를 사용하므로 컴파일 오류는 발생하지 않습니다.

app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureUtil.kt (1)

8-13: LGTM!

시술 관련 색상을 그룹화하는 데이터 클래스가 적절합니다. 불변 속성을 사용하여 Compose의 상태 관리와 잘 맞습니다.

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.

수고하셨습니다 !! 짱짱 굿~ 👍😻 코멘트 확인 한번만 부탁드립니동~~

status: DownTimeStatus,
modifier: Modifier = Modifier
) {
val colors = getDowntimeColors(status, CherrishTheme.colors)
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.

P4: 여기는 따로 remember로 캐싱하지 않으신 이유가 있을까용?? 나현님 코드 패턴 상 remember가 자주 쓰였던 것 같아서요 !!

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.

우하하 마자요.. 넣어두겟습니다 ㅎㅎ

fun ProcedureInfoItem(
procedureName: String,
procedureDay: String,
downTimeDuration: Int?,
Copy link
Copy Markdown
Contributor

@usuuhyn usuuhyn Jan 11, 2026

Choose a reason for hiding this comment

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

P2: 여기는 Int?로 받는데 ProcedureInfoModel은 Int로 고정이네요 !! 통일하지 않아도 상관 없는걸까용?

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.

예리햇다 !! Model을 바꾸어주어야합니다 ㅎㅎㅎ 최고 최고 고마웡이 !~~~

Copy link
Copy Markdown
Contributor

@hyeminililo hyeminililo 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

@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.

수고하셨습니다!!

modifier: Modifier = Modifier,
procedureType: ProcedureType = ProcedureType.ACTIVE
) {
val colors = getProcedureColors(procedureType, CherrishTheme.colors)
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: 여기도 위에 수현이가 코멘트 남겨준 것처럼 remember 써주기?!

) {
Text(
text = procedureDay,
style = CherrishTheme.typography.body3M12,
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: 여기 날짜 폰트도 body3R12인 것 같아요! 확인 한 번 부탁드립니다!!
(틀렸으면 미리 죄송합니다..ㅎㅎ)


when (displayMode) {
is CalendarDisplayMode.Downtime -> DownTimeStatusIndicator()
is CalendarDisplayMode.Normal -> { }
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.

기디 추가사항이 바뀌어서 크게 리팩햇어요! 확인 부탁드립니동 ㅎㅎ

)
.clip(shape = RoundedCornerShape(10.dp))
.background(color = CherrishTheme.colors.gray0, shape = RoundedCornerShape(10.dp))
.padding(vertical = 18.dp, horizontal = 19.dp)
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: 노말일 때, + 아이콘 넣으면서 여기 top 패딩 한 번 체크해주셔야 될 것 같아요!
다운타임일 때는 18.dp인데 노말일떄는 여기 아이콘 헤더 기준으로 16.dp이여서요!

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.

기디 추가사항이 바뀌어서 크게 리팩햇어요! 확인 부탁드립니동 ㅎㅎ


Spacer(modifier = Modifier.height(16.dp))

Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
Copy link
Copy Markdown
Contributor

@sohee6989 sohee6989 Jan 12, 2026

Choose a reason for hiding this comment

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

p3: 여기 column 없애고 작성해도 되지 않나요??
verticalArrangement = Arrangement.spacedBy(8.dp) 이거 사용하시려고 column을 쓰신 것 같은데 나현님은 이 부분에서 성능보다는 컬럼간의 간격 코드를 제거하기 위해 성능depth를 하나더 가져가는 낫다고 보시나요??
의견이 궁금쓰합니다~!!

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.

칼럼 간의 간격 코드를 제거하는 것도 그렇고 맨 마지막 아이템과 카드 사이에는 8.dp의 패딩이 없어요. 그렇게 되면 if (!마지막 아이템) { 패딩 } 이런식으로 구현해야하는데 그렇게 되면 가독성도 떨어지고 여기에도 성능이 들어가는거라 각 아이템마다 조건 체크 → 실제로 더 많은 연산을 진행하게 됩니다!

Spacer(modifier = Modifier.height(16.dp))

Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
procedureInfo.forEach { procedure ->
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: 여기 key 값 활용해주기?!

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.

LazyColumn으로 바뀌엇다능 ㅎㅎㅎㅎㅎㅎ

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: 1

🤖 Fix all issues with AI agents
In
@app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt:
- Around line 52-58: The derived state in isLastItemVisible doesn't handle an
empty procedureInfo, so lastItemIndex becomes -1 and the comparison yields false
but still triggers the gradient; update the logic inside the derivedStateOf used
by isLastItemVisible to first check that procedureInfo.isNotEmpty() (or
lastItemIndex >= 0) and only then compute lastVisibleItem?.index ==
lastItemIndex, using listState/layoutInfo visibleItemsInfo as before; ensure the
final boolean is false for empty procedureInfo so the overlay won't show.
🧹 Nitpick comments (4)
app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt (4)

22-22: 사용되지 않는 import 제거 권장

setValue가 이 파일에서 사용되지 않습니다. 해당 import를 제거하는 것이 좋습니다.

♻️ 수정 제안
-import androidx.compose.runtime.setValue

107-122: 매직 넘버를 상수로 추출 권장

146.dp가 하드코딩되어 있어 의도를 파악하기 어렵습니다. 명명된 상수로 추출하거나 의미를 설명하는 주석을 추가하면 유지보수성이 향상됩니다.


140-144: 문자열 리소스 사용 권장

하드코딩된 문자열 "일정" 대신 strings.xml 리소스를 사용하면 다국어 지원(i18n) 및 유지보수가 용이해집니다.


149-154: 접근성을 위한 contentDescription 추가 권장

contentDescription = null은 스크린 리더 사용자에게 버튼의 기능을 전달하지 못합니다. "시술 추가" 등의 설명을 추가하면 접근성이 향상됩니다.

♻️ 수정 제안
                 Icon(
                     imageVector = ImageVector.vectorResource(id = R.drawable.ic_plus),
-                    contentDescription = null,
+                    contentDescription = "시술 추가", // strings.xml 리소스 사용 권장
                     tint = CherrishTheme.colors.gray600,
                     modifier = Modifier.noRippleClickable(onClick = onClick)
                 )
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6634694 and e7e848f.

📒 Files selected for processing (3)
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureInfoItem.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/model/ProcedureInfoModel.kt
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureInfoItem.kt
🧰 Additional context used
📓 Path-based instructions (1)
**/*.kt

⚙️ CodeRabbit configuration file

**/*.kt: - Jetpack Compose 구조, 상태 관리, recomposition 최적화에 집중

  • ViewModel, UiState, 단방향 데이터 흐름 패턴 검토
  • 불필요한 recomposition 가능성, remember/derivedStateOf 적절한 사용 확인
  • 네이밍 컨벤션, 가독성, Google 권장 Android 아키텍처 준수 여부

Files:

  • app/src/main/java/com/cherrish/android/presentation/calendar/model/ProcedureInfoModel.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt
🧬 Code graph analysis (1)
app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt (4)
app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureInfoItem.kt (1)
  • ProcedureInfoItem (29-69)
app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureUtil.kt (1)
  • getProcedureType (35-47)
app/src/main/java/com/cherrish/android/presentation/calendar/component/DownTimeStatusIndicator.kt (1)
  • DownTimeStatusIndicator (22-37)
app/src/main/java/com/cherrish/android/core/designsystem/theme/Theme.kt (1)
  • CherrishTheme (38-61)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: PR Build Check
  • GitHub Check: PR Lint Check
🔇 Additional comments (3)
app/src/main/java/com/cherrish/android/presentation/calendar/model/ProcedureInfoModel.kt (1)

5-11: LGTM!

@Immutable 어노테이션과 함께 모든 프로퍼티가 val로 선언되어 Compose의 안정성 계약을 올바르게 준수하고 있습니다. 불필요한 recomposition을 방지하는 좋은 구조입니다.

app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt (2)

42-104: 전반적인 Compose 구조가 우수합니다.

  • ImmutableList 사용으로 리스트 안정성 확보
  • rememberLazyListStatederivedStateOf의 적절한 조합
  • key = { it.procedureId }를 통한 안정적인 아이템 키 사용
  • Recomposition 최적화를 위한 구조가 잘 적용되어 있습니다.

160-299: Preview 함수 구현 적절합니다.

Normal 모드와 Downtime 모드 모두에 대한 Preview가 제공되어 있어 다양한 상황에서의 UI 확인이 가능합니다.

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/component/ProcedureScheduleCard.kt:
- Around line 174-179: The Icon inside ProcedureScheduleCard is clickable but
its contentDescription is null; update the Icon (the call to Icon with
ImageVector.vectorResource(id = R.drawable.ic_plus) and modifier =
Modifier.noRippleClickable(onClick = onClick)) to provide a meaningful
contentDescription (e.g., a localized string resource like "Add procedure" or
context-specific text) instead of null so screen readers announce its purpose;
use stringResource(...) to fetch the text and keep the description concise and
actionable.
- Around line 50-63: The isLastItemVisible remember block must include
procedureInfo as a key and guard against empty lists: change the remember for
isLastItemVisible to depend on procedureInfo (so it recomputes when the list
changes) and inside derivedStateOf return false immediately if procedureInfo is
empty (or compute lastItemIndex via procedureInfo.lastIndex and check
lastItemIndex >= 0) before comparing visibleItemsInfo.lastOrNull()?.index to the
last item index; this prevents stale size values and avoids treating -1 as a
valid index.
🧹 Nitpick comments (2)
app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt (2)

111-129: 빈 리스트일 때 그라데이션 오버레이가 잘못 표시될 수 있습니다.

procedureInfo가 비어있을 경우 visibleItemsInfo도 비어있어 isFirstItemVisibleisLastItemVisible 모두 false가 되어 불필요한 그라데이션이 표시됩니다. 빈 상태 처리 조건을 추가하는 것이 좋습니다.

♻️ 수정 제안
-        if (!isFirstItemVisible.value) {
+        if (procedureInfo.isNotEmpty() && !isFirstItemVisible.value) {
             Box(
                 // ...
             )
         }

-        if (!isLastItemVisible.value) {
+        if (procedureInfo.isNotEmpty() && !isLastItemVisible.value) {
             Box(
                 // ...
             )
         }

165-169: 하드코딩된 문자열을 string resource로 분리하는 것을 권장합니다.

"일정" 문자열이 직접 코드에 작성되어 있습니다. 유지보수성과 향후 다국어 지원을 위해 strings.xml에 정의하고 stringResource()를 사용하는 것이 좋습니다.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e7e848f and ac943c2.

📒 Files selected for processing (1)
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt
🧰 Additional context used
📓 Path-based instructions (1)
**/*.kt

⚙️ CodeRabbit configuration file

**/*.kt: - Jetpack Compose 구조, 상태 관리, recomposition 최적화에 집중

  • ViewModel, UiState, 단방향 데이터 흐름 패턴 검토
  • 불필요한 recomposition 가능성, remember/derivedStateOf 적절한 사용 확인
  • 네이밍 컨벤션, 가독성, Google 권장 Android 아키텍처 준수 여부

Files:

  • app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt
🧬 Code graph analysis (1)
app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt (4)
app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureInfoItem.kt (1)
  • ProcedureInfoItem (29-69)
app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureUtil.kt (1)
  • getProcedureType (35-47)
app/src/main/java/com/cherrish/android/presentation/calendar/component/DownTimeStatusIndicator.kt (1)
  • DownTimeStatusIndicator (22-37)
app/src/main/java/com/cherrish/android/core/designsystem/theme/Theme.kt (1)
  • CherrishTheme (38-61)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: PR Build Check
  • GitHub Check: PR Lint Check
🔇 Additional comments (1)
app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt (1)

92-108: LazyColumn 구현이 적절합니다.

ImmutableList 사용과 key = { it.procedureId } 지정으로 리스트 안정성과 recomposition 최적화가 잘 적용되었습니다.

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.

수고하셨습니다!!
저 ProcedureScheduleCard 부분 블러 처리 너무 수고하신 것 같네요~!!
색상값들이 다른게 있어서 확인 부탁드립니다~~!!

)
ProcedureType.INACTIVE -> ProcedureColors(
background = colors.gray100,
border = colors.gray400,
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: inactive일 때 border가 없어요!
확인 부탁드립니다!

background = colors.gray100,
border = colors.gray400,
text = colors.gray500,
divider = colors.gray500
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: divider 색상 gray400인 것 같아요!
확인 부탁드립니다!

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.

디쌤이 300이래요 ㅠㅠㅠ 반영해서 수정햇숩니다 ㅎㅎㅎㅎㅎ !!

ProcedureType.ACTIVE -> ProcedureColors(
background = colors.gray0,
border = colors.gray500,
text = colors.gray800,
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: gray900인 것 같습니다!
확인 부탁드립니다!

colors: CherrishColors
): ProcedureColors {
return when (procedureType) {
ProcedureType.ACTIVE -> ProcedureColors(
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: 여기 지금 ACTIVE일 때 시술명은 gray900, 날짜는 gray800이여서 이것도 분기 넣어줘야 될 것 같습니다!

Row(
modifier = modifier
.fillMaxWidth()
.height(40.dp),
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.

울거임 ㅜㅜ

@nhyeonii nhyeonii requested a review from sohee6989 January 12, 2026 14:50
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: 0

🧹 Nitpick comments (2)
app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureInfoItem.kt (1)

138-144: Preview 데이터 일관성 검토 필요.

ACTIVE_NO_DOWNTIME 타입에 downTimeDuration = 5가 설정되어 있습니다. getProcedureType 로직에 따르면 ACTIVE_NO_DOWNTIMEdownTimeDurationnull일 때만 반환됩니다. Preview가 실제 사용 사례와 일치하도록 수정하는 것이 좋습니다.

♻️ 제안하는 수정
            ProcedureInfoItem(
                procedureType = ProcedureType.ACTIVE_NO_DOWNTIME,
                procedureName = "레이저토닝",
                procedureDay = "1월 7일 수요일",
-               downTimeDuration = 5,
+               downTimeDuration = null,
                onClick = {}
            )
app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureUtil.kt (1)

47-66: Normal 모드에서 procedureId 파라미터가 미사용입니다.

Normal 모드 분기(52-57줄)에서 procedureId 파라미터가 사용되지 않고 있습니다. Downtime 모드(60줄)에서는 필요하지만, Normal 모드에서 불필요한 파라미터를 받는 것은 혼란을 줄 수 있습니다. 함수 시그니처를 정리하거나 의도를 주석으로 명시하는 것을 고려해 주세요.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ac943c2 and 2b15a41.

📒 Files selected for processing (4)
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureInfoItem.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/model/ProcedureType.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureUtil.kt
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/src/main/java/com/cherrish/android/presentation/calendar/model/ProcedureType.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureScheduleCard.kt
🧰 Additional context used
📓 Path-based instructions (1)
**/*.kt

⚙️ CodeRabbit configuration file

**/*.kt: - Jetpack Compose 구조, 상태 관리, recomposition 최적화에 집중

  • ViewModel, UiState, 단방향 데이터 흐름 패턴 검토
  • 불필요한 recomposition 가능성, remember/derivedStateOf 적절한 사용 확인
  • 네이밍 컨벤션, 가독성, Google 권장 Android 아키텍처 준수 여부

Files:

  • app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureInfoItem.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureUtil.kt
🧬 Code graph analysis (1)
app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureInfoItem.kt (2)
app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureUtil.kt (1)
  • getProcedureColors (18-45)
app/src/main/java/com/cherrish/android/core/designsystem/theme/Theme.kt (1)
  • CherrishTheme (38-61)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: PR Lint Check
  • GitHub Check: PR Build Check
🔇 Additional comments (5)
app/src/main/java/com/cherrish/android/presentation/calendar/util/ProcedureUtil.kt (2)

9-16: LGTM!

@Immutable 어노테이션이 적절하게 적용되어 Compose 안정성 추론에 도움이 됩니다. 데이터 클래스 구조도 깔끔합니다.


18-45: LGTM!

when 표현식이 모든 ProcedureType enum 케이스를 exhaustive하게 처리하고 있으며, 색상 매핑 로직이 명확합니다.

app/src/main/java/com/cherrish/android/presentation/calendar/component/ProcedureInfoItem.kt (3)

29-69: LGTM!

remember를 사용한 색상 캐싱이 적절하고, 컴포넌트 구조가 잘 분리되어 있습니다. procedureTypethemeColors를 key로 사용하여 불필요한 recomposition을 방지하고 있습니다.


71-96: LGTM!

IntrinsicSize.Max를 사용하여 VerticalDivider가 텍스트 높이에 맞게 조정되도록 처리한 부분이 좋습니다.


98-120: LGTM!

다운타임 표시 로직(downTimeDuration?.let { "다운타임 ${it}일" } ?: "-")이 null 처리를 적절하게 하고 있습니다.

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.

수고하셨습니다시마~ㅋㅋㅋㅋ

@hyeminililo
Copy link
Copy Markdown
Contributor

수고하셨습니다람쥐 ~~~~

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.

수고하셨습니다! 리미

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] 캘린더 뷰 컴포넌트 구현

4 participants