Skip to content

[Feat] 하루요약(홈) 화면 UI 구현 #23#28

Open
ProtossManse wants to merge 3 commits intodevelopfrom
feat/home-ui-#23
Open

[Feat] 하루요약(홈) 화면 UI 구현 #23#28
ProtossManse wants to merge 3 commits intodevelopfrom
feat/home-ui-#23

Conversation

@ProtossManse
Copy link
Copy Markdown
Contributor

@ProtossManse ProtossManse commented Mar 25, 2026

🔗 관련 이슈

📙 작업 설명

  • 하루요약 UI를 구현하였습니다.
  • 기존에 사용하던 HomeUiState에 일부 프로퍼티를 추가했습니다.
  • 기존에 사용하던 HomeViewModel에 일부 메서드를 추가했습니다.

📸 스크린샷 또는 시연 영상 (선택)

기능 미리보기 기능 미리보기
기능 설명 image 기능 설명 image

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 날짜 네비게이션 바 추가
    • 건강 상태 표시 칩(양호, 관심, 주의, 미기록)
    • 특이사항 카드 및 반복되는 증상 카드 추가
    • 약물 복용 시간 선택 기능이 포함된 건강 상태 상세 카드
  • UI/UX 개선

    • 홈 화면 레이아웃 업데이트
    • 타이포그래피 스타일 추가

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 25, 2026

Walkthrough

홈 화면 리디자인 구현: 새로운 상태 칩, 날짜 바, 증상 카드, 비고 카드 및 상세 상태 항목 컴포넌트를 추가하고, 상태 타입 열거형과 타이포그래피를 정의하며, HomeViewModel과 상태 관리를 업데이트했습니다.

Changes

Cohort / File(s) Summary
Drawable Icons
composeApp/src/commonMain/composeResources/drawable/ic_arrow_small_right.xml, ic_heart_small.xml, ic_warning.xml
새로운 벡터 드로어블 리소스 3개 추가: 오른쪽 화살표(#313131 획), 하트 아이콘(#8A8A8A 채우기), 경고 표시 십자(#8A8A8A 획)
Domain Model
composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/domain/model/type/HomeStatusType.kt
새로운 열거형 추가: GOOD, ATTENTION, WARNING, UNRECORDED 상태 타입과 한글 제목 문자열
Home Screen Components
composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/DateBar.kt, HomeStatusChip.kt, HomeRemarksCard.kt, HomeSymptomsCard.kt, HomeStatusDetailCard.kt
새로운 UI 컴포넌트 5개 추가: 날짜 네비게이션 바, 상태 칩(색상 코딩), 비고 카드, 증상 카드, 세분화된 상태 상세 항목(약 복용 시간 선택 가능)
Screen & State Management
composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/screen/HomeScreen.kt, viewmodel/HomeUiState.kt, viewmodel/HomeViewModel.kt
HomeScreen 레이아웃 대폭 재설계, 상태 필드 5개 추가(totalStatus, selectedTime, mealStatus, medicineStatus, sleepStatus), selectTime() 메서드 추가
Layout & Typography Updates
composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/common/component/NameBar.kt, ui/theme/Type.kt
NameBar 패딩 증가(14dp→16dp), 스페이서 확대(4dp→12dp), 타이포그래피 2개 추가(SB_15, SB_12)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • alswlekk

Poem

🎨 홈 화면 새단장, 아이콘들이 춤을 춘다
💊 약 시간 선택하고, 상태를 칩으로 표현하고
📅 날짜는 바뀌고, 증상은 나타나고
✨ 디자인이 살아나는 마법, 리디자인의 완성!

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed PR은 #23 이슈의 UI 구현 작업을 완료했으며, 모든 필수 UI 컴포넌트와 화면 레이아웃이 구현되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 하루요약 화면 UI 구현이라는 범위 내에 있으며, 불필요한 변경사항은 없습니다.
Title check ✅ Passed PR 제목이 변경 사항의 핵심을 명확하게 반영하고 있습니다. 하루요약 화면 UI 구현이라는 주요 목표를 간결하게 표현했습니다.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/home-ui-#23

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: 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 문자열은 분리하는 게 좋아요.

HomeStatusTypetitle(표시 문자열)을 직접 들고 있어서 도메인 계층이 프레젠테이션에 결합됩니다. 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: 플레이스홀더 데이터 확인

HomeRemarksCardHomeSymptomsCard에 하드코딩된 데이터가 사용되고 있습니다. 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

📥 Commits

Reviewing files that changed from the base of the PR and between 8e5e799 and 54f4fe8.

⛔ Files ignored due to path filters (3)
  • composeApp/src/commonMain/composeResources/drawable/char_attention.png is excluded by !**/*.png
  • composeApp/src/commonMain/composeResources/drawable/char_good.png is excluded by !**/*.png
  • composeApp/src/commonMain/composeResources/drawable/char_warning.png is excluded by !**/*.png
📒 Files selected for processing (14)
  • composeApp/src/commonMain/composeResources/drawable/ic_arrow_small_right.xml
  • composeApp/src/commonMain/composeResources/drawable/ic_heart_small.xml
  • composeApp/src/commonMain/composeResources/drawable/ic_warning.xml
  • composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/domain/model/type/HomeStatusType.kt
  • composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/common/component/NameBar.kt
  • composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/DateBar.kt
  • composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeRemarksCard.kt
  • composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeStatusChip.kt
  • composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeStatusDetailCard.kt
  • composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/component/HomeSymptomsCard.kt
  • composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/screen/HomeScreen.kt
  • composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/viewmodel/HomeUiState.kt
  • composeApp/src/commonMain/kotlin/com/konkuk/medicarecall/ui/feature/home/viewmodel/HomeViewModel.kt
  • composeApp/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("") }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

todayStringday 변경 시 업데이트되지 않는 버그

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.

Suggested change
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,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 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.kt

Repository: 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.kt

Repository: 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.kt

Repository: 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.

Comment on lines +66 to +73
BoxWithConstraints(
modifier = modifier
.fillMaxWidth()
.background(
color = gray1,
shape = RoundedCornerShape(8.dp),
)
.padding(2.dp), // 내부 여백 (인디케이터가 꽉 차지 않게)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

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.

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

Comment on lines +49 to +50
Icon(imageVector = vectorResource(Res.drawable.ic_warning), contentDescription = "특이사항", tint = gray4)
Text("반복되는 증상", color = gray4, style = MediCareCallTheme.typography.R_14)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
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("반복되는 증상")의 의미가 일치하도록 고치세요.

Comment on lines +294 to +300
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))
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

UNRECORDED 상태 명시적 처리 필요

HomeStatusType에는 GOOD, ATTENTION, WARNING, UNRECORDED 4가지 값이 있습니다. 현재 else 분기에서 UNRECORDEDchar_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.

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

Comment on lines +381 to 395
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),
)
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

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.

Comment on lines +40 to +42
fun selectTime(time: MedicationTime) {
_homeUiState.update { it.copy(selectedTime = time) }
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

시간 탭 변경 로직이 선택값만 바꾸고 상세 상태는 갱신하지 않아요.

현재는 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 = ...).

Comment on lines +168 to +172
SB_15 = TextStyle(
fontFamily = semiBold,
fontSize = 15.sp,
lineHeight = 1.6.em,
),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

@ProtossManse ProtossManse changed the title [Feat] 하루요약(홈) 화면 UI 구현 [Feat] 하루요약(홈) 화면 UI 구현 #23 Mar 25, 2026
Copy link
Copy Markdown
Contributor

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 하루요약(홈화면) 리디자인 반영

2 participants