Skip to content

[Feature/#52] 홈 화면 추가된 API 연동#55

Merged
wjdrjs00 merged 13 commits intodevelopfrom
feature/#52-home-api
Jul 30, 2025
Merged

[Feature/#52] 홈 화면 추가된 API 연동#55
wjdrjs00 merged 13 commits intodevelopfrom
feature/#52-home-api

Conversation

@wjdrjs00
Copy link
Copy Markdown
Member

@wjdrjs00 wjdrjs00 commented Jul 29, 2025

[ PR Content ]

홈 화면에 추가된 API들을 연동했습니다.

Related issue

Screenshot 📸

Work Description

  • 반복루틴(단일 삭제) 삭제 API 연동
  • 유저닉네임 API 연동
  • 감정구슬 API 연동

To Reviewers 📢

  • 홈화면 존재하는 모든 API 연동 완료했습니다..!
  • 홈 화면 최초 진입 시 (루틴조회, 유저정보, 감정구슬) 이렇게 3가지 정보를 API요청하여 받아오고 있는데, 추후 병렬처리하는 방식으로 마이그레이션 진행예정에 있습니다.. (일단 베포먼저,,)
  • 현재 서버에는 유저닉네임 조회로만 나와 있지만, 추후 확장가능성을 고려해서 유저프로필이라고 네이밍을 했습니다요
  • 리뷰는 언제나 환영입니다요..!

Summary by CodeRabbit

  • 신규 기능

    • 홈 화면에서 사용자 프로필(닉네임)과 감정 구슬 정보를 표시합니다.
    • 사용자의 감정 구슬 정보를 날짜별로 조회할 수 있습니다.
    • 루틴을 날짜별로 삭제할 수 있는 기능이 추가되었습니다.
  • 개선 및 변경

    • 루틴 및 서브루틴 데이터 모델에 routineCompletionId 속성이 추가되어 관리가 용이해졌습니다.
    • 홈 헤더에 사용자 이름과 감정 구슬 타입이 동적으로 반영됩니다.
    • 루틴 삭제 시, UI가 즉시 반영되고 실패 시 복구됩니다.
  • 버그 수정

    • 없음
  • 기타

    • 미리보기(Preview) 컴포저블에 routineCompletionId 속성 반영
    • 내부 데이터 및 도메인 모델 구조 확장 및 정비

wjdrjs00 added 11 commits July 29, 2025 20:00
- RoutineByDayDeletion: 특정 날짜의 루틴 삭제 정보
- SubRoutineDeletionInfo: 하위 루틴 삭제 정보
- RoutineByDayDeletion DTO 및 Mapper 추가
- 루틴 당일 삭제를 위한 유스케이스 및 UI 로직 추가
- RoutineUiModel 및 SubRoutineUiModel에 삭제 정보 변환 메소드 추가
- 삭제 확인 다이얼로그에서 당일 삭제 기능 연동
- 사용자 프로필 정보 조회 API 연동
- 홈 화면에 사용자 닉네임 표시
- 관련 DataSource, Repository, UseCase, DTO, DI 모듈 추가
- 조회한 나의 감정에 따른 감정 구슬을 홈 화면에서 표시하는 기능 구현
@wjdrjs00 wjdrjs00 requested a review from l5x5l July 29, 2025 19:36
@wjdrjs00 wjdrjs00 self-assigned this Jul 29, 2025
@wjdrjs00 wjdrjs00 added ✨ Feature 새로운 기능 구현 🧤 대현 labels Jul 29, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jul 29, 2025

"""

Walkthrough

이번 변경은 홈 화면에 필요한 신규 API(회원 조회, 감정구슬, 반복 루틴 삭제) 연동을 중심으로, 도메인-데이터-프레젠테이션 계층 전반에 걸쳐 모델, 데이터소스, 레포지토리, 유스케이스, DI 모듈, 뷰모델, UI 상태 및 Intent, 매핑 함수, 서비스 인터페이스 등을 추가 및 확장하였습니다.

Changes

Cohort / File(s) Change Summary
User Profile 연동
data/src/main/java/com/threegap/bitnagil/data/user/datasource/UserDataSource.kt, .../data/user/datasourceImpl/UserDataSourceImpl.kt, .../data/user/model/response/UserProfileResponseDto.kt, .../data/user/repositoryImpl/UserRepositoryImpl.kt, .../data/user/service/UserService.kt, domain/src/main/java/com/threegap/bitnagil/domain/user/model/UserProfile.kt, .../domain/user/repository/UserRepository.kt, .../domain/user/usecase/FetchUserProfileUseCase.kt, app/src/main/java/com/threegap/bitnagil/di/data/DataSourceModule.kt, .../di/data/RepositoryModule.kt, .../di/data/ServiceModule.kt
UserProfile 관련 DTO, 도메인 모델, 데이터소스, 레포지토리, 유스케이스, DI 바인딩, 서비스 인터페이스 일괄 신규 생성 및 연동
감정구슬(Emotion) 연동
data/src/main/java/com/threegap/bitnagil/data/emotion/datasource/EmotionDataSource.kt, .../data/emotion/datasourceImpl/EmotionDataSourceImpl.kt, .../data/emotion/model/response/MyEmotionResponseDto.kt, .../data/emotion/repositoryImpl/EmotionRepositoryImpl.kt, .../data/emotion/service/EmotionService.kt, domain/src/main/java/com/threegap/bitnagil/domain/emotion/model/MyEmotion.kt, .../domain/emotion/repository/EmotionRepository.kt, .../domain/emotion/usecase/GetMyEmotionUseCase.kt
감정구슬 조회를 위한 DTO, 도메인 모델, 데이터소스, 레포지토리, 유스케이스, 서비스 인터페이스 신규 생성 및 연동
반복 루틴 삭제(일자별) 연동
data/src/main/java/com/threegap/bitnagil/data/routine/datasource/RoutineRemoteDataSource.kt, .../data/routine/datasourceImpl/RoutineRemoteDataSourceImpl.kt, .../data/routine/model/request/RoutineByDayDeletionRequestDto.kt, .../data/routine/model/request/SubRoutineDeletionInfoDto.kt, .../data/routine/model/response/RoutineDto.kt, .../data/routine/model/response/SubRoutineDto.kt, .../data/routine/mapper/RoutineMapper.kt, .../data/routine/repositoryImpl/RoutineRepositoryImpl.kt, .../data/routine/service/RoutineService.kt, domain/src/main/java/com/threegap/bitnagil/domain/routine/model/RoutineByDayDeletion.kt, .../domain/routine/model/SubRoutineDeletionInfo.kt, .../domain/routine/repository/RoutineRepository.kt, .../domain/routine/usecase/DeleteRoutineByDayUseCase.kt
루틴 일자별 삭제를 위한 DTO, 도메인 모델, 데이터소스, 레포지토리, 유스케이스, 서비스 인터페이스 일괄 신규 생성 및 연동, 매핑 함수 및 모델 필드 추가
루틴/서브루틴 모델 및 매핑 확장
domain/src/main/java/com/threegap/bitnagil/domain/routine/model/Routine.kt, .../domain/routine/model/SubRoutine.kt, data/src/main/java/com/threegap/bitnagil/data/routine/model/response/RoutineDto.kt, .../data/routine/model/response/SubRoutineDto.kt, .../data/routine/mapper/RoutineMapper.kt, presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/RoutineUiModel.kt, .../presentation/home/model/SubRoutineUiModel.kt
routineCompletionId 필드 추가, 매핑 함수 확장, UI 모델 및 삭제 변환 함수 추가
프레젠테이션 계층: 홈 화면 상태/Intent/컴포넌트/뷰모델
presentation/src/main/java/com/threegap/bitnagil/presentation/home/HomeScreen.kt, .../presentation/home/HomeViewModel.kt, .../presentation/home/model/EmotionBallType.kt, .../presentation/home/model/HomeIntent.kt, .../presentation/home/model/HomeState.kt, .../presentation/home/model/RoutineUiModel.kt, .../presentation/home/model/SubRoutineUiModel.kt, .../presentation/home/component/template/CollapsibleHomeHeader.kt
홈 화면에서 회원 닉네임, 감정구슬 표시 및 일자별 루틴 삭제 기능 연동, 관련 상태/Intent/컴포저블/뷰모델 확장 및 동작 추가
프리뷰/샘플 데이터 반영
presentation/src/main/java/com/threegap/bitnagil/presentation/home/component/block/RoutineItem.kt, .../component/block/SubRoutinesItem.kt, .../component/template/RoutineDetailsBottomSheet.kt, .../component/template/RoutineSection.kt
routineCompletionId 필드 추가 반영을 위한 프리뷰 데이터 수정
기타
core/network/src/main/java/com/threegap/bitnagil/network/model/AuthToken.kt
AuthToken에서 role 필드 제거

Sequence Diagram(s)

sequenceDiagram
    participant UI as HomeScreen
    participant VM as HomeViewModel
    participant UseCase1 as FetchUserProfileUseCase
    participant UseCase2 as GetMyEmotionUseCase
    participant UseCase3 as DeleteRoutineByDayUseCase
    participant Repo as Repository
    participant DS as DataSource
    participant Service as Service

    %% 사용자 진입 시
    UI->>VM: 화면 진입
    activate VM
    VM->>UseCase1: fetchUserProfile()
    VM->>UseCase2: getMyEmotion(currentDate)
    UseCase1->>Repo: fetchUserProfile()
    UseCase2->>Repo: getMyEmotionMarble(currentDate)
    Repo->>DS: fetchUserProfile() / getMyEmotionMarble()
    DS->>Service: API 호출
    Service-->>DS: 응답
    DS-->>Repo: Result 반환
    Repo-->>UseCase1: Result<UserProfile>
    Repo-->>UseCase2: Result<MyEmotion>
    UseCase1-->>VM: Result<UserProfile>
    UseCase2-->>VM: Result<MyEmotion>
    VM-->>UI: 상태 업데이트(닉네임/감정구슬)

    %% 루틴 삭제 시
    UI->>VM: onDeleteToday(routine)
    VM->>UseCase3: deleteRoutineByDay(routineByDayDeletion)
    UseCase3->>Repo: deleteRoutineByDay(routineByDayDeletion)
    Repo->>DS: deleteRoutineByDay(dto)
    DS->>Service: DELETE /api/v1/routines/day
    Service-->>DS: 응답
    DS-->>Repo: Result<Unit>
    Repo-->>UseCase3: Result<Unit>
    UseCase3-->>VM: Result<Unit>
    VM-->>UI: optimistic update → 실패 시 롤백
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Assessment against linked issues

Objective Addressed Explanation
삭제하기(반복 루틴) API 연동 (#52)
회원 조회 API 연동 (#52)
감정구슬 API 연동 (#52)

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
AuthToken에서 role 필드 제거 (core/network/src/main/java/com/threegap/bitnagil/network/model/AuthToken.kt) 본 PR의 목적(홈 화면 신규 API 연동)과 직접적 관련이 없는 인증 토큰 모델의 필드 제거입니다.

Suggested labels

세환

Poem

🐰
새벽 햇살 아래 홈이 바뀌었네,
닉네임, 감정구슬, 루틴이 새로이!
토끼는 깡총, API도 깡총,
삭제도 척척, 감정도 쏙쏙,
홈 화면에 봄바람이 솔솔~🌸
리뷰도 즐겁게, 오늘도 깡총!
"""

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 473f74d and b2b1a76.

📒 Files selected for processing (1)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/HomeViewModel.kt (9 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/HomeViewModel.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). (1)
  • GitHub Check: build
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/#52-home-api

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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

🧹 Nitpick comments (3)
data/src/main/java/com/threegap/bitnagil/data/routine/service/RoutineService.kt (1)

32-35: DELETE 요청에 body를 포함하는 구현이 올바르게 되어있습니다.

@HTTP 어노테이션과 hasBody = true 옵션을 사용하여 DELETE 요청에 body를 포함하는 것이 기술적으로 올바릅니다. @DELETE 어노테이션은 기본적으로 body를 지원하지 않기 때문입니다.

다만 REST API 관점에서 DELETE 요청에 body를 포함하는 것보다는 쿼리 파라미터나 URL 경로를 사용하는 것이 더 일반적입니다. 백엔드 API 설계 시 참고하시기 바랍니다.

domain/src/main/java/com/threegap/bitnagil/domain/routine/model/RoutineByDayDeletion.kt (1)

3-9: 도메인 모델이 깔끔하게 정의되었습니다.

필요한 속성들이 적절한 타입으로 정의되어 있고, nullable한 routineCompletionId도 비즈니스 로직에 맞게 설계되었습니다.

performedDateString 대신 LocalDate 타입으로 사용하는 것을 고려해보세요. 타입 안전성을 높이고 날짜 관련 연산을 더 안전하게 할 수 있습니다.

-    val performedDate: String,
+    val performedDate: LocalDate,
domain/src/main/java/com/threegap/bitnagil/domain/emotion/usecase/GetMyEmotionUseCase.kt (1)

7-12: 표준적인 유스케이스 구현입니다.

리포지토리로의 위임이 적절하고, Result 타입 사용으로 에러 처리가 잘 되어 있습니다.

날짜 형식 검증을 고려해보세요:

 suspend operator fun invoke(currentDate: String): Result<MyEmotion> =
+    if (currentDate.isBlank()) {
+        Result.failure(IllegalArgumentException("Date cannot be blank"))
+    } else {
         emotionRepository.getMyEmotionMarble(currentDate)
+    }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 373c39d and bb3ec6d.

📒 Files selected for processing (47)
  • app/src/main/java/com/threegap/bitnagil/di/data/DataSourceModule.kt (2 hunks)
  • app/src/main/java/com/threegap/bitnagil/di/data/RepositoryModule.kt (2 hunks)
  • app/src/main/java/com/threegap/bitnagil/di/data/ServiceModule.kt (2 hunks)
  • core/network/src/main/java/com/threegap/bitnagil/network/model/AuthToken.kt (0 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/emotion/datasource/EmotionDataSource.kt (1 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/emotion/datasourceImpl/EmotionDataSourceImpl.kt (2 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/emotion/model/response/MyEmotionResponseDto.kt (1 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/emotion/repositoryImpl/EmotionRepositoryImpl.kt (2 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/emotion/service/EmotionService.kt (2 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/routine/datasource/RoutineRemoteDataSource.kt (1 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/routine/datasourceImpl/RoutineRemoteDataSourceImpl.kt (2 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/routine/mapper/RoutineMapper.kt (2 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/routine/model/request/RoutineByDayDeletionRequestDto.kt (1 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/routine/model/request/SubRoutineDeletionInfoDto.kt (1 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/routine/model/response/RoutineDto.kt (1 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/routine/model/response/SubRoutineDto.kt (1 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/routine/repositoryImpl/RoutineRepositoryImpl.kt (2 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/routine/service/RoutineService.kt (2 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/user/datasource/UserDataSource.kt (1 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/user/datasourceImpl/UserDataSourceImpl.kt (1 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/user/model/response/UserProfileResponseDto.kt (1 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/user/repositoryImpl/UserRepositoryImpl.kt (1 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/user/service/UserService.kt (1 hunks)
  • domain/src/main/java/com/threegap/bitnagil/domain/emotion/model/MyEmotion.kt (1 hunks)
  • domain/src/main/java/com/threegap/bitnagil/domain/emotion/repository/EmotionRepository.kt (1 hunks)
  • domain/src/main/java/com/threegap/bitnagil/domain/emotion/usecase/GetMyEmotionUseCase.kt (1 hunks)
  • domain/src/main/java/com/threegap/bitnagil/domain/routine/model/Routine.kt (1 hunks)
  • domain/src/main/java/com/threegap/bitnagil/domain/routine/model/RoutineByDayDeletion.kt (1 hunks)
  • domain/src/main/java/com/threegap/bitnagil/domain/routine/model/SubRoutine.kt (1 hunks)
  • domain/src/main/java/com/threegap/bitnagil/domain/routine/model/SubRoutineDeletionInfo.kt (1 hunks)
  • domain/src/main/java/com/threegap/bitnagil/domain/routine/repository/RoutineRepository.kt (1 hunks)
  • domain/src/main/java/com/threegap/bitnagil/domain/routine/usecase/DeleteRoutineByDayUseCase.kt (1 hunks)
  • domain/src/main/java/com/threegap/bitnagil/domain/user/model/UserProfile.kt (1 hunks)
  • domain/src/main/java/com/threegap/bitnagil/domain/user/repository/UserRepository.kt (1 hunks)
  • domain/src/main/java/com/threegap/bitnagil/domain/user/usecase/FetchUserProfileUseCase.kt (1 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/HomeScreen.kt (2 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/HomeViewModel.kt (8 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/component/block/RoutineItem.kt (3 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/component/block/SubRoutinesItem.kt (3 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/component/template/CollapsibleHomeHeader.kt (3 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/component/template/RoutineDetailsBottomSheet.kt (4 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/component/template/RoutineSection.kt (4 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/EmotionBallType.kt (2 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/HomeIntent.kt (2 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/HomeState.kt (1 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/RoutineUiModel.kt (3 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/SubRoutineUiModel.kt (3 hunks)
💤 Files with no reviewable changes (1)
  • core/network/src/main/java/com/threegap/bitnagil/network/model/AuthToken.kt
🧰 Additional context used
🧠 Learnings (4)
presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/SubRoutineUiModel.kt (2)

Learnt from: l5x5l
PR: #41
File: presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/model/MyPageState.kt:6-14
Timestamp: 2025-07-23T13:31:46.809Z
Learning: In the Bitnagil Android project, MviState interface extends Parcelable, so any class implementing MviState automatically implements Parcelable. Therefore, @parcelize annotation works correctly without explicitly adding Parcelable implementation.

Learnt from: l5x5l
PR: #41
File: presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/model/MyPageState.kt:6-14
Timestamp: 2025-07-23T13:31:46.809Z
Learning: In the Bitnagil Android project, MviState interface extends Parcelable, so any class implementing MviState automatically implements Parcelable. Therefore, @parcelize annotation works correctly without explicitly adding Parcelable implementation.

presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/RoutineUiModel.kt (2)

Learnt from: l5x5l
PR: #41
File: presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/model/MyPageState.kt:6-14
Timestamp: 2025-07-23T13:31:46.809Z
Learning: In the Bitnagil Android project, MviState interface extends Parcelable, so any class implementing MviState automatically implements Parcelable. Therefore, @parcelize annotation works correctly without explicitly adding Parcelable implementation.

Learnt from: l5x5l
PR: #41
File: presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/model/MyPageState.kt:6-14
Timestamp: 2025-07-23T13:31:46.809Z
Learning: In the Bitnagil Android project, MviState interface extends Parcelable, so any class implementing MviState automatically implements Parcelable. Therefore, @parcelize annotation works correctly without explicitly adding Parcelable implementation.

presentation/src/main/java/com/threegap/bitnagil/presentation/home/HomeViewModel.kt (1)

Learnt from: l5x5l
PR: #41
File: presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/model/MyPageIntent.kt:6-6
Timestamp: 2025-07-23T13:32:26.263Z
Learning: In the Bitnagil Android project's MVI architecture, Intent classes like LoadMyPageSuccess are named to represent successful API response results that carry loaded data, not just user actions. This naming convention is used for future API integration where the intent will be triggered when my page data loading succeeds from the server.

presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/HomeIntent.kt (1)

Learnt from: l5x5l
PR: #41
File: presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/model/MyPageIntent.kt:6-6
Timestamp: 2025-07-23T13:32:26.263Z
Learning: In the Bitnagil Android project's MVI architecture, Intent classes like LoadMyPageSuccess are named to represent successful API response results that carry loaded data, not just user actions. This naming convention is used for future API integration where the intent will be triggered when my page data loading succeeds from the server.

🧬 Code Graph Analysis (4)
data/src/main/java/com/threegap/bitnagil/data/user/datasourceImpl/UserDataSourceImpl.kt (1)
data/src/main/java/com/threegap/bitnagil/data/common/SafeApiCall.kt (1)
  • safeApiCall (10-25)
data/src/main/java/com/threegap/bitnagil/data/routine/datasourceImpl/RoutineRemoteDataSourceImpl.kt (1)
data/src/main/java/com/threegap/bitnagil/data/common/SafeApiCall.kt (1)
  • safeUnitApiCall (27-35)
presentation/src/main/java/com/threegap/bitnagil/presentation/home/HomeViewModel.kt (6)
data/src/main/java/com/threegap/bitnagil/data/user/datasource/UserDataSource.kt (2)
  • fetchUserProfile (5-7)
  • fetchUserProfile (6-6)
data/src/main/java/com/threegap/bitnagil/data/user/datasourceImpl/UserDataSourceImpl.kt (1)
  • fetchUserProfile (12-15)
data/src/main/java/com/threegap/bitnagil/data/user/repositoryImpl/UserRepositoryImpl.kt (1)
  • fetchUserProfile (12-13)
data/src/main/java/com/threegap/bitnagil/data/user/service/UserService.kt (2)
  • fetchUserProfile (7-10)
  • fetchUserProfile (8-9)
domain/src/main/java/com/threegap/bitnagil/domain/user/repository/UserRepository.kt (2)
  • fetchUserProfile (5-7)
  • fetchUserProfile (6-6)
presentation/src/main/java/com/threegap/bitnagil/presentation/common/mviviewmodel/MviViewModel.kt (1)
  • sendIntent (30-37)
data/src/main/java/com/threegap/bitnagil/data/emotion/datasourceImpl/EmotionDataSourceImpl.kt (1)
data/src/main/java/com/threegap/bitnagil/data/common/SafeApiCall.kt (1)
  • safeApiCall (10-25)
🔇 Additional comments (66)
domain/src/main/java/com/threegap/bitnagil/domain/emotion/model/MyEmotion.kt (1)

3-7: 깔끔한 도메인 모델 설계입니다.

감정 구슬 데이터를 표현하는 간단하고 명확한 데이터 클래스입니다. 모든 프로퍼티가 nullable로 설정되어 API에서 데이터가 항상 제공되지 않을 수 있음을 적절히 반영하고 있습니다.

presentation/src/main/java/com/threegap/bitnagil/presentation/home/component/block/SubRoutinesItem.kt (1)

89-89: 프리뷰 데이터 업데이트가 적절합니다.

새로 추가된 routineCompletionId 프로퍼티를 프리뷰 데이터에 일관되게 반영하여 UI 컴포넌트 프리뷰가 최신 데이터 모델 구조를 정확히 보여줍니다.

Also applies to: 99-99, 109-109

domain/src/main/java/com/threegap/bitnagil/domain/routine/model/Routine.kt (1)

11-11: 루틴 완료 추적을 위한 적절한 프로퍼티 추가입니다.

routineCompletionId 프로퍼티가 논리적인 위치에 추가되었고, nullable 타입으로 설정되어 완료 ID가 항상 존재하지 않을 수 있는 상황을 적절히 처리합니다.

domain/src/main/java/com/threegap/bitnagil/domain/routine/model/SubRoutine.kt (1)

9-9: 일관된 도메인 모델 업데이트입니다.

SubRoutine 모델에 routineCompletionId 프로퍼티를 추가하여 Routine 모델과 일관성을 유지하고 있습니다. nullable 타입과 프로퍼티 위치가 적절합니다.

domain/src/main/java/com/threegap/bitnagil/domain/user/model/UserProfile.kt (1)

3-5: 간결하고 명확한 사용자 프로필 모델입니다.

필수 정보인 닉네임만을 포함한 단순하고 집중된 도메인 모델 설계가 좋습니다. non-nullable String 타입으로 닉네임이 항상 필요한 데이터임을 명확히 표현하고 있습니다.

presentation/src/main/java/com/threegap/bitnagil/presentation/home/component/template/RoutineDetailsBottomSheet.kt (1)

269-269: 프리뷰 컴포저블 업데이트가 올바릅니다.

새로 추가된 routineCompletionId 필드를 포함하도록 프리뷰 데이터가 적절히 업데이트되었습니다. 하드코딩된 값 1은 프리뷰 데이터로 적합합니다.

Also applies to: 277-277, 287-287, 297-297, 320-320

data/src/main/java/com/threegap/bitnagil/data/routine/model/response/SubRoutineDto.kt (1)

18-19: DTO 필드 추가가 적절합니다.

routineCompletionId 필드가 올바른 직렬화 어노테이션과 함께 추가되었으며, nullable 타입 사용이 적절합니다. 일별 루틴 삭제 기능을 지원하기 위한 변경사항이 잘 구현되었습니다.

data/src/main/java/com/threegap/bitnagil/data/routine/model/response/RoutineDto.kt (1)

22-23: DTO 필드 추가가 일관성 있게 구현되었습니다.

routineCompletionId 필드가 SubRoutineDto와 동일한 패턴으로 올바르게 추가되었습니다. 직렬화 어노테이션과 nullable 타입 사용이 적절합니다.

data/src/main/java/com/threegap/bitnagil/data/emotion/datasource/EmotionDataSource.kt (1)

4-4: 감정 데이터 조회 메서드가 적절히 추가되었습니다.

새로운 getMyEmotionMarble 메서드가 기존 인터페이스 패턴을 일관성 있게 따르고 있습니다. Result 래퍼를 사용한 에러 처리와 suspend 함수 사용이 적절합니다.

Also applies to: 10-10

presentation/src/main/java/com/threegap/bitnagil/presentation/home/HomeScreen.kt (2)

84-84: 일별 루틴 삭제 플로우가 올바르게 연결되었습니다.

새로운 deleteRoutineByDay 메서드를 호출하여 일별 루틴 삭제 기능이 적절히 구현되었습니다.


243-244: 동적 데이터 사용으로 UI가 개선되었습니다.

하드코딩된 사용자명 대신 uiState.userNickname을 사용하고, 감정 구슬 타입을 동적으로 표시하도록 변경된 것이 적절합니다. 새로운 API 연동과 잘 연결되어 있습니다.

presentation/src/main/java/com/threegap/bitnagil/presentation/home/component/template/RoutineSection.kt (1)

110-110: 미리보기 데이터 업데이트가 일관되게 적용되었습니다.

새로운 routineCompletionId 필드가 메인 루틴과 모든 서브 루틴에 일관되게 추가되었으며, 테스트용으로 적절한 값(1)이 사용되었습니다.

Also applies to: 119-119, 129-129, 139-139

app/src/main/java/com/threegap/bitnagil/di/data/RepositoryModule.kt (2)

7-7: 필요한 import 문이 올바르게 추가되었습니다.

UserRepository 인터페이스와 구현체 import가 적절히 추가되었습니다.

Also applies to: 13-13


45-47: UserRepository DI 바인딩이 올바르게 구성되었습니다.

기존 패턴을 따라 @BINDS@singleton 어노테이션이 적절히 사용되었으며, 사용자 프로필 기능을 위한 의존성 주입이 정상적으로 설정되었습니다.

presentation/src/main/java/com/threegap/bitnagil/presentation/home/component/block/RoutineItem.kt (1)

81-81: 미리보기 데이터가 일관되게 업데이트되었습니다.

routineCompletionId 필드가 모든 루틴 및 서브루틴 모델에 일관되게 추가되어 새로운 도메인 모델 구조와 일치합니다.

Also applies to: 89-89, 99-99, 109-109

domain/src/main/java/com/threegap/bitnagil/domain/emotion/repository/EmotionRepository.kt (2)

4-4: 필요한 도메인 모델 import가 추가되었습니다.

새로운 MyEmotion 도메인 모델 import가 적절히 추가되었습니다.


9-9: 감정 데이터 조회 메서드가 올바르게 정의되었습니다.

새로운 getMyEmotionMarble 메서드가 기존 인터페이스 패턴을 따라 일관되게 구현되었습니다. Result 래퍼를 사용한 에러 핸들링과 명확한 메서드 시그니처가 적절합니다.

domain/src/main/java/com/threegap/bitnagil/domain/routine/model/SubRoutineDeletionInfo.kt (1)

1-6: 서브루틴 삭제 정보 도메인 모델이 적절히 구성되었습니다.

데이터 클래스 구조가 명확하고, 필드의 nullable 설정이 합리적입니다. routineCompletionId는 nullable로, subRoutineId는 non-nullable로 설정되어 도메인 로직에 적합합니다.

domain/src/main/java/com/threegap/bitnagil/domain/routine/repository/RoutineRepository.kt (2)

3-3: 새로운 import가 올바르게 추가되었습니다.

RoutineByDayDeletion 모델에 대한 import가 적절히 추가되어 새로운 메서드에서 사용할 수 있습니다.


11-11: 인터페이스 메서드가 일관된 패턴을 따릅니다.

새로운 deleteRoutineByDay 메서드가 기존 메서드들과 동일한 패턴(suspend function, Result 반환 타입)을 따르고 있어 인터페이스의 일관성이 유지됩니다.

data/src/main/java/com/threegap/bitnagil/data/user/datasource/UserDataSource.kt (1)

1-7: 깔끔한 데이터소스 인터페이스 설계입니다.

인터페이스가 단일 책임 원칙을 따르고 있으며, suspend function과 Result 타입을 사용하여 프로젝트의 일관된 패턴을 유지하고 있습니다.

app/src/main/java/com/threegap/bitnagil/di/data/ServiceModule.kt (2)

7-7: UserService import가 올바르게 추가되었습니다.

새로운 서비스에 대한 import가 알파벳 순서에 맞게 적절히 배치되었습니다.


53-56: 일관된 DI 패턴을 따르는 서비스 제공자입니다.

새로운 provideUserService 메서드가 기존 서비스 제공자들과 동일한 패턴(@provides, @singleton, @Auth retrofit 사용)을 따르고 있어 의존성 주입 설정이 일관성 있게 유지됩니다.

domain/src/main/java/com/threegap/bitnagil/domain/user/repository/UserRepository.kt (1)

1-7: 도메인 계층의 깔끔한 레포지토리 인터페이스입니다.

레포지토리가 도메인 모델을 반환하여 계층 간 분리를 명확히 하고 있으며, suspend function과 Result 타입 사용으로 일관된 패턴을 유지하고 있습니다.

data/src/main/java/com/threegap/bitnagil/data/emotion/service/EmotionService.kt (2)

5-5: 필요한 import들이 올바르게 추가되었습니다.

새로운 API 메서드에 필요한 MyEmotionResponseDto@Query 어노테이션의 import가 적절히 추가되었습니다.

Also applies to: 11-11


22-25: RESTful 설계 원칙을 잘 따른 API 엔드포인트입니다.

getMyEmotionMarble 메서드가 적절한 HTTP GET 요청을 사용하고, 쿼리 파라미터로 날짜 필터링을 구현하여 RESTful API 설계 원칙을 잘 따르고 있습니다.

app/src/main/java/com/threegap/bitnagil/di/data/DataSourceModule.kt (1)

13-14: 사용자 데이터 소스 바인딩이 올바르게 추가되었습니다

새로운 UserDataSource 바인딩이 기존 패턴을 일관되게 따르고 있으며, 필요한 import 문도 적절히 추가되었습니다.

Also applies to: 51-53

data/src/main/java/com/threegap/bitnagil/data/emotion/datasourceImpl/EmotionDataSourceImpl.kt (2)

7-7: 필요한 import가 적절히 추가되었습니다

MyEmotionResponseDto import가 새로운 메서드를 지원하기 위해 올바르게 추가되었습니다.


28-31: 감정 구슬 조회 메서드가 올바르게 구현되었습니다

새로운 getMyEmotionMarble 메서드가 기존 패턴을 일관되게 따르며 safeApiCall을 적절히 사용하고 있습니다. 매개변수와 반환 타입도 적절합니다.

data/src/main/java/com/threegap/bitnagil/data/emotion/repositoryImpl/EmotionRepositoryImpl.kt (2)

4-4: 필요한 import 문이 적절히 추가되었습니다

새로운 기능을 위해 toDomain 확장 함수와 MyEmotion 도메인 모델 import가 올바르게 추가되었습니다.

Also applies to: 6-6


42-43: 리포지토리 메서드가 올바른 패턴으로 구현되었습니다

getMyEmotionMarble 메서드가 데이터 소스에 위임하고 toDomain() 확장 함수를 사용해 DTO를 도메인 모델로 매핑하는 올바른 리포지토리 패턴을 따르고 있습니다.

data/src/main/java/com/threegap/bitnagil/data/routine/datasourceImpl/RoutineRemoteDataSourceImpl.kt (2)

6-6: 필요한 import가 올바르게 추가되었습니다

새로운 삭제 기능을 위해 RoutineByDayDeletionRequestDto import가 적절히 추가되었습니다.


30-33: 일별 루틴 삭제 메서드가 올바르게 구현되었습니다

새로운 deleteRoutineByDay 메서드가 safeUnitApiCall을 적절히 사용하여 기존 패턴을 일관되게 따르고 있습니다. Unit 반환 타입에 대해 올바른 wrapper를 사용했습니다.

data/src/main/java/com/threegap/bitnagil/data/routine/mapper/RoutineMapper.kt (1)

32-32: 매핑 함수에 routineCompletionId 속성이 일관되게 추가되었습니다

RoutineDtoSubRoutineDtotoDomain() 매핑 함수 모두에 routineCompletionId 속성이 올바르게 추가되어, DTO와 도메인 모델 간의 일관성을 보장하고 있습니다.

Also applies to: 45-45

data/src/main/java/com/threegap/bitnagil/data/routine/datasource/RoutineRemoteDataSource.kt (2)

3-3: 새로운 DTO 임포트가 적절히 추가되었습니다.

RoutineByDayDeletionRequestDto 임포트가 새로 추가된 메서드에 필요한 의존성을 올바르게 제공합니다.


11-11: 일관된 인터페이스 설계가 잘 적용되었습니다.

새로운 deleteRoutineByDay 메서드가 기존 메서드들과 동일한 패턴(suspend 함수, Result<Unit> 반환 타입)을 따르고 있어 일관성 있는 인터페이스를 유지하고 있습니다.

presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/EmotionBallType.kt (1)

6-6: 도메인 모델 임포트가 적절히 추가되었습니다.

프레젠테이션 레이어에서 도메인 레이어의 Emotion 모델을 사용하는 것이 클린 아키텍처 원칙에 부합합니다.

domain/src/main/java/com/threegap/bitnagil/domain/user/usecase/FetchUserProfileUseCase.kt (1)

7-12: 유스케이스 구현이 클린 아키텍처 원칙을 잘 따르고 있습니다.

생성자 의존성 주입을 사용하고 있으며, operator fun invoke()를 통해 깔끔한 호출 인터페이스를 제공합니다. 레포지토리에 위임하는 단순한 구조로 단일 책임 원칙을 잘 지키고 있습니다.

data/src/main/java/com/threegap/bitnagil/data/user/service/UserService.kt (1)

7-10: Retrofit 서비스 인터페이스가 표준 패턴을 잘 따르고 있습니다.

BaseResponse 래퍼를 사용하여 프로젝트의 일관된 API 응답 처리 패턴을 유지하고 있습니다. 엔드포인트 경로(/api/v1/users/nickname)와 메서드명이 명확하게 의도를 표현하고 있습니다.

data/src/main/java/com/threegap/bitnagil/data/routine/repositoryImpl/RoutineRepositoryImpl.kt (2)

6-7: 새로운 의존성 임포트가 적절히 추가되었습니다.

toDto 매퍼 확장함수와 RoutineByDayDeletion 도메인 모델 임포트가 새로운 메서드 구현에 필요한 의존성을 올바르게 제공합니다.


26-27: 레포지토리 구현이 일관된 패턴을 따르고 있습니다.

새로운 deleteRoutineByDay 메서드가 기존 메서드들과 동일한 패턴을 따르고 있습니다 - 도메인 모델을 DTO로 변환한 후 원격 데이터 소스에 위임하는 구조가 클린 아키텍처 원칙에 부합합니다.

presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/HomeState.kt (1)

11-12: 새로운 상태 속성들이 깔끔하게 추가되었습니다.

userNicknamemyEmotion 속성이 적절한 기본값과 함께 추가되었습니다. nullable한 EmotionBallType은 초기 로딩 시 감정 데이터가 없을 수 있음을 고려한 좋은 설계입니다.

domain/src/main/java/com/threegap/bitnagil/domain/routine/usecase/DeleteRoutineByDayUseCase.kt (1)

7-12: 클린 아키텍처 원칙을 잘 따른 Use Case 구현입니다.

의존성 주입과 suspend operator 함수를 사용한 구현이 표준 패턴을 잘 따르고 있습니다. Repository로의 단순한 위임도 적절합니다.

data/src/main/java/com/threegap/bitnagil/data/user/model/response/UserProfileResponseDto.kt (1)

7-16: 표준적인 DTO 구현이 잘 되어있습니다.

@Serializable@SerialName 어노테이션을 사용한 JSON 매핑과 도메인 모델로의 변환 확장함수가 기존 코드베이스의 패턴을 잘 따르고 있습니다.

data/src/main/java/com/threegap/bitnagil/data/user/datasourceImpl/UserDataSourceImpl.kt (1)

9-16: 깔끔한 데이터 소스 구현입니다.

클린 아키텍처 패턴을 잘 따르고 있으며, safeApiCall을 사용하여 API 호출 안전성을 보장하고 있습니다. 의존성 주입과 인터페이스 구현이 적절하게 되어 있습니다.

presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/SubRoutineUiModel.kt (2)

15-15: nullable 속성 추가가 적절합니다.

routineCompletionId를 nullable Int로 추가한 것이 적절합니다. 루틴 완료 추적 및 삭제 기능을 위한 필수 필드입니다.


33-37: 도메인 변환 함수가 잘 구현되었습니다.

toSubRoutineDeletionInfo() 확장 함수가 명확하고 간결하게 구현되었습니다. 삭제 기능에 필요한 정보만 추출하여 도메인 모델로 변환하는 역할이 명확합니다.

data/src/main/java/com/threegap/bitnagil/data/user/repositoryImpl/UserRepositoryImpl.kt (1)

9-14: 리포지토리 구현이 깔끔합니다.

데이터 소스에서 도메인 모델로의 변환이 Result.map을 사용하여 함수형 스타일로 잘 구현되었습니다. 클린 아키텍처 패턴을 적절히 따르고 있습니다.

data/src/main/java/com/threegap/bitnagil/data/emotion/model/response/MyEmotionResponseDto.kt (1)

8-16: 직렬화 DTO가 적절하게 구현되었습니다.

@Serializable@SerialName 어노테이션 사용이 올바르고, nullable 속성들이 API 응답 특성을 잘 반영하고 있습니다.

presentation/src/main/java/com/threegap/bitnagil/presentation/home/component/template/CollapsibleHomeHeader.kt (1)

29-29: 감정 볼 타입 동적 연동이 깔끔하게 구현되었습니다.

하드코딩된 null 값을 제거하고 매개변수로 받아 동적으로 처리하도록 개선된 점이 좋습니다. nullable 타입으로 로딩 상태도 적절히 처리할 수 있습니다.

Also applies to: 36-36, 101-101, 154-154

data/src/main/java/com/threegap/bitnagil/data/routine/model/request/SubRoutineDeletionInfoDto.kt (2)

7-13: DTO 구조와 직렬화 설정이 적절합니다.

@Serializable 애노테이션과 @SerialName 매핑이 올바르게 설정되어 있고, routineCompletionId가 nullable로 처리된 것이 적절합니다.


15-19: 도메인 모델 변환 함수가 깔끔하게 구현되었습니다.

확장 함수를 사용한 매핑 방식이 코드 가독성과 유지보수성을 높입니다.

data/src/main/java/com/threegap/bitnagil/data/routine/model/request/RoutineByDayDeletionRequestDto.kt (2)

7-19: 일관된 DTO 구조와 명확한 프로퍼티 정의입니다.

다른 DTO와 동일한 패턴을 따르고 있으며, subRoutineInfosForDelete 리스트를 포함한 복합 구조도 적절하게 정의되었습니다.


21-28: 리스트 매핑이 포함된 변환 로직이 올바릅니다.

subRoutineInfosForDelete.map { it.toDto() }를 사용하여 중첩된 DTO 변환을 깔끔하게 처리했습니다.

presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/RoutineUiModel.kt (2)

6-6: 새로운 프로퍼티 추가와 매핑 로직이 일관되게 적용되었습니다.

routineCompletionId를 nullable로 추가하고 도메인 모델 매핑에서도 일관되게 처리한 점이 좋습니다.

Also applies to: 19-19, 33-33


38-45: 일별 루틴 삭제를 위한 변환 함수가 적절합니다.

performedDate 매개변수를 받아 도메인 모델로 변환하는 로직이 명확하며, 서브루틴 리스트 매핑도 올바르게 구현되었습니다.

presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/HomeIntent.kt (2)

8-9: 사용자 프로필과 감정 데이터 로딩 인텐트가 적절합니다.

기존 네이밍 패턴을 따르고 있으며, EmotionBallType?을 nullable로 처리한 것이 로딩 상태 처리에 적합합니다.


18-20: 일별 루틴 삭제를 위한 낙관적 업데이트 패턴이 일관됩니다.

기존의 DeleteRoutineOptimistically, ConfirmRoutineDeletion, RestoreRoutinesAfterDeleteFailure 패턴과 동일한 구조로 일별 삭제 기능을 구현하여 코드 일관성이 좋습니다.

presentation/src/main/java/com/threegap/bitnagil/presentation/home/HomeViewModel.kt (8)

6-6: 새로운 의존성 주입이 올바르게 구현되었습니다.

새로 추가된 use case들(GetMyEmotionUseCase, FetchUserProfileUseCase, DeleteRoutineByDayUseCase)이 적절히 주입되고 있으며, 도메인 계층과의 분리가 잘 이루어져 있습니다.

Also applies to: 13-13, 41-42, 45-45


71-74: Intent 네이밍이 프로젝트 규칙과 일치합니다.

Retrieved learning에 따르면 이 프로젝트의 MVI 아키텍처에서 LoadUserProfile과 같은 Intent 이름은 성공적인 API 응답 결과를 나타내는 규칙을 따르고 있어 적절합니다.


172-199: 새로운 루틴 삭제 로직이 잘 구현되어 있습니다.

DeleteRoutineByDayOptimistically와 관련 Intent들이 기존 패턴과 일관성 있게 구현되었습니다. 낙관적 업데이트와 실패 시 복구 패턴이 기존 DeleteRoutineOptimistically 로직과 동일한 구조를 따르고 있어 좋습니다.


228-242: 사용자 프로필 fetch 로직이 적절히 구현되었습니다.

에러 핸들링과 로딩 상태 관리가 기존 패턴과 일치하며, fold를 사용한 Result 처리도 올바릅니다. 로그 메시지도 한국어로 일관되게 작성되어 있습니다.


474-503: 루틴 일별 삭제 메서드가 잘 구현되었습니다.

deleteRoutineByDay 메서드는 다음과 같은 장점이 있습니다:

  • 낙관적 업데이트 패턴을 올바르게 따름
  • toRoutineByDayDeletion 확장 함수를 사용한 도메인 객체 변환
  • 기존 deleteRoutine 메서드와 일관된 에러 핸들링

263-278: 날짜 포맷 및 EmotionBallType 매핑 검토

  • getMyEmotionUseCase(currentDate.toString())로 넘기는 날짜 문자열이 GetMyEmotionUseCase 및 백엔드(API)가 기대하는 포맷(예: yyyy-MM-dd)과 일치하는지 확인해주세요.
  • EmotionBallType.fromDomainEmotion 구현을 검토해, null 반환 시 UI 로직이 안전하게 처리되는지도 함께 점검 부탁드립니다.

검토 위치:

  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/HomeViewModel.kt (getMyEmotion 메서드, 263–278행)
  • domain/src/main/java/com/threegap/bitnagil/domain/emotion/usecase/GetMyEmotionUseCase.kt
  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/EmotionBallType.kt

58-60: API 초기 호출 로직 검토 완료

HomeStateselectedDate 기본값은 LocalDate.now()로 설정되어 있어, 초기화 시 오늘 날짜로 동작합니다.
따라서

getMyEmotion(container.stateFlow.value.selectedDate)

호출도 의도대로 오늘 날짜 기반으로 실행되며 추가 수정은 불필요합니다.


15-15: 확인 완료: EmotionBallType 및 toRoutineByDayDeletion 구현 정상

  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/EmotionBallType.kt
    companion objectfun fromDomainEmotion(emotion: Emotion?): EmotionBallType? 구현 확인
  • presentation/src/main/java/com/threegap/bitnagil/presentation/home/model/RoutineUiModel.kt
    fun RoutineUiModel.toRoutineByDayDeletion(performedDate: String): RoutineByDayDeletion 구현 확인

위 두 요소가 모두 올바르게 정의되어 있어 추가 수정이 필요 없습니다.

wjdrjs00 added 2 commits July 30, 2025 04:50
- 루틴 삭제 시 해당 루틴의 상세정보를 보여주는 바텀시트가 올라와 있는 경우 내려가도록 상태 초기화
@wjdrjs00 wjdrjs00 merged commit da4e368 into develop Jul 30, 2025
2 checks passed
@wjdrjs00 wjdrjs00 deleted the feature/#52-home-api branch July 30, 2025 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 새로운 기능 구현 🧤 대현

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] 홈 화면 추가되는 API 연동

2 participants