Skip to content

[FIX/#125] 검색 뷰 이슈 해결#128

Merged
usuuhyn merged 1 commit intodevelopfrom
fix/#125-procedure-search
Jan 21, 2026
Merged

[FIX/#125] 검색 뷰 이슈 해결#128
usuuhyn merged 1 commit intodevelopfrom
fix/#125-procedure-search

Conversation

@usuuhyn
Copy link
Copy Markdown
Contributor

@usuuhyn usuuhyn commented Jan 21, 2026

Related issue 🛠

Work Description ✏️

  • 검색 결과 갱신 시 시술 선택 상태를 보존하도록 수정했습니다.

Screenshot 📸

FilteringWithSearch
video

Uncompleted Tasks 😅

N/A

To Reviewers 📢

Summary by CodeRabbit

릴리스 노트

  • 성능 개선

    • 다운타임 카드 필터링 방식을 개선하여 렌더링 성능을 향상했습니다.
  • 버그 수정

    • 검색 시 선택된 항목의 상태가 유지되도록 개선했습니다.
    • 절차 선택 상태 관리를 강화했습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@usuuhyn usuuhyn self-assigned this Jan 21, 2026
@usuuhyn usuuhyn requested a review from a team as a code owner January 21, 2026 12:40
@usuuhyn usuuhyn added FIX🐛 오류 및 버그 수정 수현🍒 수현 담당 labels Jan 21, 2026
@usuuhyn usuuhyn linked an issue Jan 21, 2026 that may be closed by this pull request
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 21, 2026

Walkthrough

검색 중 선택된 시술 목록이 유지되도록 UI 상태에 선택된 항목의 사전 필터링된 컬렉션을 추가합니다. ViewModel에서 검색 작업 중 선택 상태를 보존하고, 새로운 selectedProcedureItems 필드를 통해 선택된 항목을 추적합니다.

Changes

Cohort / File(s) 변경 사항
UI 상태 확장
ProcedureUiState.kt
새로운 selectedProcedureItems 필드와 selectedProcedureCardItems 계산 속성을 추가하여 선택된 항목의 사전 필터링된 목록을 제공하고, selectedProcedures 계산 속성이 새 필드를 사용하도록 업데이트
화면 업데이트
ProcedureScreen.kt
다운타임 브랜치에서 실시간 필터링 대신 사전 계산된 selectedProcedureCardItems 사용
상태 관리 로직
ProcedureViewModel.kt
선택 상태를 검색 중에도 유지하기 위해 selectedProcedureItems 추적 추가, 카드 클릭 로직 확장, 절차 조회 시 선택 상태 보존, 상태 초기화 경로 업데이트

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • hyeminililo
  • sohee6989
  • nhyeonii
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 제목은 PR의 주요 변경사항인 검색 뷰 이슈 해결을 명확하게 요약하고 있으며, 연관된 이슈 번호 #125를 포함하여 변경 내용을 잘 나타냅니다.
Description check ✅ Passed PR 설명은 리포지토리의 템플릿 구조를 따르고 있으며, 관련 이슈, 작업 내용, 스크린샷, 미완료 항목 등의 주요 섹션이 모두 포함되어 있습니다.
Linked Issues check ✅ Passed 코드 변경사항이 이슈 #125의 요구사항을 충족합니다. 검색 동작 중에도 선택된 시술의 상태를 보존하기 위해 selectedProcedureItems를 추가하고, fetchProcedures에서 resetSelection 플래그를 통해 선택 상태를 유지하도록 구현했습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 이슈 #125의 범위 내에 있습니다. 선택된 시술 상태 보존을 위한 UI 상태 관리와 ViewModel 로직의 수정으로 정확히 의도된 기능을 구현하고 있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/src/main/java/com/cherrish/android/presentation/calendar/procedure/ProcedureViewModel.kt (1)

131-143: procedureItems 대신 selectedProcedureItems에서 조회해야 합니다.

검색 후 procedureItems에는 현재 검색 결과만 포함됩니다. 사용자가 시술을 선택한 후 다른 키워드로 검색하면, 선택된 시술이 procedureItems에 없을 수 있습니다. Downtime 단계에서 해당 시술 카드를 클릭하면 조회가 실패하여 bottom sheet가 표시되지 않습니다.

🐛 수정 제안
 fun onDowntimeClick(procedureId: Long) {
     _uiState.updateSuccess { current ->
-        val procedure = current.procedureItems.firstOrNull { it.id == procedureId }
+        val procedure = current.selectedProcedureItems.firstOrNull { it.id == procedureId }
             ?: return@updateSuccess current

         current.copy(
             selectedProcedureForDowntime = procedure,
             showDowntimeBottomSheet = true,
             downtimePickerValue = current.procedureDowntimeMap[procedureId]
                 ?: procedure.minDowntimeDays
         )
     }
 }

Copy link
Copy Markdown
Contributor

@nhyeonii nhyeonii left a comment

Choose a reason for hiding this comment

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

굿 👍

@usuuhyn usuuhyn merged commit cda7bd3 into develop Jan 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FIX🐛 오류 및 버그 수정 수현🍒 수현 담당

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 검색 뷰 이슈 해결

2 participants