Skip to content

presentation 깊이를 2단계로 평탄화 — 116개 파일 중 57개가 3단계 이상, 최대 6단계 (#945 실행분) #1092

Closed

Description

@OnlyReadOneBook

#945 의 네 번째 항목. afternote 는 이미 기능별이라 이관 대상이 아니고, 반대 방향으로 불편해진 깊이를 되돌리는 작업이다.

실측 기준: efbb1256c (origin/develop, 2026-08-24), src/main 의 .kt 116개.

무엇이 문제인가

R2(깊이는 2단계까지)를 어기는 파일이 57개 — 전체의 49% 다. 최대 6단계까지 내려간다.

shared/body/infinite/content/list/item/    ← 6단계, 파일 2개

3단계 이상 디렉터리 (파일 수):

경로 파일
author/editor/processing 7
author/editor/memorial/playlist 7
author/editor/state 6
author/editor/memorial 5
shared/detail/song 4
author/editor/receiver · model · message 각 3
author/editor/{account,mapper} · author/detail/account · author/navigation/model · author/editor/{receiver,processing}/model · shared/body/infinite/content/list/item 각 2
author/editor/{selection,gallery} · shared/body/infinite{,/content,/content/list} 각 1

깊이가 깊어지면 기능별로 묶은 이점이 사라진다 — 파일 하나를 찾는 데 폴더를 네 번 열어야 하는 건 타입별 묶음에서 폴더 서넛을 오가는 것과 같은 비용이다.

방향 — author/ 를 걷어낸다

1단계가 author · shared · reporting 인데, author/ 는 중복 계층이다. 수신자 화면이 feature/receiver 로 분리된 지금(#945 코멘트 참고 — 8/23 이후 52개 파일이 그쪽으로 나갔다) 이 모듈에 작성자 흐름 말고 다른 게 없다. author/ 를 없애고 하위를 1단계로 올리면 그것만으로 한 단계가 빠진다.

author/editor/…      →  editor/…
author/detail/…      →  detail/…
author/home/…        →  home/…
author/navigation/…  →  navigation/…      (R5 — 모듈에 하나)

남는 문제는 editor/ 하위가 8개 폴더(processing · memorial · state · receiver · message · model · mapper · account · selection · gallery)로 커서, 올려도 2단계를 넘는 것들이 있다는 점이다. R2 대로 기능 폴더 안에 기능 폴더를 두지 않으려면 memorial/playlist 같은 건 1단계 형제로 올라와야 한다. 1단계 폴더 수가 늘어나는 것 자체는 규칙 위반이 아니다(receiver 가 이미 1단계 10개다).

shared/body/infinite/content/list/item 은 한 컴포넌트를 6단계로 감싼 것이라 shared/component/ 로 평탄화한다.

구체적 매핑은 착수 시점 코드로 다시 짠다 — 아래 이유로 지금 짜면 버려진다.

착수 조건 — #601 스택

이 모듈을 건드리는 열린 PR 이 19건이고, 그중 10건이 feat/601 스택(#821 · #822 · #823 · #824 · #826~#831)이다. 스택이 author/editor/ 를 대대적으로 바꾸는 중이라 지금 파일을 옮기면 리베이스가 불가능해진다.

스택 자식 9건은 전부 APPROVED + MERGEABLE/CLEAN 이고 밑단 #821 만 남았다(2026-08-25 기준 재리뷰 요청 완료 — 리뷰 지적 2건은 449aaf318 로 이미 반영돼 있었다). #601 을 blocked_by 로 건다.

스택 밖 나머지 9건(#1056 · #1050 · #972 · #886 · #885 · #883 · #880 · #879 등)도 정리된 뒤에 들어간다.

규칙

이동 PR 규칙은 docs/convention/presentation-package-structure.md 를 따른다 — 이동 외 변경 금지(package·import 갱신만), 검증은 아래 출력이 비는 것으로 한다.

git diff -M origin/develop...HEAD -U0 \
  | grep -E '^[+-]' | grep -vE '^(\+\+\+|---)' \
  | grep -vE '^[+-](package |import )'

screenshotTest 19개 · test 5개 소스셋도 같은 패키지를 따라가야 한다.

Activity

  1. changed the title [-]refactor(afternote): presentation 깊이를 2단계로 평탄화 — 116개 파일 중 57개가 3단계 이상, 최대 6단계 (#945 실행분)[/-] [+]presentation 깊이를 2단계로 평탄화 — 116개 파일 중 57개가 3단계 이상, 최대 6단계 (#945 실행분)[/+] on Aug 28, 2026
  2. added
    refactor동작 변경 없이 코드 구조·책임·경계를 개선하는 작업
    area:afternote애프터노트 기능 영역
    and removed on Aug 28, 2026
  3. added
    pr-open이 이슈를 구현하는 PR 이 열려 있다 — base 가 기본 브랜치가 아니어도 드러낸다
    on Aug 30, 2026
  4. removed
    pr-open이 이슈를 구현하는 PR 이 열려 있다 — base 가 기본 브랜치가 아니어도 드러낸다
    on Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:afternote애프터노트 기능 영역refactor동작 변경 없이 코드 구조·책임·경계를 개선하는 작업

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions