예측 탭의 데이터 바인딩을 구현합니다. - #11
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Situation
AI 탭의 핵심 기능(예측 차트, 카테고리 차트, 인사이트, 모델 상태 카드)을 구현했으나,
데이터 흐름이 정리되지 않고 Domain 엔티티가 Presentation 레이어에 혼재해 있었음.
또한 뷰에 비즈니스 로직이 섞여 있어 계층 분리가 필요했음.
Task
Action
설계 및 구조
AIRepositoryProtocol,AIUseCaseProtocol,AIUseCase구현MockAIRepository에 인사이트 데이터 등록AIViewModel에async let을 활용한 병렬 데이터 로딩 구현Domain 엔티티 정리
AIInsightItem,CategoryPredictionDataPoint를 Presentation → Domain 레이어로 이동PredictionDataPoint→CumulativePrediction으로 rename (누적 데이터임을 명확히)AIModelItem제거,AIModelMetadata로 통일ViewModel 로직 이동
AIPredictionCardView→AIViewModel.makeCumulativePrediction으로 이동AICategoryPredictionCardView→AIViewModel.makeCategoryData로 이동hasPrediction,sortedInsights를 뷰 → ViewModel computed property로 이동UI
AIStatusCardView에 모델 없을 때 nil state UI 대응 및 토스트 추가테스트
AIUseCaseTests추가 (SpyAIRepository기반)AIViewModelTests추가 (StubAIUseCase,StubExpenseUseCaseForAI기반)Result