Skip to content

[FIX] 루틴 등록/수정 로직 수정#55

Merged
taipaise merged 1 commit intodevelopfrom
fix/routine-creation
Aug 22, 2025
Merged

[FIX] 루틴 등록/수정 로직 수정#55
taipaise merged 1 commit intodevelopfrom
fix/routine-creation

Conversation

@taipaise
Copy link
Copy Markdown
Collaborator

@taipaise taipaise commented Aug 22, 2025

👩‍💻 Contents

  • 서브 루틴이 정상적으로 등록/수정되도록 함
  • 루틴 등록 시 이전 화면으로 이동

📝 Review Note

  • 키보드 영역 밖을 누르면 키보드가 내려가는 로직 부분이 미흡합니다.
  • 루틴 등록을 위한 각 cardView를 탭할 때 키보드가 내려가지 않는 문제가 있습니다. 빠르게 시정하겠습니다.

📣 Related Issue

  • close #

📬 Reference

Summary by CodeRabbit

  • 신기능
    • 입력 영역 밖을 탭하면 키보드가 내려가며, 스크롤 제스처로도 부드럽게 닫힙니다.
    • 버튼 등 UI 컨트롤의 터치는 제스처에 방해받지 않도록 안전하게 동작합니다.
    • 루틴 등록 완료 후 이전 화면으로 자동 이동합니다.
    • 루틴 생성 시 기본 하위 항목 3개가 미리 제공되어 즉시 편집할 수 있습니다.
    • 초기 유효성 상태가 즉시 반영되어 유효성 표시가 더 일관됩니다.

@taipaise taipaise self-assigned this Aug 22, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 22, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

RoutineCreationViewController adds tap-to-dismiss keyboard, interactive keyboard dismissal, and pops the controller after successful register. It now conforms to UIGestureRecognizerDelegate to avoid intercepting UIControl touches. RoutineCreationViewModel initializes with three empty subroutines, uses CurrentValueSubject for validity with initial false, updates initial validity, and preserves three placeholders on delete-all.

Changes

Cohort / File(s) Summary
Keyboard dismissal & navigation in VC
Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationViewController.swift
Adds UITapGestureRecognizer with cancelsTouchesInView=false and delegate to ignore UIControls; implements dismissKeyboard(); sets scrollView.keyboardDismissMode = .interactive; after register action, pops the view controller; adds UIGestureRecognizerDelegate extension.
ViewModel defaults & validity publisher
Projects/Presentation/Sources/RoutineCreation/ViewModel/RoutineCreationViewModel.swift
Initializes subRoutinesSubject with ["", "", ""]; changes checkRoutinePublisher to CurrentValueSubject(false); invokes updateIsRoutineValid() post-Output creation; on deleteAllSubRoutines, resets to three placeholders; minor formatting.

Sequence Diagram(s)

sequenceDiagram
  participant U as User
  participant VC as RoutineCreationViewController
  participant VM as RoutineCreationViewModel
  participant Nav as UINavigationController

  rect rgba(230,245,255,0.6)
  note right of VC: Keyboard dismissal
  U->>VC: Tap outside input
  VC->>VC: dismissKeyboard() (view.endEditing)
  VC-->>U: Keyboard dismissed
  end

  rect rgba(240,255,240,0.6)
  note right of VC: Register flow (post-success)
  U->>VC: Tap Register
  VC->>VM: action(.registerRoutine)
  VM-->>VC: Completion/success signal
  VC->>Nav: popViewController(animated: true)
  Nav-->>U: Return to previous screen
  end
Loading
sequenceDiagram
  participant VM as RoutineCreationViewModel
  participant UI as Bound UI

  rect rgba(255,248,230,0.6)
  note over VM: Initialization
  VM->>VM: subRoutinesSubject = ["", "", ""]
  VM->>VM: checkRoutinePublisher = CurrentValueSubject(false)
  VM->>VM: updateIsRoutineValid()
  VM-->>UI: Emit initial validity state
  end

  rect rgba(255,240,245,0.6)
  note over VM: Delete all subroutines
  UI->>VM: action(.deleteAllSubRoutines)
  VM->>VM: subRoutinesSubject = ["", "", ""]
  VM-->>UI: Updated list and validity
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

꼬깃꼬깃 귀 세우고 탭—톡! 키보드 쏙 숨어들고,
세 칸의 빈 습관 씨앗, 바람 따라 흔들리고.
등록이면 퐁—뒤로 한 걸음, 길은 또 이어지고.
조심조심 제스처는 버튼들을 비켜가고.
오늘도 토끼는 깡충, 흐름은 말끔히 정리됐죠 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 2da89e0 and cec78e8.

📒 Files selected for processing (2)
  • Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationViewController.swift (4 hunks)
  • Projects/Presentation/Sources/RoutineCreation/ViewModel/RoutineCreationViewModel.swift (3 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/routine-creation

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary or @coderabbitai 요약 to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@taipaise taipaise merged commit 63775d6 into develop Aug 22, 2025
1 of 2 checks passed
@taipaise taipaise deleted the fix/routine-creation branch February 17, 2026 11:55
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