Skip to content

refactor(mindrecord): 합본 UserRepository 대신 좁은 계약 UserReceiverRepository·MyProfileRepository 를 주입한다 (#1282 분리) #1741

Closed

Description

@OnlyReadOneBook

작업 유형

refactor — 동작 변경 없는 구조·책임·경계 개선

주 담당 모듈

mindrecord — 마음의 기록

개요

#1409 로 core:domain 에 좁은 계약 UserReceiverRepository(수신자)·MyProfileRepository(프로필)가 이미 있다. 그런데 이 모듈은 아직 합본 UserRepository 를 주입받아 수신자·프로필 멤버만 쓴다. 합본 계약을 없애려면(#1282 완료 기준 «소비자가 가장 좁은 계약을 주입») 소비자부터 좁은 계약으로 옮겨야 한다. 부모 #1282 의 이 모듈 몫을 담당자 이슈로 분리했다.

대상 파일(origin/develop 실측):

main 소스:

  • feature/mindrecord/presentation/src/main/kotlin/com/afternote/feature/mindrecord/presentation/viewmodel/DiaryWriteViewModel.kt
  • feature/mindrecord/presentation/src/main/kotlin/com/afternote/feature/mindrecord/presentation/viewmodel/WeeklyReportViewModel.kt

테스트(FakeUserRepository → 좁은 fixture 로 교체):

  • feature/mindrecord/presentation/src/test/kotlin/com/afternote/feature/mindrecord/presentation/viewmodel/DiaryWriteImageKeyTest.kt
  • feature/mindrecord/presentation/src/test/kotlin/com/afternote/feature/mindrecord/presentation/viewmodel/MindRecordRequestCountTest.kt
  • feature/mindrecord/presentation/src/test/kotlin/com/afternote/feature/mindrecord/presentation/viewmodel/ReceiverLoadFailureTest.kt
  • feature/mindrecord/presentation/src/test/kotlin/com/afternote/feature/mindrecord/presentation/viewmodel/WriteFailureReportingTest.kt

참고

Activity

  1. added
    refactor
    area:mindrecord
    on Sep 2, 2026
  2. added
    pr-open
    on Sep 4, 2026
  3. removed
    pr-open
    on Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:mindrecordrefactor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions