[#474] Todo 도메인 모델에서 옵셔널이 포함된 프로퍼티를 제거한다#520
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
이번 풀이 리퀘스트는 Todo 엔티티의 number 프로퍼티를 필수 값으로 변경하고, 신규 생성 시 사용할 TodoDraft 도메인 모델을 도입하여 생성(Create)과 수정(Update) 흐름을 명확히 분리하였습니다. 이에 따라 프레젠테이션 레이어의 뷰 모델 및 코디네이터 로직이 전반적으로 리팩토링되었습니다. 리뷰어 피드백으로는 도메인 모델의 일관성을 유지하기 위해 TodoDraft에 구현된 커스텀 Equatable을 제거하고 기본 구현을 사용할 것과, 뷰 모델 내 hasChanges 비교 로직을 직접 구현할 것을 권장하였습니다. 또한, state.tags.map { $0 } 대신 Array(state.tags)를 사용하여 가독성과 성능을 개선할 것을 제안했습니다.
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.
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.
🔗 연관된 이슈
🎯 의도
Todo 생성 전에는 서버에서 부여되는 번호가 없어
Todo.number가 optional로 유지되던 문제 해결📝 작업 내용
📌 요약
Todo의numbernon-optional 전환TodoDraft추가TodoDraft기반으로 단순화🔍 상세
Todo는 저장소에서 조회된 확정 모델로 정리하고number를 필수 값으로 변경TodoDraft를 추가해 생성 전 상태 표현UpsertTodoUseCase,TodoRepository,TodoRequest매핑에서Todo와TodoDraft입력을 분리TodoEditorViewModel의 생성 side effect는TodoDraft, 수정 side effect는Todo를 사용하도록 분리numberoptional guard 제거TodoDraft의 customEquatable로 Editor 변경 감지 로직 단순화📸 영상 / 이미지 (Optional)