Skip to content

[#357] 검색 로직에 Todo 레퍼런스 숫자를 추가한다#362

Merged
opficdev merged 3 commits intodevelopfrom
feat/#357-search-todo-number
Apr 6, 2026
Merged

[#357] 검색 로직에 Todo 레퍼런스 숫자를 추가한다#362
opficdev merged 3 commits intodevelopfrom
feat/#357-search-todo-number

Conversation

@opficdev
Copy link
Copy Markdown
Owner

@opficdev opficdev commented Apr 6, 2026

@opficdev opficdev self-assigned this Apr 6, 2026
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은 할 일 번호(#번호) 검색 기능을 추가하고 검색 UI의 로딩 상태 처리 및 Firestore 인덱스를 개선합니다. 리뷰에서는 '#'으로 시작하는 모든 검색어가 웹 페이지 검색을 차단하는 부작용을 방지하기 위해, 숫자인 경우에만 할 일 전용 검색으로 판단하도록 로직 개선을 제안했습니다.

Comment on lines +185 to +187
func searchesTodoOnly(_ query: String) -> Bool {
query.trimmingCharacters(in: .whitespacesAndNewlines).hasPrefix("#")
}
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

searchesTodoOnly 메서드가 #으로 시작하는 모든 검색어에 대해 true를 반환하고 있습니다. 이로 인해 #swift와 같은 일반적인 해시태그 검색 시에도 웹 페이지 검색 결과가 차단되는 부작용이 발생할 수 있습니다. Todo 레퍼런스 번호 검색(예: #123)인 경우에만 웹 페이지 검색을 건너뛰도록 숫자인지 확인하는 로직을 추가하는 것이 좋습니다.

    func searchesTodoOnly(_ query: String) -> Bool {
        let trimmed = query.trimmingCharacters(in: .whitespacesAndNewlines)
        guard trimmed.hasPrefix("#") else {
            return false
        }

        let numberText = trimmed.dropFirst()
        return !numberText.isEmpty && numberText.allSatisfy(\.isNumber)
    }

@opficdev opficdev merged commit 5d95643 into develop Apr 6, 2026
1 check passed
@opficdev opficdev deleted the feat/#357-search-todo-number branch April 6, 2026 03:15
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