Skip to content

[#578] TodayView에 TCA를 적용한다#606

Merged
opficdev merged 9 commits into
developfrom
refactor/#578-TodayView-TCA
Jun 14, 2026
Merged

[#578] TodayView에 TCA를 적용한다#606
opficdev merged 9 commits into
developfrom
refactor/#578-TodayView-TCA

Conversation

@opficdev

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

🎯 의도

  • TodayView를 기존 TodayViewModel 기반 상태 변화와 동일하게 동작하도록 TCA로 마이그레이션

📝 작업 내용

📌 요약

  • TodayView 상태 관리 로직을 TodayFeature로 이관한 작업
  • 기존 TodayViewModel과 동일한 상태 변화를 검증하는 테스트 추가 작업
  • coordinator에서 캐싱하는 store를 @Bindable 기준으로 정리한 작업
  • Picker, Toggle 변경 경로를 BindingAction 기반으로 정리한 작업
  • develop 대비 불필요하게 재구성된 TodayView 컴포넌트 형태 일부 롤백 작업

🔍 상세

  • TodayFeature, TodayFeature+State 추가 작업
  • todos, selectedSectionScope, displayOptions, loading, alert 상태를 TCA State로 이관한 작업
  • 기존 TodayViewModel의 섹션 계산, 요약 계산, 필터링 결과가 동일한지 검증하는 TodayFeature 테스트 추가 작업
  • fetchData, setSectionScope, display options 변경, togglePinned, completeTodo, 에러 표시 상태에 대한 패리티 테스트 추가 작업
  • TodayViewCoordinator가 coordinator 소유 store를 캐싱하도록 구성하고 TodayView는 @Bindable var store를 사용하도록 정리한 작업
  • TodayView의 due date Picker와 pinned Toggle을 BindingAction 경로로 연결한 작업
  • setDueDateVisibility, setFocusVisibility 중복 액션 제거 후 store 테스트 어댑터도 binding 전송 기반으로 정리한 작업
  • summary section에서 develop 대비 불필요하게 분리된 컴포넌트 구조를 인라인 형태로 롤백한 작업
  • PushNotificationListView도 coordinator 소유 store 패턴에 맞춰 @Bindable로 정리한 작업

📸 영상 / 이미지 (Optional)

  • 없음

@opficdev opficdev self-assigned this Jun 14, 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

이번 PR은 기존 MVVM/Coordinator 패턴의 Today 화면을 Composable Architecture(TCA) 기반의 TodayFeature로 마이그레이션하고 관련 뷰 및 테스트 코드를 추가한 변경사항을 담고 있습니다. 코드 리뷰에서는 시간 민감한 연산의 일관성을 유지하고 Date() 생성 오버헤드를 줄이기 위해, sectionssummaryCounts 진입점에서 현재 시간을 한 번만 캡처하여 isOverdue, isDueSoon, summaryValue, groupedSectionItems 등의 하위 메서드에 매개변수로 주입하도록 개선할 것을 권장하고 있습니다.

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/Today/TodayFeature+State.swift Outdated
Comment thread Application/DevLogPresentation/Sources/Today/TodayFeature.swift
Comment thread Application/DevLogPresentation/Sources/Today/TodayFeature.swift
@opficdev

Copy link
Copy Markdown
Owner Author

반영 상태 09b5009

기존 구현은 Date()를 각 헬퍼 내부에서 직접 읽는 구조였는데 이번에는 테스트 용이성과 의도 명확성을 우선해서 sections, summaryCounts 진입점에서 now를 한 번만 캡처해 하위 헬퍼로 전달하는 형태로 정리한 상태

함께 반영한 범위는 아래와 같음.

  • groupedSectionItems, summaryValue, isOverdue, isDueSoonnow: Date를 받도록 수정
  • State.sections, State.summaryCounts에서 동일한 now를 전달하도록 수정
  • 고정된 now 기준으로 groupedSectionItems, summaryValue를 직접 검증하는 테스트 추가

이번 수정으로 시간 의존 헬퍼의 순수성이 조금 더 명확해졌고 자정 경계 같은 희소 케이스에 대해서도 계산 기준 시각이 한 번으로 맞춰진 상태

@opficdev opficdev merged commit 6510233 into develop Jun 14, 2026
5 checks passed
@opficdev opficdev deleted the refactor/#578-TodayView-TCA branch June 14, 2026 11:38
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.

TodayView에 TCA를 적용한다

1 participant