Skip to content

[#198] 오늘 기준으로 관련이 있는 Todo들을 보여주는 뷰를 구성한다#201

Merged
opficdev merged 8 commits intodevelopfrom
feat/#198-TodayTodo
Mar 6, 2026
Merged

[#198] 오늘 기준으로 관련이 있는 Todo들을 보여주는 뷰를 구성한다#201
opficdev merged 8 commits intodevelopfrom
feat/#198-TodayTodo

Conversation

@opficdev
Copy link
Copy Markdown
Owner

@opficdev opficdev commented Mar 6, 2026

@opficdev opficdev self-assigned this Mar 6, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 풀 리퀘스트는 사용자가 현재 날짜와 관련된 Todo 항목들을 효과적으로 관리할 수 있도록 '오늘' 뷰를 새롭게 도입합니다. 이 뷰는 마감일, 집중 표시 여부 등 다양한 필터링 및 정렬 옵션을 제공하며, 사용자 선호도를 저장하여 개인화된 경험을 가능하게 합니다. 이를 통해 Todo 목록의 가독성과 관리 편의성이 크게 향상됩니다.

Highlights

  • 새로운 '오늘' 뷰 도입: 사용자가 오늘과 관련된 Todo 항목들을 한눈에 볼 수 있는 전용 '오늘' 뷰가 추가되었습니다. 이 뷰는 마감일, 집중 표시 여부 등 다양한 기준으로 Todo를 필터링하고 정렬할 수 있는 기능을 제공합니다.
  • Todo 쿼리 및 커서 로직 개선: Todo 쿼리(TodoQuery)에 마감일(dueDate)을 기준으로 정렬하고 필터링할 수 있는 기능이 추가되었으며, 페이징을 위한 커서(TodoCursorDTO, TodoCursor)도 여러 정렬 기준을 지원하도록 확장되었습니다.
  • 사용자 선호도 기반 표시 옵션: 오늘 뷰의 표시 옵션(TodayDisplayOptions)을 사용자 선호도에 따라 저장하고 관리할 수 있는 유스케이스와 저장소 구현이 추가되어, 마감일 유무 및 집중 표시 여부에 따라 Todo 목록을 유연하게 조정할 수 있습니다.
  • UI/UX 개선: 오늘 뷰는 요약 카드, 필터링 메뉴, Todo 항목 목록 및 스와이프 액션 등 직관적인 UI를 제공하여 사용자가 Todo를 효율적으로 관리할 수 있도록 돕습니다.
Changelog
  • DevLog/App/Assembler/DomainAssembler.swift
    • 오늘 뷰의 표시 옵션을 가져오고 업데이트하는 새로운 유스케이스를 등록했습니다.
  • DevLog/Data/DTO/TodoCursorDTO.swift
    • 단일 orderedAt 필드를 primarySortDatesecondarySortDate (선택적 Date 타입)로 변경하여 다중 정렬 기준을 지원하도록 업데이트했습니다.
  • DevLog/Data/Mapper/TodoMapping.swift
    • TodoCursorDTOTodoCursor 간의 매핑 로직을 새로운 primarySortDatesecondarySortDate 필드를 반영하도록 업데이트했습니다.
  • DevLog/Data/Repository/UserPreferencesRepositoryImpl.swift
    • 오늘 뷰의 마감일 및 집중 표시 가시성 옵션을 위한 새로운 UserDefaults 키를 추가했습니다.
    • 오늘 뷰의 표시 옵션을 가져오고 설정하는 메서드를 구현했습니다.
  • DevLog/Domain/Entity/TodayDisplayOptions.swift
    • 오늘 뷰의 마감일 가시성(DueDateVisibility) 및 집중 표시 가시성(FocusVisibility) 옵션을 정의하는 새 엔티티를 추가했습니다.
  • DevLog/Domain/Entity/TodoCursor.swift
    • 단일 orderedAt 필드를 primarySortDatesecondarySortDate (선택적 Date 타입)로 변경하여 다중 정렬 기준을 지원하도록 업데이트했습니다.
  • DevLog/Domain/Entity/TodoQuery.swift
    • dueDate를 새로운 정렬 대상으로 추가했습니다.
    • 마감일 필터링을 위한 DueDateFilter 열거형을 추가하고 TodoQuery에 해당 속성을 포함했습니다.
    • 새로운 dueDateFilter 속성을 포함하도록 TodoQuery의 초기화 메서드를 업데이트했습니다.
  • DevLog/Domain/Protocol/UserPreferencesRepository.swift
    • 오늘 뷰의 표시 옵션을 가져오고 설정하는 프로토콜 메서드를 추가했습니다.
  • DevLog/Domain/UseCase/UserPreferences/Today/FetchTodayDisplayOptionsUseCase.swift
    • 오늘 뷰의 표시 옵션을 가져오는 유스케이스 프로토콜을 추가했습니다.
  • DevLog/Domain/UseCase/UserPreferences/Today/FetchTodayDisplayOptionsUseCaseImpl.swift
    • FetchTodayDisplayOptionsUseCase의 구현체를 추가했습니다.
  • DevLog/Domain/UseCase/UserPreferences/Today/UpdateTodayDisplayOptionsUseCase.swift
    • 오늘 뷰의 표시 옵션을 업데이트하는 유스케이스 프로토콜을 추가했습니다.
  • DevLog/Domain/UseCase/UserPreferences/Today/UpdateTodayDisplayOptionsUseCaseImpl.swift
    • UpdateTodayDisplayOptionsUseCase의 구현체를 추가했습니다.
  • DevLog/Infra/Service/TodoService.swift
    • Todo 쿼리에 dueDateFilter를 포함하도록 업데이트했습니다.
    • 쿼리 정렬 로직을 makeOrderedQuery 메서드로 리팩토링하여 dueDate 정렬 시 updatedAt을 보조 정렬 기준으로 사용하도록 했습니다.
    • 커서 값 생성 로직을 cursorValues 메서드로 분리하여 다중 정렬 필드를 지원하도록 개선했습니다.
    • 커서 생성 로직을 makeCursor 메서드로 리팩토링하여 다중 정렬 필드를 지원하도록 개선했습니다.
  • DevLog/Presentation/Structure/TodayTodoItem.swift
    • 오늘 뷰에 표시될 Todo 항목을 위한 TodayTodoItem 구조체를 추가했습니다.
  • DevLog/Presentation/ViewModel/TodayViewModel.swift
    • 오늘 뷰의 상태, 액션, 사이드 이펙트, 요약 범위 및 표시 옵션을 관리하는 TodayViewModel을 추가했습니다.
  • DevLog/Presentation/ViewModel/TodoListViewModel.swift
    • TodoQuery.SortTarget 확장자에 dueDate의 지역화된 이름을 추가했습니다.
  • DevLog/Resource/Localizable.xcstrings
    • 오늘 뷰와 관련된 새로운 지역화 문자열을 추가했습니다.
  • DevLog/UI/Common/MainView.swift
    • 메인 애플리케이션 뷰에 새로운 TodayView 탭을 추가했습니다.
  • DevLog/UI/Today/TodayView.swift
    • 오늘 뷰의 UI를 구현하는 TodayView를 추가했습니다.
Activity
  • 이 풀 리퀘스트는 이슈 #198을 해결합니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

Code Review

안녕하세요. 오늘 날짜를 기준으로 관련된 Todo를 보여주는 새로운 '오늘' 뷰를 추가하는 PR 잘 보았습니다. Firestore의 복잡한 정렬 및 필터링 요구사항을 해결하기 위한 노력이 돋보입니다. 전반적으로 훌륭한 구현이지만, 몇 가지 개선점을 제안합니다. 페이지네이션 로직에 치명적인 버그가 될 수 있는 부분을 발견했으며, 성능 최적화 및 코드 가독성 향상을 위한 제안을 포함했습니다. 자세한 내용은 아래 주석을 확인해주세요.

Comment thread DevLog/Infra/Service/TodoService.swift Outdated
Comment thread DevLog/Presentation/ViewModel/TodayViewModel.swift
Comment thread DevLog/UI/Today/TodayView.swift Outdated
Comment on lines +178 to +215
private var emptyStateTitle: String {
if viewModel.state.selectedSummaryScope == .all, viewModel.state.todos.isEmpty {
return "남아 있는 Todo가 없습니다."
}
if viewModel.state.selectedSummaryScope == .all, viewModel.sections.isEmpty {
return "선택한 보기 옵션에 맞는 Todo가 없습니다."
}

switch viewModel.state.selectedSummaryScope {
case .all:
return "남아 있는 Todo가 없습니다."
case .focused:
return "집중할 일이 없습니다."
case .overdue:
return "지난 마감 Todo가 없습니다."
case .dueSoon:
return "7일 내 일정이 없습니다."
}
}

private var emptyStateMessage: String {
if viewModel.state.selectedSummaryScope == .all,
!viewModel.state.todos.isEmpty,
viewModel.sections.isEmpty {
return "툴바에서 보기 범위를 조정하거나 전체 보기로 돌아가세요."
}

switch viewModel.state.selectedSummaryScope {
case .all:
return "완료되지 않은 일이 생기면 이곳에서 우선순위대로 볼 수 있습니다."
case .focused:
return "중요 표시한 Todo가 생기면 이곳에서 바로 볼 수 있습니다."
case .overdue:
return "지금은 기한이 지난 Todo가 없습니다."
case .dueSoon:
return "곧 마감되는 Todo가 생기면 이곳에서 먼저 볼 수 있습니다."
}
}
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.

medium

emptyStateTitleemptyStateMessage의 로직이 다소 복잡하고, emptyStateTitle의 경우 도달할 수 없는 코드 경로가 포함되어 있습니다. switch 문을 사용하여 각 SummaryScope에 대한 상태를 명확하게 분기 처리하면 코드의 가독성과 유지보수성을 높일 수 있습니다.

    private var emptyStateTitle: String {
        switch viewModel.state.selectedSummaryScope {
        case .all:
            return viewModel.state.todos.isEmpty ? "남아 있는 Todo가 없습니다." : "선택한 보기 옵션에 맞는 Todo가 없습니다."
        case .focused:
            return "집중할 일이 없습니다."
        case .overdue:
            return "지난 마감 Todo가 없습니다."
        case .dueSoon:
            return "7일 내 일정이 없습니다."
        }
    }

    private var emptyStateMessage: String {
        switch viewModel.state.selectedSummaryScope {
        case .all:
            if viewModel.state.todos.isEmpty {
                return "완료되지 않은 일이 생기면 이곳에서 우선순위대로 볼 수 있습니다."
            } else {
                return "툴바에서 보기 범위를 조정하거나 전체 보기로 돌아가세요."
            }
        case .focused:
            return "중요 표시한 Todo가 생기면 이곳에서 바로 볼 수 있습니다."
        case .overdue:
            return "지금은 기한이 지난 Todo가 없습니다."
        case .dueSoon:
            return "곧 마감되는 Todo가 생기면 이곳에서 먼저 볼 수 있습니다."
        }
    }

Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

Code Review

이 PR은 오늘 날짜를 기준으로 관련 Todo 항목을 표시하는 새로운 "오늘" 뷰를 성공적으로 도입합니다. TodoCursorDTO 및 TodoCursor 엔티티에 다중 필드 정렬을 지원하기 위한 정렬 필드가 추가되었고, TodoQuery에 마감일 필터링 옵션이 구현되었습니다. 사용자 환경설정 저장소에 새로운 TodayDisplayOptions를 저장하고 불러오는 기능도 잘 구현되었습니다. 전반적으로 변경 사항은 잘 구성되어 있으며 새로운 기능을 지원하기 위해 기존 데이터 모델 및 서비스 로직을 확장하는 데 필요한 변경 사항을 포함하고 있습니다. 코드 품질은 높으며, 새로운 기능이 기존 시스템에 잘 통합되었습니다.

@opficdev opficdev merged commit 850f373 into develop Mar 6, 2026
1 check passed
@opficdev opficdev deleted the feat/#198-TodayTodo branch March 6, 2026 09:25
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.

오늘 기준으로 관련이 있는 Todo들을 보여주는 뷰를 구성한다

1 participant