Skip to content

[Fix/#130] 루틴 수정 시 수정된 루틴 데이터를 fetch 하도록 수정합니다.#131

Merged
wjdrjs00 merged 1 commit intodevelopfrom
fix/#130-routine-edit
Oct 4, 2025
Merged

[Fix/#130] 루틴 수정 시 수정된 루틴 데이터를 fetch 하도록 수정합니다.#131
wjdrjs00 merged 1 commit intodevelopfrom
fix/#130-routine-edit

Conversation

@wjdrjs00
Copy link
Copy Markdown
Member

@wjdrjs00 wjdrjs00 commented Oct 3, 2025

[ PR Content ]

Related issue

Screenshot 📸

  • N/A

Work Description

  • 기존에 구현되있는 로직을 활용했습니다.
    • 루틴 수정 시 발생하는 이벤트를 수집하여 루틴 데이터를 다시 fetch 할 수 있도록 구현했습니다.

To Reviewers 📢

  • 궁금하거나, 질문이 있다면 남겨주세요~!

Summary by CodeRabbit

  • New Features
    • 루틴 작성/편집/삭제 등의 변경이 발생하면 루틴 목록이 자동으로 갱신됩니다. 수동 새로고침 없이 즉시 최신 상태를 확인할 수 있습니다.
    • 앱 실행 시 초기 로딩 후에도 변경 이벤트를 지속 감지해 리스트를 항상 최신으로 유지합니다. 연속 작업 시 반영 지연이 줄어듭니다.

@wjdrjs00 wjdrjs00 requested a review from l5x5l October 3, 2025 17:52
@wjdrjs00 wjdrjs00 self-assigned this Oct 3, 2025
@wjdrjs00 wjdrjs00 added 🐞 Fix 버그 수정 🧤 대현 labels Oct 3, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Oct 3, 2025

Walkthrough

RoutineListViewModel에 GetWriteRoutineEventFlowUseCase를 의존성 주입하고, 해당 플로우를 수집해 이벤트가 발생할 때마다 fetchRoutines()를 재호출하도록 observeRoutineChanges()를 추가했으며, 초기 fetch 이후 이를 구독하도록 초기화 로직을 수정했습니다.

Changes

Cohort / File(s) Summary
Routine list ViewModel
presentation/src/main/java/com/threegap/bitnagil/presentation/routinelist/RoutineListViewModel.kt
- 생성자에 GetWriteRoutineEventFlowUseCase 주입 추가
- observeRoutineChanges() 코루틴으로 이벤트 플로우 수집 후 fetchRoutines() 트리거
- 초기화 시 최초 fetchRoutines() 이후 관찰 시작
- 관련 import 및 프로퍼티 추가

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User as 사용자
  participant View as RoutineListViewModel
  participant UseCase as GetWriteRoutineEventFlowUseCase
  participant Repo as RoutineRepository

  Note over View: init 시
  View->>Repo: fetchRoutines()
  Repo-->>View: Routine 목록 반환

  Note over View,UseCase: 변경 이벤트 관찰 시작
  UseCase-->>View: WriteRoutine 이벤트 방출
  View->>Repo: fetchRoutines()
  Repo-->>View: 최신 Routine 목록 반환
  View-->>User: UI 상태 업데이트
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

토끼가 깡총, 루틴을 다시 불러와요
수정 바람 솔솔, 이벤트 따라가요
플로우 톡톡, 리스트가 반짝해요 ✨
오늘의 루틴, 최신으로 꽉 채워요
당근처럼 신선하게, 바로 지금! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning PR Content 섹션에 실제 변경사항 요약이 비어 있어 템플릿의 필수 섹션이 누락되었습니다. # [ PR Content ] 섹션에 변경된 로직과 연관된 이슈 개요를 간략히 작성하여 템플릿 요구사항을 충족해주세요.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed 제목이 루틴 수정 시 수정된 데이터를 fetch 하도록 수정했다는 핵심 변경사항을 구체적으로 요약하고 있어 적절합니다.
Linked Issues Check ✅ Passed RoutineListViewModel에 루틴 수정 이벤트 수집 및 fetchRoutines 호출 로직이 추가되어 이슈 #130의 핵심 구현 요구사항을 충족하고 있습니다.
Out of Scope Changes Check ✅ Passed 제공된 이슈 범위에 부합하는 RoutineListViewModel 변경 외에 다른 불필요한 코드 수정은 확인되지 않습니다.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/#130-routine-edit

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1765425 and 49ebab2.

📒 Files selected for processing (1)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/routinelist/RoutineListViewModel.kt (4 hunks)
⏰ 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
🔇 Additional comments (2)
presentation/src/main/java/com/threegap/bitnagil/presentation/routinelist/RoutineListViewModel.kt (2)

9-9: LGTM!

필요한 use case import가 올바르게 추가되었습니다.


28-28: LGTM!

의존성 주입이 올바르게 구성되었으며, 기존 패턴과 일관성을 유지하고 있습니다.

Copy link
Copy Markdown
Contributor

@l5x5l l5x5l left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!

@wjdrjs00 wjdrjs00 merged commit adde9b1 into develop Oct 4, 2025
2 checks passed
@wjdrjs00 wjdrjs00 deleted the fix/#130-routine-edit branch October 4, 2025 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 루틴 수정 시 수정된 루틴 데이터를 fetch 하도록 수정합니다.

2 participants