Skip to content

[FEAT/#117] 홈 네비 연결#124

Merged
sohee6989 merged 10 commits intodevelopfrom
feat/#117-home-navigation
Jan 21, 2026
Merged

[FEAT/#117] 홈 네비 연결#124
sohee6989 merged 10 commits intodevelopfrom
feat/#117-home-navigation

Conversation

@sohee6989
Copy link
Copy Markdown
Contributor

@sohee6989 sohee6989 commented Jan 21, 2026

Related issue 🛠

Work Description ✏️

  • 홈 네비 연결

Screenshot 📸

Uncompleted Tasks 😅

  • 챌린지 머지되면 그 부분만 연결시켜놓으면 됩니다.

To Reviewers 📢

Summary by CodeRabbit

  • 새로운 기능

    • 캘린더 로딩 시 로딩 화면 표시
    • 홈 화면에서 특정 날짜로 캘린더로 바로 이동 가능
  • 버그 수정

    • 중복 전송 방지 및 실패 처리 개선으로 미션 완료 처리 안정성 향상
  • 리팩터링

    • 사용되지 않는 더미 데이터 모듈 제거
    • 불필요한 상태 프로퍼티 정리

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

@sohee6989 sohee6989 requested a review from a team as a code owner January 21, 2026 11:26
@sohee6989 sohee6989 linked an issue Jan 21, 2026 that may be closed by this pull request
@sohee6989 sohee6989 self-assigned this Jan 21, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 21, 2026

Walkthrough

홈 화면에서 캘린더로의 네비게이션을 연결하고 캘린더 경로에 날짜 파라미터를 도입했습니다. 동시에 더 이상 사용되지 않는 Dummy 데이터 계층(DTO/서비스/데이터소스/레포지토리/모델)을 제거했습니다.

Changes

Cohort / File(s) 변경 요약
Dummy 데이터 계층 제거
app/src/main/java/com/cherrish/android/data/model/DummyModel.kt, app/src/main/java/com/cherrish/android/data/remote/dto/response/DummyResponseDto.kt, app/src/main/java/com/cherrish/android/data/remote/service/DummyService.kt, app/src/main/java/com/cherrish/android/data/remote/datasource/DummyDataSource.kt, app/src/main/java/com/cherrish/android/data/remote/datasourceimpl/DummyDataSourceImpl.kt, app/src/main/java/com/cherrish/android/data/repository/DummyRepository.kt, app/src/main/java/com/cherrish/android/data/repositoryimpl/DummyRepositoryImpl.kt
Dummy 모델/DTO/서비스/데이터소스/구현/레포지토리 전부 삭제 (관련 매퍼/호출 경로 제거). 검토 포인트: 의존성/DI 바인딩 및 삭제로 인한 미사용 참조 확인.
캘린더 라우트 매개변수화 및 네비게이션
app/src/main/java/com/cherrish/android/presentation/calendar/navigation/CalendarNavigator.kt, app/src/main/java/com/cherrish/android/presentation/main/MainTab.kt
Calendar를 data object → data class Calendar(val date: String)로 변경, CALENDAR 탭 라우트 초기화 시 현재 날짜 사용으로 변경. 검토 포인트: 라우트 문자열 파싱/호환성.
홈 화면 네비게이션 연동
app/src/main/java/com/cherrish/android/presentation/home/HomeScreen.kt, app/src/main/java/com/cherrish/android/presentation/home/HomeUiState.kt, app/src/main/java/com/cherrish/android/presentation/home/HomeViewModel.kt, app/src/main/java/com/cherrish/android/presentation/home/navigation/HomeNavigator.kt
HomeRoute에 navigateToCalendar: (LocalDate) -> Unit 파라미터 추가, HomeSideEffect.NavigateToCalendar 추가, 클릭 핸들러에서 사이드 이펙트 발행 및 homeNavGraph에 콜백 전달. 검토 포인트: 호출자(호스트)에서 콜백 제공 여부.
앱 네비게이션 통합 지점
app/src/main/java/com/cherrish/android/presentation/main/MainAppState.kt, app/src/main/java/com/cherrish/android/presentation/main/MainScreen.kt
navigateToCalendarSelected(date: LocalDate) 추가 및 homeNavGraph 호출에 해당 콜백 연결. 검토 포인트: NavController 확장 함수 연계 확인.
캘린더 초기화/로딩 처리 변경
app/src/main/java/com/cherrish/android/presentation/calendar/CalendarViewModel.kt, app/src/main/java/com/cherrish/android/presentation/calendar/CalendarScreen.kt
SavedStateHandle로 전달된 초기 날짜 읽어 로드, UiState.Loading일 때 LoadingScreen 렌더링 추가. 검토 포인트: SavedStateHandle 키/포맷 일치 여부 및 로딩 경로 확인.
챌린지 진행 상태·동작 보호
app/src/main/java/com/cherrish/android/presentation/challenge/missionprogress/ChallengeMissionProgressViewModel.kt, app/src/main/java/com/cherrish/android/presentation/challenge/missionprogress/ChallengeMissionProgressUiState.kt
onCompletedTodayClick에서 중복 요청 방지 플래그 추가·try/finally로 플래그 해제, hasCompletedAny 계산 속성 제거. 검토 포인트: 동시성 및 에러 처리 흐름 확인.

Sequence Diagram(s)

sequenceDiagram
    participant User as User
    participant HomeUI as HomeScreen(UI)
    participant HomeVM as HomeViewModel(Logics)
    participant MainState as MainAppState(NavState)
    participant Nav as NavController(System)
    participant Calendar as CalendarScreen(UI)

    User->>HomeUI: 예정된 계획 클릭 / 추가 버튼 클릭
    HomeUI->>HomeVM: onUpcomingPlanClick(date) / onAddPlanClick()
    HomeVM->>HomeVM: emit NavigateToCalendar(date)
    HomeUI->>MainState: navigateToCalendarSelected(date)
    MainState->>Nav: navigateToCalendar(date)
    Nav->>Calendar: open route Calendar(date)
    Calendar->>Calendar: read date from SavedStateHandle
    Calendar-->>User: render calendar with selected date
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Possibly related PRs

Suggested reviewers

  • nhyeonii
  • usuuhyn
  • hyeminililo
🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning PR은 주로 홈 네비게이션 연결에 집중되어 있으나, DummyModel 및 DummyRepository 제거, ChallengeMissionProgressUiState 속성 제거, ChallengeMissionProgressViewModel 동시성 제어 추가 등 네비게이션과 무관한 변경사항이 포함되어 있습니다. DummyModel/Repository 제거, ChallengeMissionProgressUiState 변경, ChallengeMissionProgressViewModel 수정 등의 변경사항을 별도의 PR로 분리하기를 권장합니다.
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 (3 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목 '[FEAT/#117] 홈 네비 연결'은 홈 화면 네비게이션 연결이라는 주요 변경사항을 명확하고 간결하게 설명하며, 변경 사항과 직접 관련이 있습니다.
Description check ✅ Passed PR 설명이 대부분 템플릿을 따르고 있으나, Work Description 섹션이 '홈 네비 연결'로만 기술되어 있어 구체적인 작업 내용이 부족하고 스크린샷도 누락되어 있습니다.
Linked Issues check ✅ Passed PR의 코드 변경사항이 issue #117의 '홈 화면 네비 연결' 목표를 충족하며, 홈 화면에서 캘린더 네비게이션 연결, 뷰모델 및 상태 관리 추가 등이 구현되었습니다.

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

@sohee6989 sohee6989 added FEAT✨ 새로운 기능 구현 소희🍒 소희 담당 labels Jan 21, 2026
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/navigation/CalendarNavigator.kt`:
- Around line 20-24: The navigateToCalendar helper allows a nullable date which
ends up routing the literal "null" string and can crash LocalDate.parse in
CalendarViewModel; change the function signature
NavController.navigateToCalendar to accept a non-null LocalDate with a default
of LocalDate.now() (i.e., remove the nullable type) and continue passing
Calendar(date = date.toString()), so callers always route a valid date string
and parsing in CalendarViewModel no longer receives "null".
🧹 Nitpick comments (3)
app/src/main/java/com/cherrish/android/presentation/calendar/CalendarViewModel.kt (1)

38-55: 라우트 날짜 파싱 방어 로직 제안

현재 LocalDate.parse(...)가 실패하면 즉시 크래시가 납니다. 딥링크/복원 시 잘못된 문자열이 들어올 가능성에 대비해 기본값으로 폴백하는 방어 로직을 권장합니다.

♻️ 제안 수정
-    private val dateArg: LocalDate =
-        LocalDate.parse(savedStateHandle.toRoute<Calendar>().date)
+    private val dateArg: LocalDate =
+        runCatching {
+            LocalDate.parse(savedStateHandle.toRoute<Calendar>().date)
+        }.getOrElse { LocalDate.now() }
app/src/main/java/com/cherrish/android/presentation/calendar/CalendarScreen.kt (1)

42-45: 로딩 화면에도 paddingValues 적용 필요

현재 로딩 상태는 Scaffold 인셋을 무시해 바 하단/상단과 겹칠 수 있습니다. paddingValues를 루트에 먼저 적용하도록 감싸 주세요. Based on learnings, 이 패턴을 유지하는 것이 일관된 인셋 처리를 보장합니다.

🛠️ 제안 수정
+import androidx.compose.foundation.layout.Box
@@
-        is UiState.Loading -> {
-            LoadingScreen()
-        }
+        is UiState.Loading -> {
+            Box(
+                modifier = Modifier
+                    .fillMaxSize()
+                    .padding(paddingValues)
+            ) {
+                LoadingScreen()
+            }
+        }
app/src/main/java/com/cherrish/android/presentation/main/MainTab.kt (1)

22-25: 캘린더 탭 날짜 생성 시점 검토(옵션)

enum 초기화 시점의 LocalDate.now()가 고정되므로, 앱이 장시간 살아있을 때도 “오늘”을 기대한다면 네비게이션 시점에 날짜를 생성하는 방식도 고려해 주세요.

Comment on lines +20 to +24
fun NavController.navigateToCalendar(
date: LocalDate? = LocalDate.now(),
navOptions: NavOptions? = null
) =
navigate(Calendar(date = date.toString()), navOptions)
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

date nullable 허용으로 인한 파싱 크래시 가능성

date가 null이면 "null" 문자열로 라우팅되고, CalendarViewModel에서 LocalDate.parse(...)가 실패할 수 있습니다(Line 38). API 레벨에서 null을 제거하는 쪽이 안전합니다.

🛠️ 제안 수정
-fun NavController.navigateToCalendar(
-    date: LocalDate? = LocalDate.now(),
-    navOptions: NavOptions? = null
-) =
-    navigate(Calendar(date = date.toString()), navOptions)
+fun NavController.navigateToCalendar(
+    date: LocalDate = LocalDate.now(),
+    navOptions: NavOptions? = null
+) =
+    navigate(Calendar(date = date.toString()), navOptions)
📝 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
fun NavController.navigateToCalendar(
date: LocalDate? = LocalDate.now(),
navOptions: NavOptions? = null
) =
navigate(Calendar(date = date.toString()), navOptions)
fun NavController.navigateToCalendar(
date: LocalDate = LocalDate.now(),
navOptions: NavOptions? = null
) =
navigate(Calendar(date = date.toString()), navOptions)
🤖 Prompt for AI Agents
In
`@app/src/main/java/com/cherrish/android/presentation/calendar/navigation/CalendarNavigator.kt`
around lines 20 - 24, The navigateToCalendar helper allows a nullable date which
ends up routing the literal "null" string and can crash LocalDate.parse in
CalendarViewModel; change the function signature
NavController.navigateToCalendar to accept a non-null LocalDate with a default
of LocalDate.now() (i.e., remove the nullable type) and continue passing
Calendar(date = date.toString()), so callers always route a valid date string
and parsing in CalendarViewModel no longer receives "null".

Copy link
Copy Markdown
Contributor

@nhyeonii nhyeonii left a comment

Choose a reason for hiding this comment

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

LGTM ~~ 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀

@sohee6989 sohee6989 merged commit 0c810f5 into develop Jan 21, 2026
3 checks passed
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] 홈 화면 네비 연결

2 participants