Skip to content

refactor(afternote): 작성자 화면 조립부를 기능 폴더로 옮긴다 (#1514) - #1528

Merged
OnlyReadOneBook merged 4 commits into
developfrom
refactor/1514-author-route-relocation
Aug 30, 2026
Merged

OnlyReadOneBook merged 4 commits into
developfrom
refactor/1514-author-route-relocation

Conversation

@OnlyReadOneBook

@OnlyReadOneBook OnlyReadOneBook commented Aug 29, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1514

한 모듈 안에서 작성자와 수신자가 서로 다른 규칙을 쓰고 있었다. 수신자는 Route·Screen·VM·UiState·매퍼가 기능 폴더에 모여 있는데, 작성자는 조립부만 author/navigation/ 에 따로 있어 상세 화면 하나를 고치려면 두 폴더를 오갔다.

이름도 내용과 달랐다 — author/navigation/ 의 9파일 중 NavGraphBuilder 확장을 가진 것은 2개뿐이고, 나머지 6개는 「NavGraph」라는 이름을 단 화면 조립부였다.

이동

현재 이동 후
AfternoteNavGraphDetail.kt author/detail/AfternoteDetailRoute.kt
AfternoteNavGraphHome.kt author/home/AfternoteHomeRoute.kt
AfternoteNavGraphEditor.kt author/editor/AfternoteEditorRoute.kt (+ 헬퍼 4종은 AfternoteEditorRouteHelpers.kt)
AfternoteNavGraphAddSong.kt author/editor/memorial/playlist/AddSongRoute.kt
AfternoteNavGraphSelectReceiver.kt author/editor/receiver/select/SelectReceiverRoute.kt
AfternoteNavGraphFingerprint.kt shared/fingerprint/FingerprintLoginRoute.kt

공용 컴포넌트 DetailLoadErrorContent·DesignPendingDetailContent 는 shared/detail/DetailStateContents.kt 로 올렸다 — 수신자 화면 2곳이 쓰는 자원이 작성자의 내비게이션 폴더에 얹혀 있었다.

author/navigation/ 에는 진짜 NavGraph 2개(AfternoteNavGraph·AfternoteNavGraphTheme)와 model/, AfternoteNavActions.kt 만 남는다. 이슈 작업 범위 3번 그대로다 — AfternoteNavActions 는 NavGraphBuilder 확장이 아니지만 내비 액션 홀더라 이 폴더가 제자리다.

함께 옮긴 것

스크린샷 골든. 골든은 패키지 경로에 저장되므로 두 screenshotTest 와 골든 디렉터리를 같이 옮겼다.

  • DeleteInProgressOverlayScreenshotTest → author/detail
  • DetailLoadErrorContentScreenshotTest → shared/detail (컴포넌트를 따라간다)

파일명은 그대로다. 이름의 해시(748aa731)는 렌더 설정 기반이라 모듈·패키지를 가로질러 반복된다(저장소 전체 골든 175건 중 142건이 같은 값) — 골든 재생성이 필요 없다. screenshot-baseline 라벨도 필요 없다.

MemorialVideoLauncherTest 는 launchMemorialVideo 를 따라 author/detail 로 옮겼다.

검증

  • :feature:afternote:presentation:compileDebugKotlin · compileDebugUnitTestKotlin · compileDebugScreenshotTestKotlin · :app:compileDebugKotlin · :app:compileDebugUnitTestKotlin → BUILD SUCCESSFUL
  • :feature:afternote:presentation:testDebugUnitTest → 177 tests / 0 failures
  • :feature:afternote:presentation:ktlintCheck → BUILD SUCCESSFUL (exit code 직접 확인 — 파이프로 삼키지 않았다)
  • 완료 조건 실측 — author/navigation/ 잔여 3파일 중 NavGraphBuilder 를 가진 것 2개 + 액션 홀더 1개 / 수신자 화면(receiver/detail/ReceivedAfternoteDetailRoute.kt)의 author.navigation import 0건

리뷰어에게

CI Test Plan

{
  "androidTest": {
    "mode": "selected",
    "reason": "author/navigation 아래 조립부 파일을 옮겨 규칙상 selected 가 필요하다. 이동으로 깨질 수 있는 것은 «어느 Route 가 어느 목적지에 붙는가» 이므로 목적지 라우팅을 실기기에서 확인하는 계측 테스트 4건을 고른다. androidTest 소스는 건드리지 않았다.",
    "tests": [
      {
        "path": "app/src/androidTest/java/com/afternote/afternote_fe/AppAndReceiverCompletionAndroidTest.kt",
        "selector": "com.afternote.afternote_fe.ReceiverRuntimeCompletionAndroidTest#homeActions_routeImplementedEntryPointsToExactDestinations",
        "device": "api30"
      },
      {
        "path": "app/src/androidTest/java/com/afternote/afternote_fe/AppAndReceiverCompletionAndroidTest.kt",
        "selector": "com.afternote.afternote_fe.ReceiverRuntimeCompletionAndroidTest#receivedGalleryDetail_routesGalleryContractInsteadOfSocialCredentials",
        "device": "api30"
      },
      {
        "path": "app/src/androidTest/java/com/afternote/afternote_fe/AppAndReceiverCompletionAndroidTest.kt",
        "selector": "com.afternote.afternote_fe.ReceiverRuntimeCompletionAndroidTest#receivedMemorialDetail_routesPlaylistContractAndForwardsExactId",
        "device": "api30"
      },
      {
        "path": "app/src/androidTest/java/com/afternote/afternote_fe/AppAndReceiverCompletionAndroidTest.kt",
        "selector": "com.afternote.afternote_fe.AppAndReceiverCompletionAndroidTest#welcomeCheckRecords_opensActualReceivedRecordsStartDestination",
        "device": "api30"
      }
    ]
  }
}

한 모듈 안에서 작성자와 수신자가 서로 다른 규칙을 쓰고 있었다. 수신자는 Route·Screen·VM·
UiState·매퍼가 기능 폴더에 모여 있는데, 작성자는 조립부만 author/navigation/ 에 따로 있어
상세 화면 하나를 고치려면 두 폴더를 오가야 했다.

이름도 내용과 달랐다. author/navigation/ 의 9파일 중 NavGraphBuilder 확장을 가진 것은
2개뿐이고 나머지 6개는 «NavGraph» 라는 이름을 단 화면 조립부였다. 수신자 쪽은 같은 역할을
…Route.kt 로 부른다.

여섯을 기능 폴더로 옮기고 …Route.kt 로 개명한다. author/navigation/ 에는 진짜 NavGraph
2개와 model/, AfternoteNavActions.kt 만 남는다.

공용 컴포넌트 DetailLoadErrorContent·DesignPendingDetailContent 는 shared/detail 로
올린다 — 수신자 화면 2곳이 쓰는 자원이 작성자의 내비게이션 폴더에 얹혀 있었다. 이제
수신자 화면이 author.navigation 을 import 하지 않는다.

에디터 헬퍼 4종은 AfternoteEditorRouteHelpers.kt 로 나눠 Route 파일에는 조립만 남긴다.

순수 이동·개명이라 동작 변경이 없다. 스크린샷 골든은 패키지 경로에 저장되므로 두
screenshotTest 와 함께 디렉터리를 옮겼다 — 파일명의 해시는 렌더 설정 기반이라(모듈을
가로질러 반복된다) 이름은 그대로이고 재생성이 필요 없다.
@github-actions github-actions Bot added the android-test PR head에서 Android Managed Device 계측 테스트 실행 label Aug 29, 2026
@github-actions github-actions Bot added the conflict base 와 충돌 — CI 가 트리거되지 않는다. base 를 병합하면 자동으로 떨어진다 label Aug 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

이 PR 은 develop 와 충돌 상태이고, 그래서 CI 가 돌지 않는다.

pull_request 워크플로는 base 와 head 를 합친 가상 머지 커밋(refs/pull/<N>/merge)에서
실행되는데, 충돌이면 GitHub 이 그 ref 를 만들지 못해 워크플로가 트리거조차 되지 않는다.
체크가 실패하는 것이 아니라 아예 생성되지 않으므로, 새 커밋을 올려도 no checks reported
인 채 최신 커밋이 한 번도 검증되지 않은 상태로 남는다 (#1028).

develop 를 병합해 충돌을 풀면 검증이 다시 돈다. 해소되면 이 라벨은 자동으로 떨어진다.

…or-route-relocation

develop 의 #1529(수신자 선택 소실 복구)가 옛 자리인 `AfternoteNavGraphEditor.kt` 를 고쳤는데,
이 PR 은 그 파일을 `author/editor/` 로 갈라 옮긴 뒤였다. rename 양쪽이 겹쳐 자동 병합이
헬퍼 최신판을 옛 경로 그대로 되살려 놓아, 이 PR 이 만든 `AfternoteEditorRouteHelpers.kt` 에
옮겨 담았다.

살려 낸 develop 변경 3건
- `messageResId` 의 `ReceiverSelectionUnavailable` 분기
- `tryApplyReceiverSelectionFromSavedState` 의 `suspend` 전환과 KDoc
- `getReceiverById` → `resolveSelectedReceiver` 호출

`AfternoteEditorReceiverSelectionRecoveryTest` 의 `author.navigation.messageResId` import 도
걷었다 — 헬퍼가 같은 패키지로 왔으므로 import 자체가 필요 없다.
@github-actions github-actions Bot removed the conflict base 와 충돌 — CI 가 트리거되지 않는다. base 를 병합하면 자동으로 떨어진다 label Aug 30, 2026
화면 조립부가 기능 폴더로 옮겨지면서 import 대상과 같은 패키지가 됐는데
import 줄은 그대로 따라와 무의미하게 남았다. 6파일 16줄 삭제 — 다른 변경 없음.
@OnlyReadOneBook
OnlyReadOneBook added this pull request to the merge queue Aug 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 30, 2026
@github-actions github-actions Bot added the conflict base 와 충돌 — CI 가 트리거되지 않는다. base 를 병합하면 자동으로 떨어진다 label Aug 30, 2026
rename/rename 충돌 1건 해소 — MemorialVideoLauncherTest.kt.

이 브랜치는 작성자 화면 조립부를 옮기면서 이 테스트를
author/navigation → author/detail 로 따라 옮겼는데, 그 사이 develop 의
#1436 이 발신자·수신자 두 벌을 core:common 한 벌로 승격하면서 같은 파일을
core/common/src/test/java/com/afternote/core/common/media/ 로 옮기고
author 쪽 사본은 지웠다.

승격이 실질 변경이고 이 브랜치의 이동은 경로 정리뿐이므로 develop 쪽을
그대로 취한다. 사용처(AfternoteDetailRoute·MemorialReceivedDetailScreen)는
양쪽 다 core.common.media.launchMemorialVideo 를 import 하도록 자동 병합됐다.
@github-actions github-actions Bot removed the conflict base 와 충돌 — CI 가 트리거되지 않는다. base 를 병합하면 자동으로 떨어진다 label Aug 30, 2026
@OnlyReadOneBook
OnlyReadOneBook added this pull request to the merge queue Aug 30, 2026
Merged via the queue into develop with commit d205208 Aug 30, 2026
19 checks passed
@OnlyReadOneBook
OnlyReadOneBook deleted the refactor/1514-author-route-relocation branch August 30, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android-test PR head에서 Android Managed Device 계측 테스트 실행

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(afternote): author/navigation 의 «NavGraph» 6개는 실은 화면 조립부 — 기능 폴더로 이관해 수신자 규칙과 통일

2 participants