Conversation
Walkthrough홈 화면 리디자인 구현: 새로운 상태 칩, 날짜 바, 증상 카드, 비고 카드 및 상세 상태 항목 컴포넌트를 추가하고, 상태 타입 열거형과 타이포그래피를 정의하며, HomeViewModel과 상태 관리를 업데이트했습니다. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 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📝 Generate docstrings
🧪 Generate unit tests (beta)
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: 8
🧹 Nitpick comments (7)
composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/viewmodel/HomeUiState.kt (1)
24-29: 레거시/신규 상태를 한 모델에 같이 두는 구조는 빨리 정리하는 게 좋아요.
// 위로는 OUTDATED상태로 두면 필드 간 불일치가 생기기 쉽습니다. 마이그레이션 완료 시점에 레거시 필드를 제거하거나, 임시 전용 모델로 분리해 두는 걸 추천해요.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/viewmodel/HomeUiState.kt` around lines 24 - 29, The current HomeUiState mixes legacy and new state fields (notably the commented "// 위로는 OUTDATED" area containing totalStatus, selectedTime, mealStatus, medicineStatus, sleepStatus), which risks inconsistencies; refactor by extracting the legacy fields into a separate data class (e.g., LegacyHomeState) or removing them once migration is complete, update all usages of HomeUiState to reference the new model (or map LegacyHomeState -> HomeUiState centrally during migration), and add a clear TODO/comment and a migration adapter function to keep a single canonical state model (search for HomeUiState, totalStatus, selectedTime, mealStatus, medicineStatus, sleepStatus to locate affected code).composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/domain/model/type/HomeStatusType.kt (1)
3-7: 도메인 enum에서 UI 문자열은 분리하는 게 좋아요.
HomeStatusType이title(표시 문자열)을 직접 들고 있어서 도메인 계층이 프레젠테이션에 결합됩니다. enum은 상태만 표현하고, 라벨 매핑은 UI 계층으로 옮기면 유지보수가 훨씬 편해져요.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/domain/model/type/HomeStatusType.kt` around lines 3 - 7, HomeStatusType currently embeds a UI string via the title property which couples domain to presentation; remove the title parameter from the enum (keep only GOOD, ATTENTION, WARNING, UNRECORDED) and move all label mapping into the presentation layer (for example create a UI-side mapper or extension like a when-based function such as HomeStatusType -> localized string or string resource lookup). Update any call sites that read HomeStatusType.title to use the new presentation mapper so domain stays independent of UI strings.composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeRemarksCard.kt (1)
47-47: 헤더 라벨 하드코딩은 컴포넌트 재사용성을 낮춰요.
"특이사항"을 고정 텍스트로 두기보다 파라미터/리소스 기반으로 분리해 두면 같은 카드 컴포넌트를 다른 컨텍스트에서도 재사용하기 쉬워집니다.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeRemarksCard.kt` at line 47, The fixed header label "특이사항" in HomeRemarksCard reduces reuse; change the composable (HomeRemarksCard) to accept a header parameter (e.g., headerText: String or `@StringRes` headerRes: Int) and use that value in the Text call instead of the hardcoded string, or read from string resources via stringResource(headerRes) so callers can supply different labels or localized text.composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeSymptomsCard.kt (1)
52-53: 연속된 Spacer 통합 가능두 개의 연속된
Spacer를 하나로 합칠 수 있습니다.♻️ 개선안
- Spacer(Modifier.height(15.dp)) - Spacer(Modifier.height(8.dp)) + Spacer(Modifier.height(23.dp))🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeSymptomsCard.kt` around lines 52 - 53, In HomeSymptomsCard (the composable defined in HomeSymptomsCard.kt) replace the two consecutive Spacer calls (Spacer(Modifier.height(15.dp)) and Spacer(Modifier.height(8.dp))) with a single Spacer whose height is the combined value (15.dp + 8.dp -> 23.dp) to remove redundant layout nodes and simplify the UI tree.composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/screen/HomeScreen.kt (1)
316-328: 플레이스홀더 데이터 확인
HomeRemarksCard와HomeSymptomsCard에 하드코딩된 데이터가 사용되고 있습니다. UI 구현 PR 스코프상 의도된 것으로 보이나, 추후homeUiState에서 실제 데이터를 바인딩해야 합니다.
HomeUiState에 특이사항/반복 증상 필드를 추가하고 데이터 바인딩하는 작업을 도와드릴까요?🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/screen/HomeScreen.kt` around lines 316 - 328, The UI currently uses hardcoded placeholder values in HomeRemarksCard and HomeSymptomsCard; replace these literals by binding real data from homeUiState (and add fields to HomeUiState if missing) so the cards render dynamic content. Locate usages of HomeRemarksCard and HomeSymptomsCard in HomeScreen.kt and change their remarkStatus/remarkTitle/remarkDescription and symptomsTitle/symptomsDescription props to read from homeUiState (e.g., homeUiState.remark.* and homeUiState.symptoms.*); if HomeUiState lacks the necessary fields (e.g., remarkStatus, remarkTitle, remarkDescription, symptomsTitle, symptomsDescription or a list of repeatSymptoms), extend the HomeUiState data class and ensure the ViewModel exposes/populates those fields before binding. Ensure modifiers remain the same and handle null/empty states with sensible defaults when binding.composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeStatusDetailCard.kt (1)
140-145: TODO: 케어콜 상태 동적 바인딩 필요현재 "완료" 텍스트가 하드코딩되어 있습니다. 실제 케어콜 상태 데이터와 연동이 필요해 보입니다.
이 부분을
homeUiState에서 상태를 받아 동적으로 표시하도록 구현하는 것을 도와드릴까요?🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeStatusDetailCard.kt` around lines 140 - 145, The hardcoded "완료" should be replaced with the real care-call status from the UI state: in HomeStatusDetailCard use the provided homeUiState (or the parameter representing the screen state) to read the care-call status field (e.g., homeUiState.careCallStatus or homeUiState.status) and display that value instead of the literal string; also map the status to the correct color (e.g., Positive/Negative/gray) if your domain uses an enum — implement a small mapping function or when-expression inside HomeStatusDetailCard to convert the status value to the display text and color and use those in the Text composable so the UI reflects runtime state.composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/DateBar.kt (1)
52-68: 아이콘 터치 영역 접근성 개선 권장아이콘만 있는 클릭 가능 요소는 최소 48dp의 터치 영역을 권장합니다. 현재 아이콘 크기만큼의 터치 영역은 사용자 경험에 영향을 줄 수 있습니다.
♻️ 터치 영역 확장 예시
Icon( imageVector = vectorResource(Res.drawable.ic_arrow_big_back), contentDescription = "하루 전으로", tint = MediCareCallTheme.colors.gray6, - modifier = Modifier.clickable(onClick = onBack), + modifier = Modifier + .size(48.dp) + .clickable(onClick = onBack) + .padding(12.dp), )🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/DateBar.kt` around lines 52 - 68, The Icon click targets for the back/forward controls in DateBar are too small; update the two Icon usages (the ones using Modifier.clickable with onBack and onNext) to ensure a minimum 48dp touch area by applying a size/sizeIn/requiredSize modifier (or Compose's minimum interactive component helper) before .clickable so the tappable area is at least 48.dp x 48.dp while keeping the visual icon size unchanged (e.g., wrap the Icon in a Box/Modifier with the min touch size or add .padding to expand the clickable area); keep the onBack/onNext handlers and tint logic identical.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/DateBar.kt`:
- Line 37: todayString in DateBar is remembered without depending on the day
parameter so it never updates when day changes; replace the current remember {
mutableStateOf(...) } usage with a state/computation that depends on day (e.g.,
use remember(day) or derivedStateOf keyed by day, or compute it directly without
mutableStateOf) so todayString recomputes whenever the day parameter changes.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeStatusChip.kt`:
- Line 23: HomeStatusChip receives a modifier parameter but it isn't applied to
the Box (the Box uses a fresh Modifier with background), so callers'
size/padding/clicks are ignored; update the Box in HomeStatusChip to use the
incoming modifier (e.g., pass modifier then apply background/other modifiers via
modifier.background(...).padding/... or modifier.then(...).background(...))
instead of creating a new Modifier, ensuring the passed modifier composes with
the chip’s background and layout modifiers.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeStatusDetailCard.kt`:
- Around line 66-73: The outer Box in HomeStatusDetailCard already receives and
applies the incoming modifier, but the inner BoxWithConstraints mistakenly
reuses the same `modifier`, causing the external modifier to be applied twice;
update the inner BoxWithConstraints to use a fresh `Modifier` (e.g., start with
Modifier.fillMaxWidth()...) instead of the `modifier` parameter so the external
modifier is only applied once and layout behaves correctly.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeSymptomsCard.kt`:
- Around line 49-50: Icon의 contentDescription이 "특이사항"으로 잘못 설정되어 스크린 리더와
레이블(Text("반복되는 증상"))이 불일치합니다; HomeSymptomsCard의 Icon(...) 호출에서
contentDescription 값을 카드 레이블과 동일한 "반복되는 증상"으로 수정하여
vectorResource(Res.drawable.ic_warning) 아이콘과 Text("반복되는 증상")의 의미가 일치하도록 고치세요.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/screen/HomeScreen.kt`:
- Around line 381-395: The CTA Box's clickable lambda is empty so the "~님께 전화걸기"
button does nothing; update the Box's clickable handler to invoke the provided
immediateCall callback (call immediateCall()) when tapped, using the existing
homeUiState.elderName context if needed for logging or analytics; locate the Box
with Modifier.clickable {} in HomeScreen.kt and replace the empty lambda with a
call to the immediateCall function so the button actually triggers the call
flow.
- Around line 294-300: The when branch for homeUiState.totalStatus currently
uses an else that maps UNRECORDED to char_good; update the when on
HomeStatusType (refer to homeUiState.totalStatus and the Res.drawable mappings)
to add an explicit case for HomeStatusType.UNRECORDED and map it to a dedicated
illustration drawable (e.g., Res.drawable.char_unrecorded), and if that drawable
does not exist add it to the resources and use that name instead of falling back
to else; keep else only as a safety fallback after adding the explicit
UNRECORDED case.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/viewmodel/HomeViewModel.kt`:
- Around line 40-42: selectTime currently only updates selectedTime on
_homeUiState without recalculating mealStatus, medicineStatus, and sleepStatus;
change selectTime to compute the statuses for the newly selected MedicationTime
and update them in the same _homeUiState.update call. Locate the selectTime
function and replace the single-field copy with logic that derives
mealStatus/medicineStatus/sleepStatus for the provided time (e.g., call or add a
helper like computeStatusesFor(time) or reuse existing state/logic that computes
those statuses) and include those values in the it.copy(... selectedTime = time,
mealStatus = ..., medicineStatus = ..., sleepStatus = ...).
In `@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/theme/Type.kt`:
- Around line 168-172: The SB_15 TextStyle token is defined with conflicting
lineHeight values (1.6.em and 1.5.em); update the SB_15 TextStyle definitions so
both use the same lineHeight value (pick one consistent value and apply it to
every occurrence of SB_15 in the file), e.g., change the TextStyle instances
that set lineHeight to 1.6.em or 1.5.em so they match across all SB_15
declarations.
---
Nitpick comments:
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/domain/model/type/HomeStatusType.kt`:
- Around line 3-7: HomeStatusType currently embeds a UI string via the title
property which couples domain to presentation; remove the title parameter from
the enum (keep only GOOD, ATTENTION, WARNING, UNRECORDED) and move all label
mapping into the presentation layer (for example create a UI-side mapper or
extension like a when-based function such as HomeStatusType -> localized string
or string resource lookup). Update any call sites that read HomeStatusType.title
to use the new presentation mapper so domain stays independent of UI strings.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/DateBar.kt`:
- Around line 52-68: The Icon click targets for the back/forward controls in
DateBar are too small; update the two Icon usages (the ones using
Modifier.clickable with onBack and onNext) to ensure a minimum 48dp touch area
by applying a size/sizeIn/requiredSize modifier (or Compose's minimum
interactive component helper) before .clickable so the tappable area is at least
48.dp x 48.dp while keeping the visual icon size unchanged (e.g., wrap the Icon
in a Box/Modifier with the min touch size or add .padding to expand the
clickable area); keep the onBack/onNext handlers and tint logic identical.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeRemarksCard.kt`:
- Line 47: The fixed header label "특이사항" in HomeRemarksCard reduces reuse;
change the composable (HomeRemarksCard) to accept a header parameter (e.g.,
headerText: String or `@StringRes` headerRes: Int) and use that value in the Text
call instead of the hardcoded string, or read from string resources via
stringResource(headerRes) so callers can supply different labels or localized
text.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeStatusDetailCard.kt`:
- Around line 140-145: The hardcoded "완료" should be replaced with the real
care-call status from the UI state: in HomeStatusDetailCard use the provided
homeUiState (or the parameter representing the screen state) to read the
care-call status field (e.g., homeUiState.careCallStatus or homeUiState.status)
and display that value instead of the literal string; also map the status to the
correct color (e.g., Positive/Negative/gray) if your domain uses an enum —
implement a small mapping function or when-expression inside
HomeStatusDetailCard to convert the status value to the display text and color
and use those in the Text composable so the UI reflects runtime state.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeSymptomsCard.kt`:
- Around line 52-53: In HomeSymptomsCard (the composable defined in
HomeSymptomsCard.kt) replace the two consecutive Spacer calls
(Spacer(Modifier.height(15.dp)) and Spacer(Modifier.height(8.dp))) with a single
Spacer whose height is the combined value (15.dp + 8.dp -> 23.dp) to remove
redundant layout nodes and simplify the UI tree.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/screen/HomeScreen.kt`:
- Around line 316-328: The UI currently uses hardcoded placeholder values in
HomeRemarksCard and HomeSymptomsCard; replace these literals by binding real
data from homeUiState (and add fields to HomeUiState if missing) so the cards
render dynamic content. Locate usages of HomeRemarksCard and HomeSymptomsCard in
HomeScreen.kt and change their remarkStatus/remarkTitle/remarkDescription and
symptomsTitle/symptomsDescription props to read from homeUiState (e.g.,
homeUiState.remark.* and homeUiState.symptoms.*); if HomeUiState lacks the
necessary fields (e.g., remarkStatus, remarkTitle, remarkDescription,
symptomsTitle, symptomsDescription or a list of repeatSymptoms), extend the
HomeUiState data class and ensure the ViewModel exposes/populates those fields
before binding. Ensure modifiers remain the same and handle null/empty states
with sensible defaults when binding.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/viewmodel/HomeUiState.kt`:
- Around line 24-29: The current HomeUiState mixes legacy and new state fields
(notably the commented "// 위로는 OUTDATED" area containing totalStatus,
selectedTime, mealStatus, medicineStatus, sleepStatus), which risks
inconsistencies; refactor by extracting the legacy fields into a separate data
class (e.g., LegacyHomeState) or removing them once migration is complete,
update all usages of HomeUiState to reference the new model (or map
LegacyHomeState -> HomeUiState centrally during migration), and add a clear
TODO/comment and a migration adapter function to keep a single canonical state
model (search for HomeUiState, totalStatus, selectedTime, mealStatus,
medicineStatus, sleepStatus to locate affected code).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: eb4bc2c5-6708-4086-8ee6-f89e71c0c098
⛔ Files ignored due to path filters (3)
composeApp/src/commonMain/composeResources/drawable/char_attention.pngis excluded by!**/*.pngcomposeApp/src/commonMain/composeResources/drawable/char_good.pngis excluded by!**/*.pngcomposeApp/src/commonMain/composeResources/drawable/char_warning.pngis excluded by!**/*.png
📒 Files selected for processing (14)
composeApp/src/commonMain/composeResources/drawable/ic_arrow_small_right.xmlcomposeApp/src/commonMain/composeResources/drawable/ic_heart_small.xmlcomposeApp/src/commonMain/composeResources/drawable/ic_warning.xmlcomposeApp/src/commonMain/kotlin/com/konkuk/medicarecall/domain/model/type/HomeStatusType.ktcomposeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/common/component/NameBar.ktcomposeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/DateBar.ktcomposeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeRemarksCard.ktcomposeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeStatusChip.ktcomposeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeStatusDetailCard.ktcomposeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeSymptomsCard.ktcomposeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/screen/HomeScreen.ktcomposeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/viewmodel/HomeUiState.ktcomposeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/viewmodel/HomeViewModel.ktcomposeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/theme/Type.kt
| onNext: () -> Unit = {}, | ||
| modifier: Modifier = Modifier, | ||
| ) { | ||
| val todayString by remember { if (day == LocalDate.now()) mutableStateOf("(오늘)") else mutableStateOf("") } |
There was a problem hiding this comment.
todayString이 day 변경 시 업데이트되지 않는 버그
remember { mutableStateOf(...) }는 초기 컴포지션 시 한 번만 계산됩니다. day 파라미터가 변경되어도 todayString 값이 재계산되지 않아 날짜 네비게이션 시 "(오늘)" 표시가 정상 동작하지 않습니다.
🐛 수정 제안
- val todayString by remember { if (day == LocalDate.now()) mutableStateOf("(오늘)") else mutableStateOf("") }
+ val todayString = remember(day) { if (day == LocalDate.now()) "(오늘)" else "" }📝 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.
| val todayString by remember { if (day == LocalDate.now()) mutableStateOf("(오늘)") else mutableStateOf("") } | |
| val todayString = remember(day) { if (day == LocalDate.now()) "(오늘)" else "" } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/DateBar.kt`
at line 37, todayString in DateBar is remembered without depending on the day
parameter so it never updates when day changes; replace the current remember {
mutableStateOf(...) } usage with a state/computation that depends on day (e.g.,
use remember(day) or derivedStateOf keyed by day, or compute it directly without
mutableStateOf) so todayString recomputes whenever the day parameter changes.
| @Composable | ||
| fun HomeStatusChip( | ||
| statusType: HomeStatusType, | ||
| modifier: Modifier = Modifier, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# HomeStatusChip에서 modifier가 실제 적용되는지 정적 확인
rg -nP --type=kt 'fun HomeStatusChip\(|Box\(Modifier\.background|Box\(modifier\.background' composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeStatusChip.kt
# 기대 결과:
# - 기존 코드: Box(Modifier.background...) 매치
# - 수정 후: Box(modifier.background...) 매치Repository: Medicare-Call/Medicare-Call-KMP
Length of output: 101
🏁 Script executed:
# 파일 크기 확인
wc -l composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeStatusChip.ktRepository: Medicare-Call/Medicare-Call-KMP
Length of output: 178
🏁 Script executed:
# 파일 전체 내용 읽기
cat -n composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeStatusChip.ktRepository: Medicare-Call/Medicare-Call-KMP
Length of output: 2206
🏁 Script executed:
# modifier 관련 라인 검색 (Kotlin 파일이므로 kotlin 타입이 아니라 키워드로 검색)
rg -n 'modifier|Box\(' composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeStatusChip.ktRepository: Medicare-Call/Medicare-Call-KMP
Length of output: 352
modifier 파라미터가 Box에 적용되지 않고 있습니다.
Line 23에서 modifier 파라미터를 받지만, Line 50에서 Box(Modifier.background(...))를 사용하고 있어서 호출부에서 전달한 modifier가 무시돼요. 이러면 크기, 패딩, 클릭 이벤트 등을 커스터마이징할 수 없어요.
🔧 제안 diff
- Box(Modifier.background(containerColor, RoundedCornerShape(20.dp))) {
+ Box(modifier.background(containerColor, RoundedCornerShape(20.dp))) {
Text(statusType.title, color = textColor, style = MediCareCallTheme.typography.SB_12, modifier = Modifier.padding(horizontal = 12.dp, vertical = 6.dp))
}Also applies to: 50-51
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeStatusChip.kt`
at line 23, HomeStatusChip receives a modifier parameter but it isn't applied to
the Box (the Box uses a fresh Modifier with background), so callers'
size/padding/clicks are ignored; update the Box in HomeStatusChip to use the
incoming modifier (e.g., pass modifier then apply background/other modifiers via
modifier.background(...).padding/... or modifier.then(...).background(...))
instead of creating a new Modifier, ensuring the passed modifier composes with
the chip’s background and layout modifiers.
| BoxWithConstraints( | ||
| modifier = modifier | ||
| .fillMaxWidth() | ||
| .background( | ||
| color = gray1, | ||
| shape = RoundedCornerShape(8.dp), | ||
| ) | ||
| .padding(2.dp), // 내부 여백 (인디케이터가 꽉 차지 않게) |
There was a problem hiding this comment.
modifier 파라미터 중복 적용 버그
Line 60에서 외부 Box에 이미 modifier를 적용했는데, Line 67에서 내부 BoxWithConstraints에도 동일한 modifier를 다시 적용하고 있습니다. 이로 인해 외부에서 전달된 수정자가 두 번 적용되어 예기치 않은 레이아웃 동작이 발생할 수 있습니다.
🐛 수정 제안
BoxWithConstraints(
- modifier = modifier
+ modifier = Modifier
.fillMaxWidth()
.background(
color = gray1,📝 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.
| BoxWithConstraints( | |
| modifier = modifier | |
| .fillMaxWidth() | |
| .background( | |
| color = gray1, | |
| shape = RoundedCornerShape(8.dp), | |
| ) | |
| .padding(2.dp), // 내부 여백 (인디케이터가 꽉 차지 않게) | |
| BoxWithConstraints( | |
| modifier = Modifier | |
| .fillMaxWidth() | |
| .background( | |
| color = gray1, | |
| shape = RoundedCornerShape(8.dp), | |
| ) | |
| .padding(2.dp), // 내부 여백 (인디케이터가 꽉 차지 않게) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeStatusDetailCard.kt`
around lines 66 - 73, The outer Box in HomeStatusDetailCard already receives and
applies the incoming modifier, but the inner BoxWithConstraints mistakenly
reuses the same `modifier`, causing the external modifier to be applied twice;
update the inner BoxWithConstraints to use a fresh `Modifier` (e.g., start with
Modifier.fillMaxWidth()...) instead of the `modifier` parameter so the external
modifier is only applied once and layout behaves correctly.
| Icon(imageVector = vectorResource(Res.drawable.ic_warning), contentDescription = "특이사항", tint = gray4) | ||
| Text("반복되는 증상", color = gray4, style = MediCareCallTheme.typography.R_14) |
There was a problem hiding this comment.
contentDescription 불일치
아이콘의 contentDescription이 "특이사항"으로 되어 있지만, 실제 카드 레이블은 "반복되는 증상"입니다. 스크린 리더 사용자에게 혼란을 줄 수 있습니다.
🔧 수정 제안
- Icon(imageVector = vectorResource(Res.drawable.ic_warning), contentDescription = "특이사항", tint = gray4)
+ Icon(imageVector = vectorResource(Res.drawable.ic_warning), contentDescription = "반복되는 증상", tint = gray4)📝 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.
| Icon(imageVector = vectorResource(Res.drawable.ic_warning), contentDescription = "특이사항", tint = gray4) | |
| Text("반복되는 증상", color = gray4, style = MediCareCallTheme.typography.R_14) | |
| Icon(imageVector = vectorResource(Res.drawable.ic_warning), contentDescription = "반복되는 증상", tint = gray4) | |
| Text("반복되는 증상", color = gray4, style = MediCareCallTheme.typography.R_14) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeSymptomsCard.kt`
around lines 49 - 50, Icon의 contentDescription이 "특이사항"으로 잘못 설정되어 스크린 리더와
레이블(Text("반복되는 증상"))이 불일치합니다; HomeSymptomsCard의 Icon(...) 호출에서
contentDescription 값을 카드 레이블과 동일한 "반복되는 증상"으로 수정하여
vectorResource(Res.drawable.ic_warning) 아이콘과 Text("반복되는 증상")의 의미가 일치하도록 고치세요.
| when (homeUiState.totalStatus) { | ||
| HomeStatusType.GOOD -> Res.drawable.char_good | ||
| HomeStatusType.ATTENTION -> Res.drawable.char_attention | ||
| HomeStatusType.WARNING -> Res.drawable.char_warning | ||
| else -> Res.drawable.char_good | ||
|
|
||
| Spacer(Modifier.height(20.dp)) | ||
| }, |
There was a problem hiding this comment.
UNRECORDED 상태 명시적 처리 필요
HomeStatusType에는 GOOD, ATTENTION, WARNING, UNRECORDED 4가지 값이 있습니다. 현재 else 분기에서 UNRECORDED가 char_good으로 매핑되는데, 미기록 상태에 적합한 별도의 일러스트가 필요할 수 있습니다.
💡 개선 제안
Image(
painter = painterResource(
when (homeUiState.totalStatus) {
HomeStatusType.GOOD -> Res.drawable.char_good
HomeStatusType.ATTENTION -> Res.drawable.char_attention
HomeStatusType.WARNING -> Res.drawable.char_warning
- else -> Res.drawable.char_good
-
+ HomeStatusType.UNRECORDED -> Res.drawable.char_good // TODO: 미기록 전용 일러스트 추가 고려
},
),📝 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 (homeUiState.totalStatus) { | |
| HomeStatusType.GOOD -> Res.drawable.char_good | |
| HomeStatusType.ATTENTION -> Res.drawable.char_attention | |
| HomeStatusType.WARNING -> Res.drawable.char_warning | |
| else -> Res.drawable.char_good | |
| Spacer(Modifier.height(20.dp)) | |
| }, | |
| when (homeUiState.totalStatus) { | |
| HomeStatusType.GOOD -> Res.drawable.char_good | |
| HomeStatusType.ATTENTION -> Res.drawable.char_attention | |
| HomeStatusType.WARNING -> Res.drawable.char_warning | |
| HomeStatusType.UNRECORDED -> Res.drawable.char_good // TODO: 미기록 전용 일러스트 추가 고려 | |
| }, |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/screen/HomeScreen.kt`
around lines 294 - 300, The when branch for homeUiState.totalStatus currently
uses an else that maps UNRECORDED to char_good; update the when on
HomeStatusType (refer to homeUiState.totalStatus and the Res.drawable mappings)
to add an explicit case for HomeStatusType.UNRECORDED and map it to a dedicated
illustration drawable (e.g., Res.drawable.char_unrecorded), and if that drawable
does not exist add it to the resources and use that name instead of falling back
to else; keep else only as a safety fallback after adding the explicit
UNRECORDED case.
| Box( | ||
| Modifier | ||
| .fillMaxWidth() | ||
| .padding(horizontal = 20.dp, vertical = 14.dp) | ||
| .heightIn(min = 50.dp) | ||
| .clip(RoundedCornerShape(14.dp)) | ||
| .background(main) | ||
| .clickable {}, | ||
| contentAlignment = Alignment.Center, | ||
| ) { | ||
| Row(verticalAlignment = Alignment.CenterVertically) { | ||
| Image( | ||
| painter = painterResource(Res.drawable.char_medi), | ||
| contentDescription = "요약 아이콘", | ||
| ) | ||
| Spacer(Modifier.width(8.dp)) | ||
| Text( | ||
| text = "한 줄 요약", | ||
| style = MediCareCallTheme.typography.B_20, | ||
| color = summaryTitleColor, | ||
| ) | ||
| } | ||
| Spacer(Modifier.height(30.dp)) | ||
| Text( | ||
| text = summaryText, | ||
| style = MediCareCallTheme.typography.R_16, | ||
| color = summaryBodyColor, | ||
| "${homeUiState.elderName}님께 전화걸기", color = White, style = MediCareCallTheme.typography.M_16, | ||
| modifier = Modifier.padding(vertical = 14.dp), | ||
| ) | ||
| } |
There was a problem hiding this comment.
CTA 버튼 클릭 핸들러 미구현
"~님께 전화걸기" 버튼의 clickable {} 람다가 비어있어 버튼이 동작하지 않습니다. immediateCall 파라미터가 이미 전달되고 있으니 연결이 필요해 보입니다.
🐛 수정 제안
Box(
Modifier
.fillMaxWidth()
.padding(horizontal = 20.dp, vertical = 14.dp)
.heightIn(min = 50.dp)
.clip(RoundedCornerShape(14.dp))
.background(main)
- .clickable {},
+ .clickable { immediateCall(homeUiState.elderName) },
contentAlignment = Alignment.Center,
) {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/screen/HomeScreen.kt`
around lines 381 - 395, The CTA Box's clickable lambda is empty so the "~님께
전화걸기" button does nothing; update the Box's clickable handler to invoke the
provided immediateCall callback (call immediateCall()) when tapped, using the
existing homeUiState.elderName context if needed for logging or analytics;
locate the Box with Modifier.clickable {} in HomeScreen.kt and replace the empty
lambda with a call to the immediateCall function so the button actually triggers
the call flow.
| fun selectTime(time: MedicationTime) { | ||
| _homeUiState.update { it.copy(selectedTime = time) } | ||
| } |
There was a problem hiding this comment.
시간 탭 변경 로직이 선택값만 바꾸고 상세 상태는 갱신하지 않아요.
현재는 selectedTime만 변경되고 mealStatus/medicineStatus/sleepStatus는 그대로라서, 탭(아침/점심/저녁) 전환 시 상태 표시가 바뀌지 않을 가능성이 큽니다. 탭 변경 시점에 해당 시간대 상태도 함께 계산/반영되도록 연결해 주세요.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/viewmodel/HomeViewModel.kt`
around lines 40 - 42, selectTime currently only updates selectedTime on
_homeUiState without recalculating mealStatus, medicineStatus, and sleepStatus;
change selectTime to compute the statuses for the newly selected MedicationTime
and update them in the same _homeUiState.update call. Locate the selectTime
function and replace the single-field copy with logic that derives
mealStatus/medicineStatus/sleepStatus for the provided time (e.g., call or add a
helper like computeStatusesFor(time) or reuse existing state/logic that computes
those statuses) and include those values in the it.copy(... selectedTime = time,
mealStatus = ..., medicineStatus = ..., sleepStatus = ...).
| SB_15 = TextStyle( | ||
| fontFamily = semiBold, | ||
| fontSize = 15.sp, | ||
| lineHeight = 1.6.em, | ||
| ), |
There was a problem hiding this comment.
SB_15 토큰의 lineHeight가 이중 정의에서 서로 달라요.
Line 168~172은 1.6.em, Line 218은 1.5.em이라서 동일 타이포 토큰이 컨텍스트에 따라 다르게 보일 수 있습니다. 한 값으로 통일해 주세요.
🔧 제안 diff
- SB_15 = TextStyle(
- fontFamily = semiBold,
- fontSize = 15.sp,
- lineHeight = 1.6.em,
- ),
+ SB_15 = TextStyle(
+ fontFamily = semiBold,
+ fontSize = 15.sp,
+ lineHeight = 1.5.em,
+ ),Also applies to: 218-218
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/theme/Type.kt`
around lines 168 - 172, The SB_15 TextStyle token is defined with conflicting
lineHeight values (1.6.em and 1.5.em); update the SB_15 TextStyle definitions so
both use the same lineHeight value (pick one consistent value and apply it to
every occurrence of SB_15 in the file), e.g., change the TextStyle instances
that set lineHeight to 1.6.em or 1.5.em so they match across all SB_15
declarations.
🔗 관련 이슈
📙 작업 설명
📸 스크린샷 또는 시연 영상 (선택)
Summary by CodeRabbit
릴리스 노트
새로운 기능
UI/UX 개선