feat(home): 팔로잉 탭 화면을 조립한다

This commit is contained in:
Yu Sung
2026-07-01 17:36:07 +09:00
parent 5b679389a6
commit f93e65372b
7 changed files with 175 additions and 35 deletions

View File

@@ -377,7 +377,7 @@
### Phase 11: 화면 조립, empty/error 상태, 상세 진입 callback 연결
- [ ] **Task 11.1: 팔로잉 탭 화면 조립**
- [x] **Task 11.1: 팔로잉 탭 화면 조립**
- 대상 파일:
- 수정: `SodaLive/Sources/V2/Main/Home/Following/MainHomeFollowingView.swift`
- 작업 내용:
@@ -392,7 +392,7 @@
- 실행 명령: `rg "MainHomeFollowingViewModel|fetchFollowing|MainHomeFollowingCreatorSection|MainHomeFollowingLiveSection|MainHomeFollowingChatSection|MainHomeFollowingScheduleSection|MainHomeFollowingNewsSection|MainHomeFollowingEmptyStateView|emptyStateMessage|loadFailedMessage|MainPlaceholderTabView" SodaLive/Sources/V2/Main/Home/Following/MainHomeFollowingView.swift`
- 기대 결과: `MainPlaceholderTabView`는 검색되지 않고, 팔로잉 화면 상태 분기와 섹션 조립이 확인된다.
- [ ] **Task 11.2: empty/login required view 생성**
- [x] **Task 11.2: empty/login required view 생성**
- 대상 파일:
- 생성: `SodaLive/Sources/V2/Main/Home/Following/Components/MainHomeFollowingEmptyStateView.swift`
- 작업 내용:
@@ -403,7 +403,7 @@
- 실행 명령: `rg "struct MainHomeFollowingEmptyStateView|message|loginButtonTitle|Button|Color.black|frame\\(maxWidth: \\.infinity" SodaLive/Sources/V2/Main/Home/Following/Components/MainHomeFollowingEmptyStateView.swift`
- 기대 결과: empty/API 실패/로그인 필요 상태 공용 안내 view가 확인된다.
- [ ] **Task 11.3: 최근 소식 섹션 조립**
- [x] **Task 11.3: 최근 소식 섹션 조립**
- 대상 파일:
- 생성 또는 수정: `SodaLive/Sources/V2/Main/Home/Following/Components/MainHomeFollowingNewsSection.swift`
- 작업 내용:
@@ -419,7 +419,7 @@
- 실행 명령: `rg "struct MainHomeFollowingNewsSection|recentNewsTitle|visibleFromAtUtc|creatorRanking|contentRanking|communityPost|audioContent|photoContent|unknown|MainHomeFollowingRankingNewsCard|MainHomeFollowingContentNewsCard|CommunityPostCard" SodaLive/Sources/V2/Main/Home/Following/Components/MainHomeFollowingNewsSection.swift`
- 기대 결과: 최근 소식 타입별 payload 분기와 unknown 숨김 정책이 확인된다.
- [ ] **Task 11.4: 상세 진입 callback 연결**
- [x] **Task 11.4: 상세 진입 callback 연결**
- 대상 파일:
- 수정: `SodaLive/Sources/V2/Main/Home/MainHomeView.swift`
- 수정: `SodaLive/Sources/V2/Main/MainView.swift`
@@ -554,3 +554,17 @@
- 2026-07-01: `rg "localhost:3845|imgRectangle|http://localhost" SodaLive/Sources/V2/Main/Home/Following/Components/MainHomeFollowingContentNewsCard.swift` 결과가 없어 Figma localhost asset 미사용을 확인했다.
- 2026-07-01: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test -derivedDataPath "/var/folders/yh/8xsbvpsj5wg2qnxzxdp11_gm0000gn/T/opencode/SodaLiveDerivedDataPhase10Test"``Scheme SodaLive is not currently configured for the test action.`으로 실패해 테스트 액션 미구성 상태를 확인했다.
- 2026-07-01: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug -derivedDataPath "/var/folders/yh/8xsbvpsj5wg2qnxzxdp11_gm0000gn/T/opencode/SodaLiveDerivedDataPhase10" build`를 실행해 Phase 10 신규 Swift 파일 컴파일과 빌드 성공을 확인했다. 기존 duplicate build file/run script/AppIntents/dependency scan warning은 남아 있으나 컴파일 오류는 없었다.
- 2026-07-01: Phase 11 구현 전 `rg "struct MainHomeFollowingEmptyStateView" SodaLive/Sources/V2/Main/Home/Following/Components/MainHomeFollowingEmptyStateView.swift`는 파일 없음으로 실패했고, `rg "MainPlaceholderTabView" SodaLive/Sources/V2/Main/Home/Following/MainHomeFollowingView.swift`는 placeholder 잔존을 확인했으며, `rg "MainHomeFollowingNewsSection\(" SodaLive/Sources/V2/Main/Home/Following/MainHomeFollowingView.swift`는 결과가 없어 최근 소식 미조립 상태를 확인했다.
- 2026-07-01: Phase 11 구현을 진행해 `MainHomeFollowingEmptyStateView`를 추가하고, `MainHomeFollowingView`에서 `isLoading`, `isLoginRequired`, `message`, `response` 상태를 분기하도록 조립했다. content 상태에서는 팔로잉 크리에이터, On Air, 최근 대화, 이달의 스케줄, 최근 소식 순서로 렌더링하고, `MainPlaceholderTabView`를 제거했다.
- 2026-07-01: `MainHomeFollowingView``onTapContent` callback을 추가하고 `MainHomeView`에서 기존 `onTapContent`를 전달해 최근 소식의 콘텐츠 랭킹/오디오/화보 tap이 기존 `MainView.handleRecommendationContentTap(contentId:)` 경로를 재사용하도록 연결했다. `COMMUNITY_POST`는 기존 Task 9.2 제약에 따라 상세 진입을 연결하지 않았다.
- 2026-07-01: `SodaLive.xcodeproj/project.pbxproj``MainHomeFollowingEmptyStateView.swift` 파일 참조와 Sources build file을 추가해 Xcode navigator와 target compile sources에서 확인 가능하도록 등록했다.
- 2026-07-01: `rg "struct MainHomeFollowingEmptyStateView|message|loginButtonTitle|Button|Color.black|frame\(maxWidth: \.infinity|SodaRadius\.r14" SodaLive/Sources/V2/Main/Home/Following/Components/MainHomeFollowingEmptyStateView.swift`로 empty/login required view 요구사항을 확인했다.
- 2026-07-01: `rg "MainHomeFollowingViewModel|fetchFollowing|ProgressView|MainHomeFollowingCreatorSection|MainHomeFollowingLiveSection|MainHomeFollowingChatSection|MainHomeFollowingScheduleSection|MainHomeFollowingNewsSection|MainHomeFollowingEmptyStateView|emptyStateMessage|loadFailedMessage|MainPlaceholderTabView" SodaLive/Sources/V2/Main/Home/Following/MainHomeFollowingView.swift``if rg "MainPlaceholderTabView" SodaLive/Sources/V2/Main/Home/Following/MainHomeFollowingView.swift; then exit 1; else true; fi`로 상태 분기/섹션 조립과 placeholder 제거를 확인했다.
- 2026-07-01: `rg "onTapContent|MainHomeFollowingView\(|handleRecommendationContentTap|onTapFollowingAll|onTapChatRoom|onTapFollowingSchedule" SodaLive/Sources/V2/Main/Home/Following/MainHomeFollowingView.swift SodaLive/Sources/V2/Main/Home/MainHomeView.swift SodaLive/Sources/V2/Main/MainView.swift`로 팔로잉 탭 상세 진입 callback이 기존 route에 연결됨을 확인했다.
- 2026-07-01: 최초 Phase 11 빌드는 `MainHomeFollowingEmptyStateView.swift`의 존재하지 않는 `SodaRadius.r20` 사용으로 실패했다. `SodaLive/Sources/UI/Theme/Radius.swift`에서 `r4`, `r8`, `r14`만 존재함을 확인하고 `SodaRadius.r14`로 수정했다.
- 2026-07-01: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug -derivedDataPath "/var/folders/yh/8xsbvpsj5wg2qnxzxdp11_gm0000gn/T/opencode/SodaLiveDerivedDataPhase11" build`를 재실행해 Phase 11 빌드 성공을 확인했다. 기존 duplicate build file/run script/AppIntents/dependency scan warning은 남아 있으나 컴파일 오류는 없었다.
- 2026-07-01: Phase 11 리뷰에서 `isLoginRequired` 상태의 로그인 버튼 액션 미연결과 최근 소식 payload mismatch 시 제목만 남을 수 있는 문제를 지적받았다. `MainHomeFollowingView -> MainHomeView -> MainView.handleFollowingLoginTap()` callback을 추가해 로그인 필요 상태의 `MainHomeFollowingEmptyStateView``loginAction`을 전달하고 `.login` route로 연결했다.
- 2026-07-01: `MainHomeFollowingNewsSection``renderableNews`를 추가해 `.unknown` 및 payload가 없는 news item을 섹션 렌더링 전에 제외했다. `if !renderableNews.isEmpty``ForEach(renderableNews)`를 사용해 실제 카드가 없는 경우 최근 소식 제목만 표시되지 않도록 수정했다.
- 2026-07-01: `rg "onTapLogin|onTapFollowingLogin|handleFollowingLoginTap|loginAction: onTapLogin|setAppStep\(step: \.login\)" SodaLive/Sources/V2/Main/Home/Following/MainHomeFollowingView.swift SodaLive/Sources/V2/Main/Home/MainHomeView.swift SodaLive/Sources/V2/Main/MainView.swift`로 로그인 필요 상태의 버튼 action과 `.login` route 연결을 확인했다.
- 2026-07-01: `rg "renderableNews|if !renderableNews\.isEmpty|ForEach\(renderableNews\)|case \.unknown|return false" SodaLive/Sources/V2/Main/Home/Following/Components/MainHomeFollowingNewsSection.swift`로 최근 소식 섹션의 렌더 가능 item 필터링과 unknown 숨김을 확인했다.
- 2026-07-01: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug -derivedDataPath "/var/folders/yh/8xsbvpsj5wg2qnxzxdp11_gm0000gn/T/opencode/SodaLiveDerivedDataPhase11" build`를 재실행해 Phase 11 리뷰 수정 후 빌드 성공을 확인했다. 기존 duplicate build file/run script/Crashlytics dSYM/AppIntents/dependency scan warning은 남아 있으나 컴파일 오류는 없었다.