Skip to content

[#582] RootView에 TCA를 적용한다#623

Merged
opficdev merged 9 commits into
developfrom
refactor/#582-RootView-TCA
Jun 17, 2026
Merged

[#582] RootView에 TCA를 적용한다#623
opficdev merged 9 commits into
developfrom
refactor/#582-RootView-TCA

Conversation

@opficdev

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

🔗 연관된 이슈

🎯 의도

  • RootView에 TCA를 적용하면서 기존 상태 변화를 유지한 채 RootFeature 중심으로 상태와 액션을 정리

📝 작업 내용

📌 요약

  • RootViewModel 없이도 기존 상태 관리와 동일한 흐름을 검증할 수 있도록 RootFeature 테스트 추가
  • RootFeatureAlertState, SheetState, selectedMainTab 상태 반영
  • selectedMainTab 바인딩을 BindingAction 기반으로 전환
  • view/store 액션 분리 제거 후 단일 Action으로 평탄화
  • RootView의 sheet 구성을 sheetContent로 분리

🔍 상세

  • RootFeature.Statealert, sheet, selectedMainTab 추가
  • 로그인 상태, 네트워크 상태, 테마 상태 관찰 결과를 RootFeature 상태로 직접 반영
  • 로그인 성공 시 selectedMainTab.home으로 복구하는 흐름 반영
  • 위젯 route 진입 시 로그인 여부에 따라 selectedMainTab 변경 여부를 store에서 관리
  • MainViewselectedTab$store.selectedMainTab으로 연결
  • push notification 기반 Todo detail sheet 표시를 store action으로 연결
  • RootStoreTestAdapterRootFeatureTests를 추가해 기존 상태 변화 parity 검증
  • didLogined(true), widget route, alert 표시/해제, theme 반영, sheet 표시/해제, 초기 observe 반영 케이스 검증
  • RootView의 sheet body를 sheetContent(todoId:onClose:)로 분리해 뷰 본문 가독성 정리

📸 영상 / 이미지 (Optional)

@opficdev opficdev self-assigned this Jun 17, 2026
@opficdev opficdev changed the title [#582] [#582] RootView에 TCA를 적용한다 Jun 17, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 풀이 리퀘스트는 기존 RootViewModel 기반의 상태 관리를 Composable Architecture(TCA)인 RootFeature로 리팩터링하고, 이에 맞춰 RootView 및 관련 단위 테스트를 업데이트하였습니다. 리뷰 피드백으로는 백그라운드 스레드에서 방출될 수 있는 네트워크, 세션, 테마 관찰 스트림에 .receive(on: DispatchQueue.main)을 추가하여 메인 스레드에서의 안전한 UI 업데이트를 보장할 것과, didLogined(true) 호출 시 기존 탭 선택이 원치 않게 초기화되는 현상을 방지하기 위해 상태 전환 조건을 추가할 것을 제안합니다. 또한, 비옵셔널 타입인 trackAnalyticsEventUseCase에 사용된 불필요한 옵셔널 체이닝을 제거하여 코드를 정리할 것을 권장합니다.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread Application/DevLogPresentation/Sources/Root/RootFeature.swift
Comment thread Application/DevLogPresentation/Sources/Root/RootFeature.swift
Comment thread Application/DevLogPresentation/Sources/Root/RootFeature.swift
Comment thread Application/DevLogPresentation/Sources/Root/RootFeature.swift
Comment thread Application/DevLogPresentation/Sources/Root/RootFeature.swift
@opficdev opficdev merged commit b29ec97 into develop Jun 17, 2026
5 checks passed
@opficdev opficdev deleted the refactor/#582-RootView-TCA branch June 17, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RootView에 TCA를 적용한다

1 participant