Skip to content

[#199] HomeView에서 TodayView와 겹치는 기능을 제거하고 새로운 기능을 추가한다#204

Merged
opficdev merged 5 commits intodevelopfrom
feat/#199-HomeView
Mar 6, 2026
Merged

[#199] HomeView에서 TodayView와 겹치는 기능을 제거하고 새로운 기능을 추가한다#204
opficdev merged 5 commits intodevelopfrom
feat/#199-HomeView

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!

이 Pull Request는 HomeView의 핵심 기능을 재정의하여 사용자 경험을 개선하고 코드의 응집도를 높이는 데 중점을 둡니다. 기존의 '중요 표시된 Todo' 기능을 '최근 수정된 Todo'로 대체함으로써, 사용자가 가장 최근에 작업한 항목들을 HomeView에서 바로 확인할 수 있도록 했습니다. 또한, 태그 표시 로직을 TagList라는 재사용 가능한 컴포넌트로 통합하여 코드 중복을 줄이고 유지보수성을 향상시켰습니다.

Highlights

  • HomeView 기능 재편성: HomeView에서 기존의 '중요 표시된 Todo' 섹션을 제거하고 '최근 수정된 Todo' 섹션을 새로 추가했습니다. 이는 TodayView와의 기능 중복을 피하고 HomeView의 목적에 더 부합하는 정보를 제공하기 위함입니다.
  • RecentTodoItem 도입: 새로운 RecentTodoItem 구조체를 추가하여 Todo의 isPinned, updatedAt, tags 정보를 포함하도록 했습니다. 이는 최근 수정된 Todo를 효과적으로 표시하기 위한 데이터 모델입니다.
  • HomeViewModel 업데이트: HomeViewModel의 상태 및 액션에서 pinnedTodos 관련 로직을 recentTodos 관련 로직으로 대체했습니다. fetchRecentTodos 액션은 최근 업데이트된 Todo를 가져오도록 구현되었습니다.
  • TagList 컴포넌트 도입 및 리팩토링: 태그 표시를 위한 TagList 컴포넌트를 새로 도입하여 TagLayout의 사용을 추상화하고, 여러 뷰에서 태그를 일관되고 효율적으로 표시할 수 있도록 리팩토링했습니다. TagLayout은 이제 private으로 변경되었으며, 오버플로우 인디케이터(...) 처리 로직이 개선되었습니다.
  • 다국어 리소스 업데이트: 다국어 리소스 파일(Localizable.xcstrings)에서 '최근에 중요 표시를 한 Todo가 표시됩니다.' 문구를 제거하고 '최근 수정' 및 '최근 수정한 Todo가 없습니다.' 문구를 추가하여 변경된 HomeView의 내용에 맞게 업데이트했습니다.
Changelog
  • DevLog/Presentation/Structure/PinnedTodoItem.swift
    • PinnedTodoItem 구조체 제거됨
  • DevLog/Presentation/Structure/RecentTodoItem.swift
    • RecentTodoItem 구조체 추가됨
  • DevLog/Presentation/ViewModel/HomeViewModel.swift
    • pinnedTodos 상태 변수가 recentTodos로 교체됨
    • isPinnedLoading 상태 변수가 isRecentTodosLoading으로 교체됨
    • fetchPinnedTodos 및 setPinnedLoading 액션이 fetchRecentTodos 및 setRecentTodosLoading으로 교체됨
    • upsertTodo 액션이 완료된 후 fetchRecentTodos를 트리거하도록 수정됨
    • onAppear 시 fetchRecentTodos를 호출하도록 변경됨
    • 최근 수정된 Todo를 가져오는 fetchRecentTodos 비동기 함수 추가됨
  • DevLog/Resource/Localizable.xcstrings
    • '최근에 중요 표시를 한 Todo가 표시됩니다.' 문구 제거됨
    • '최근 수정' 및 '최근 수정한 Todo가 없습니다.' 문구 추가됨
  • DevLog/UI/Common/Component/Tag+.swift
    • TagList 뷰 컴포넌트 추가됨
    • TagLayout 구조체가 private으로 변경되고 초기화 매개변수에 showsOverflowIndicator 추가됨
    • TagLayout의 limitedRows 함수가 오버플로우 인디케이터를 더 정확하게 처리하도록 개선됨
  • DevLog/UI/Common/Component/TodoItemRow.swift
    • TagLayout 사용이 TagList 컴포넌트로 대체됨
  • DevLog/UI/Common/TodoInfoSheetView.swift
    • TagLayout 사용이 TagList 컴포넌트로 대체됨
  • DevLog/UI/Home/HomeView.swift
    • pinnedSection이 recentTodoSection으로 이름 변경됨
    • recentTodoSection이 RecentTodoItem을 표시하도록 업데이트됨
    • RecentTodoRow private 뷰 컴포넌트 추가됨
  • DevLog/UI/Home/TodoEditorView.swift
    • TagLayout 사용이 TagList 컴포넌트로 대체됨
  • DevLog/UI/Today/TodayView.swift
    • TagLayout 사용이 TagList 컴포넌트로 대체됨
Activity
  • 이 Pull Request는 이슈 #199를 해결합니다.
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

이번 PR은 HomeView의 '중요 표시' 섹션을 '최근 수정' 섹션으로 대체하는 변경 사항을 담고 있습니다. PinnedTodoItem이 제거되고 RecentTodoItem이 추가되었으며, 관련 ViewModel 로직도 수정되었습니다. 또한, 태그 UI를 위한 TagLayoutTagList라는 재사용 가능한 컴포넌트로 리팩토링되어 코드의 가독성과 유지보수성이 향상되었습니다. 전반적으로 좋은 변화이지만, HomeViewModel에서 코드 중복, 매직 넘버 사용, 그리고 새로 생성된 항목이 목록에 표시되지 않을 수 있는 잠재적 로직 오류 등 몇 가지 개선점을 발견하여 리뷰 코멘트를 남겼습니다. 확인 부탁드립니다.

try await upsertTodoUseCase.execute(todo)
let page = try await fetchRecentTodos()
let items = page.items
.filter { $0.createdAt != $0.updatedAt }
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.

high

이 필터 조건 ($0.createdAt != $0.updatedAt) 때문에 새로 생성된 Todo 항목이 '최근 수정' 목록에 표시되지 않을 수 있습니다. upsertTodo가 새 항목 생성에도 사용되므로, 생성 직후 목록에 나타나지 않는 것은 사용자에게 혼란을 줄 수 있습니다. '최근 수정'이라는 이름에 맞게, 생성된 항목을 제외하는 것이 의도된 동작일 수 있으나, upsert 후 목록을 갱신하는 현재 로직과는 맞지 않아 보입니다. 이 필터 조건을 제거하여 생성된 항목도 목록에 포함시키는 것을 고려해 보세요.

let page = try await fetchRecentTodos()
let items = page.items
.filter { $0.createdAt != $0.updatedAt }
.prefix(5)
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

매직 넘버 5가 사용되었습니다. 이 값을 private static let recentTodosLimit = 5와 같이 명명된 상수로 추출하면 코드의 가독성과 유지보수성이 향상됩니다. 이 상수는 upsertTodofetchRecentTodos 두 곳에서 모두 사용될 수 있습니다.

Comment on lines +152 to +157
let page = try await fetchRecentTodos()
let items = page.items
.filter { $0.createdAt != $0.updatedAt }
.prefix(5)
.map { RecentTodoItem(from: $0) }
send(.fetchRecentTodos(items))
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

이 로직 블록은 upsertTodo 사이드 이펙트 핸들러(137-142행)에 있는 로직과 정확히 일치합니다. 코드 중복을 피하고 유지보수성을 향상시키기 위해 이 로직을 별도의 private 헬퍼 함수로 추출하여 두 곳에서 모두 호출하도록 리팩토링하는 것을 권장합니다.

@opficdev opficdev merged commit a84968f into develop Mar 6, 2026
1 check passed
@opficdev opficdev deleted the feat/#199-HomeView branch March 6, 2026 11:23
opficdev added a commit that referenced this pull request Mar 19, 2026
* feat: NotificationCenter을 통해 FCM 토큰이 변경된 것을 전파하고, 전파된 것을 받는 것을 resolve 하여 업데이트 하드록 변경

* refactor: 시간대를 저장하는 기능 역시 동일한 형태로 재구성

* chore: qa-* 기반 태그 찾는 로직 제거

* fix: 앱이 켜진 이후 시간대가 변경되면 반영되지 않는 현상 해결
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.

HomeView에서 TodayView와 겹치는 기능을 제거하고 새로운 기능을 추가한다

1 participant