Skip to content

[Fix] 루틴 등록 및 수정 QA 대응#83

Merged
taipaise merged 1 commit intodevelopfrom
fix/routine-registration
Feb 16, 2026
Merged

[Fix] 루틴 등록 및 수정 QA 대응#83
taipaise merged 1 commit intodevelopfrom
fix/routine-registration

Conversation

@taipaise
Copy link
Collaborator

@taipaise taipaise commented Feb 16, 2026

🌁 Background

  • 루틴 등록/수정 QA 대응 (1차)

👩‍💻 Contents

📝 Review Note

Summary by CodeRabbit

릴리스 노트

  • 리팩토링
    • 루틴 생성 시 서브루틴 최대 개수 제한 설정 (최대 3개)
    • 루틴 생성 화면의 서브루틴 이름 입력란에서 정보 아이콘 제거
    • 루틴 저장 시 빈 서브루틴 필터링을 통한 데이터 정리 및 유효성 검증 기능 개선

- 세부루틴 옆 i 버튼 삭제
- 수정하기에서 세부 루틴 수정 안되는 문제 해결
@coderabbitai
Copy link

coderabbitai bot commented Feb 16, 2026

Walkthrough

루틴 생성 화면의 UI 요소를 수정하고, 서브루틴 관리 로직을 강화했습니다. 서브루틴 정보 이미지 표시 비활성화, 최대 개수 제한(3개), 기간 정보 우선 전송, 빈 항목 필터링 기능을 추가했습니다.

Changes

Cohort / File(s) Summary
UI 컴포넌트
Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationViewController.swift
서브루틴명 뷰(subRoutineNameView) 초기화 시 정보 이미지 표시를 비활성화(withInfoImage: false)
상태 관리 및 비즈니스 로직
Projects/Presentation/Sources/RoutineCreation/ViewModel/RoutineCreationViewModel.swift
최대 서브루틴 개수 제한(3개) 추가, 기간 정보 계산 및 우선 전송 구현, 빈 서브루틴 필터링 기능 추가, 서브루틴 배열 패딩 로직 도입

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 서브루틴, 셋의 마법으로 정렬되고
빈 자리를 다듬어 깔끔하게 정돈하고
기간의 정보는 가장 먼저 전해지네
UI는 더 간결해져 사용자 맘 사로잡고
루틴 생성의 꿈, 한 걸음 더 다가가네! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Title check ❓ Inconclusive PR 제목은 QA 대응이라는 일반적인 표현을 사용하고 있으며, 실제 변경사항(날짜 적용 수정, 정보 버튼 제거, 서브루틴 수정 기능)을 구체적으로 명시하지 않아 의미가 모호합니다. 제목을 더 구체적으로 수정하세요. 예: '[Fix] 루틴 수정 시 날짜 적용 및 서브루틴 편집 기능 수정' 또는 주요 변경사항을 명확히 반영하는 표현을 사용하세요.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into develop

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/routine-registration

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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

@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.

Caution

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

⚠️ Outside diff range comments (2)
Projects/Presentation/Sources/RoutineCreation/ViewModel/RoutineCreationViewModel.swift (2)

186-197: ⚠️ Potential issue | 🟠 Major

fetchRecommendedRoutine에서 서버 응답 subRoutines 필터링 필요

서버 응답에서 subRoutines이 3개를 초과할 경우, 4번째 이상 요소들도 모두 subRoutinesSubject에 저장됩니다. configureSubroutine은 인덱스 3 이상의 수정을 차단하지만, 이미 저장된 4번째+ 요소는 그대로 유지되며 루틴 등록 시 서버로 전송됩니다.

UI는 3개까지만 표시하므로(RoutineNameContentView.swift), 내부 상태와 UI 간 불일치 발생합니다.

권장 수정
// fetchRecommendedRoutine의 173번 줄 부분
let subRoutines = routine.subRoutines.prefix(maxSubRoutineCount).map { $0.title }

또는 fetchRecommendedRoutine 함수 내에서 응답을 명시적으로 필터링하여 maxSubRoutineCount 이하로 제한해야 합니다.


254-295: ⚠️ Potential issue | 🟠 Major

registerRoutine의 빈 catch 블록과 비동기 처리 — 저장 실패가 사용자에게 숨겨짐

Lines 254-295의 registerRoutine 메서드가 Task 내에서 비동기로 실행되는데, ViewController(Line 147)는 이 작업의 완료를 기다리지 않고 즉시 화면을 pop합니다. 동시에 Lines 292-294의 빈 catch 블록으로 인해 saveRoutine 실패가 완전히 무시됩니다. 결과적으로 저장이 실패해도 화면이 닫히고 사용자는 성공으로 인식하게 됩니다.

필요한 개선:

  • 저장 성공/실패 상태를 ViewController에 알릴 수 있는 메커니즘 추가 (예: Publisher, Delegate, 또는 completion handler)
  • ViewController에서 저장 완료를 기다린 후에만 화면 전환
  • 저장 실패 시 사용자에게 에러 알림 표시
🧹 Nitpick comments (1)
Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationViewController.swift (1)

144-162: registerRoutine 호출 후 완료 대기 없이 즉시 화면 전환

viewModel.action(input: .registerRoutine)은 내부적으로 Task를 통해 비동기 saveRoutine을 호출하지만, ViewController에서는 완료 콜백이나 결과를 기다리지 않고 즉시 popViewController/popToRootViewController를 수행합니다. 네트워크 저장이 실패하더라도 사용자는 성공한 것처럼 이전 화면으로 돌아가게 됩니다.

이상적으로는 저장 성공/실패에 따라 화면 전환을 제어해야 하지만, 이번 QA 수정 범위 밖일 수 있으므로 후속 개선 사항으로 기록해두시면 좋겠습니다.

@taipaise taipaise merged commit 7fd4e4f into develop Feb 16, 2026
2 checks passed
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.

1 participant