docs(creator): 커뮤니티 탭 Phase 3 검증을 기록한다
This commit is contained in:
@@ -266,7 +266,7 @@
|
|||||||
|
|
||||||
### Phase 3: Mapper/UI model 정책 추가
|
### Phase 3: Mapper/UI model 정책 추가
|
||||||
|
|
||||||
- [ ] **Task 3.1: Mapper RED 테스트 작성**
|
- [x] **Task 3.1: Mapper RED 테스트 작성**
|
||||||
- 생성:
|
- 생성:
|
||||||
- `app/src/test/java/kr/co/vividnext/sodalive/v2/creator/channel/community/CreatorChannelCommunityMapperTest.kt`
|
- `app/src/test/java/kr/co/vividnext/sodalive/v2/creator/channel/community/CreatorChannelCommunityMapperTest.kt`
|
||||||
- 테스트 케이스:
|
- 테스트 케이스:
|
||||||
@@ -285,8 +285,10 @@
|
|||||||
- `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.CreatorChannelCommunityMapperTest"`
|
- `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.CreatorChannelCommunityMapperTest"`
|
||||||
- 기대 결과:
|
- 기대 결과:
|
||||||
- mapper 미구현 상태에서 RED 실패한다.
|
- mapper 미구현 상태에서 RED 실패한다.
|
||||||
|
- 검증 기록:
|
||||||
|
- 2026-06-21: `CreatorChannelCommunityMapperTest`를 추가해 보기 방식 label/icon, 상대 시간, profile URL, notice/comment 표시, 유료 미구매 잠금, play button, owner more/top price, grid preview 정책을 RED 테스트로 고정했다. Production mapper/model 구현 전 `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.CreatorChannelCommunityMapperTest"` 실행 결과 `:app:compileDebugUnitTestKotlin`에서 `community.model` 패키지, `toCommunityPostUiModels`, `CreatorChannelCommunityViewMode.labelResId/iconResId`, UI model fields 미구현으로 실패해 RED를 확인했다.
|
||||||
|
|
||||||
- [ ] **Task 3.2: UI model과 mapper 구현**
|
- [x] **Task 3.2: UI model과 mapper 구현**
|
||||||
- 생성:
|
- 생성:
|
||||||
- `app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/community/model/CreatorChannelCommunityUiModels.kt`
|
- `app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/community/model/CreatorChannelCommunityUiModels.kt`
|
||||||
- `app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/community/model/CreatorChannelCommunityMappers.kt`
|
- `app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/community/model/CreatorChannelCommunityMappers.kt`
|
||||||
@@ -302,6 +304,12 @@
|
|||||||
- `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.CreatorChannelCommunityMapperTest"`
|
- `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.CreatorChannelCommunityMapperTest"`
|
||||||
- 기대 결과:
|
- 기대 결과:
|
||||||
- Mapper 테스트가 GREEN이다.
|
- Mapper 테스트가 GREEN이다.
|
||||||
|
- 검증 기록:
|
||||||
|
- 2026-06-21: `CreatorChannelCommunityViewMode`, `CreatorChannelCommunityPostUiModel`, `CreatorChannelCommunityImageMode`, `toCommunityPostUiModels()`를 추가하고 `formatUtcRelativeTimeText()`와 기존 grid preview 24자 정책을 재사용했다. `CreatorChannelCommunityViewMode`는 `List`/`Grid` label과 `drawable-mdpi`의 `ic_new_list`/`ic_new_grid` icon resource를 가진다.
|
||||||
|
- 2026-06-21: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.CreatorChannelCommunityMapperTest"`, `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.*"`, `./gradlew :app:mergeDebugResources`, `./gradlew :app:compileDebugKotlin`, `./gradlew :app:ktlintCheck`, `git diff --check` 모두 PASS했다. 최초 `ktlintCheck`는 typealias 파일명/line length 위반으로 실패했고, 파일명을 `CreatorChannelCommunityViewMode.kt`로 맞춘 뒤 재실행 PASS했다.
|
||||||
|
- 2026-06-21: Reviewer gate의 컨텍스트 마이닝에서 `CreatorChannelCommunityViewModel.Content.communityPosts`가 DTO 목록을 유지해 mapper가 production 상태 경로에 적용되지 않았다는 FAIL을 확인했다. `CreatorChannelCommunityViewModel` 생성자에 `Context`를 주입하고 first page/load-more 성공 경로에서 `data.communityPosts.toCommunityPostUiModels(context, isOwner, SharedPreferenceManager.userId)`를 적용해 `Content.communityPosts`가 `CreatorChannelCommunityPostUiModel` 목록을 들도록 보정했다. 보정 후 `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.*"`, `./gradlew :app:compileDebugKotlin`, `./gradlew :app:mergeDebugResources`, `./gradlew :app:ktlintCheck`, `git diff --check` PASS했다.
|
||||||
|
- 2026-06-21: 후속 리뷰에서 ViewModel이 `Context`를 직접 주입받아 생명주기상 memory leak 가능성이 있다는 지적을 반영했다. `UtcRelativeTimeTextFormatter`와 `AndroidUtcRelativeTimeTextFormatter`를 추가하고, `CreatorChannelCommunityViewModel`은 `Context` 대신 formatter만 주입받도록 변경했다. mapper는 formatter로 `createdAtText`를 생성하며, Android 구현체는 application context만 보관한다. 보정 후 `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.*"`, `./gradlew :app:compileDebugKotlin`, `./gradlew :app:mergeDebugResources`, `./gradlew :app:ktlintCheck`, `git diff --check` PASS했다.
|
||||||
|
- 2026-06-21: Phase 3 코드 리뷰에서 mapper 정책과 ViewModel 상태 경로를 `CreatorCommunityAllGridAdapter`의 24자 preview 정책, PRD의 유료/구매/본인/댓글 표시 분기와 대조했다. 수정이 필요한 결함은 발견하지 않았다. 재검증으로 `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.*"`, `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.*Community*"`, `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.*"`, `./gradlew :app:mergeDebugResources`, `./gradlew :app:compileDebugKotlin`, `./gradlew :app:ktlintCheck`, `git diff --check`를 실행했으며 모두 PASS했다.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -498,3 +506,10 @@
|
|||||||
- 회귀: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.*Community*"` PASS.
|
- 회귀: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.*Community*"` PASS.
|
||||||
- 확장 회귀: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.*"`는 229개 중 `CreatorChannelHomeViewModelTest > 채널 후원 성공은 기존 후원 API를 호출하고 홈을 다시 로드한다` 1건 실패. 동일 테스트 단독 재실행 `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.CreatorChannelHomeViewModelTest.채널 후원 성공은 기존 후원 API를 호출하고 홈을 다시 로드한다"`는 PASS하여 Phase 2 변경과 직접 관련 없는 비결정적 실패로 기록한다.
|
- 확장 회귀: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.*"`는 229개 중 `CreatorChannelHomeViewModelTest > 채널 후원 성공은 기존 후원 API를 호출하고 홈을 다시 로드한다` 1건 실패. 동일 테스트 단독 재실행 `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.CreatorChannelHomeViewModelTest.채널 후원 성공은 기존 후원 API를 호출하고 홈을 다시 로드한다"`는 PASS하여 Phase 2 변경과 직접 관련 없는 비결정적 실패로 기록한다.
|
||||||
- 빌드/리소스/린트: `./gradlew :app:mergeDebugResources`, `./gradlew :app:compileDebugKotlin`, `./gradlew :app:ktlintCheck`, `git diff --check` PASS.
|
- 빌드/리소스/린트: `./gradlew :app:mergeDebugResources`, `./gradlew :app:compileDebugKotlin`, `./gradlew :app:ktlintCheck`, `git diff --check` PASS.
|
||||||
|
|
||||||
|
- 2026-06-21 Phase 3 코드 리뷰 및 검증:
|
||||||
|
- 코드 리뷰: `CreatorChannelCommunityMappers`, `CreatorChannelCommunityUiModels`, `CreatorChannelCommunityViewModel`의 first page/load-more UI model 적용 경로, Koin binding, string resource를 Phase 3 정책과 대조했고 수정이 필요한 결함은 발견하지 않았다.
|
||||||
|
- GREEN: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.*"` PASS.
|
||||||
|
- 회귀: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.*Community*"` PASS.
|
||||||
|
- 확장 회귀: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.*"` PASS.
|
||||||
|
- 빌드/리소스/린트: `./gradlew :app:mergeDebugResources`, `./gradlew :app:compileDebugKotlin`, `./gradlew :app:ktlintCheck`, `git diff --check` PASS.
|
||||||
|
|||||||
Reference in New Issue
Block a user