Skip to content

presentation 을 기능별 묶음으로 이관 — 80개 파일, 타입별 8폴더 (#945 실행분) #1087

Open

Description

@OnlyReadOneBook

#945 의 feature/mindrecord/presentation 실행분이다. 80개 파일을 타입별 묶음에서 기능별 묶음으로 옮긴다.

실측 기준: 4e0a648e (origin/develop)

현재 최상위 폴더 — component/ · hometab/ · mapper/ · model/ · navigation/ · screen/ · util/ · viewmodel/

화면 하나를 고치려면 이 폴더들을 오가야 한다. 가장 큰 모듈인 feature/afternote/presentation(117개)과 feature/onboarding/presentation(27개)은 이미 기능별이라, 소수를 다수에 맞추는 게 아니라 그 반대다.

⚠️ 충돌면이 가장 크다 (4e0a648e 실측)

이 모듈의 presentation 을 건드리는 열린 PR 이 11건이다 — #904 #954 #958 #961 #966 #967 #992 #994 #1007 #1040 #1055.

파일 이동 PR 은 이 전부와 리네임 충돌을 일으킨다. 열린 PR 이 정리된 뒤에 단독으로 진행할 것. 지금 착수하면 11건이 전부 리베이스 불가 상태가 된다.

추가로 #924(Nav3 전환)의 파일럿 대상이 이 모듈이다. 같은 모듈을 동시에 건드리지 않도록 순서를 맞춰야 한다.

이 모듈만의 사정

타입별 폴더가 8개로 가장 잘게 쪼개져 있고, State 위치가 두 갈래다 — DiaryWriteUiState.kt 는 viewmodel/ 에, DailyDiary.kt 같은 다른 State 성 타입은 model/ 에 있다. 이관하면서 위 규칙(화면 상태는 기능 폴더, 공유 UI 모델만 shared/model)으로 통일한다.

목표 구조 (#945 정본)

feature/mindrecord/presentation/
  <기능1>/                  # Screen · ViewModel · UiState 를 한자리에
    component/              # 이 기능 전용 컴포넌트
  <기능2>/
  shared/                   # 2개 이상 기능이 쓰는 것만
  navigation/

지킬 것

  • 깊이는 2단계까지. 기능 폴더 안에 component/ 정도까지만 판다
  • 진짜 공용만 shared/ — 여러 화면이 쓰는 것을 전부 기능 폴더로 밀어넣으면 사본이 생긴다. feature/afternote/presentation/shared/ 가 참고 사례
  • State 위치 규칙 — 화면 상태(*UiState)는 기능 폴더 안, 여러 화면이 공유하는 UI 모델만 shared/model
  • 파일 이동 외 변경을 섞지 않는다. 리뷰 가능성을 지키기 위해서다. 이름 변경·로직 수정은 별건

완료 조건

  • 이 모듈의 component/ · viewmodel/ · screen/ 타입별 폴더가 사라지고 기능 폴더로 접힌다
  • :feature:mindrecord:presentation:compileDebugUnitTestKotlin · :app:compileDebugAndroidTestKotlin · :konsist:test · ktlintCheck 통과
  • 시각 변경 0 — 파일 이동만이므로 screenshotTest baseline 재생성이 필요 없다

참고

Activity

  1. changed the title [-]refactor(mindrecord): presentation 을 기능별 묶음으로 이관 — 80개 파일, 타입별 8폴더 (#945 실행분)[/-] [+]presentation 을 기능별 묶음으로 이관 — 80개 파일, 타입별 8폴더 (#945 실행분)[/+] on Aug 28, 2026
  2. added
    refactor
    area:mindrecord
    and removed on Aug 28, 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