Skip to content

fix: 세그먼트 미선택/무시된 스와이프에서 기록되던 식단 로깅 수정 - #556

Open
oeunji wants to merge 2 commits into
developfrom
fix/dining-logging
Open

fix: 세그먼트 미선택/무시된 스와이프에서 기록되던 식단 로깅 수정#556
oeunji wants to merge 2 commits into
developfrom
fix/dining-logging

Conversation

@oeunji

@oeunji oeunji commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

#️⃣연관된 이슈

📝작업 내용

세그먼트 미선택/무시된 스와이프에서 기록되던 식단 로깅 로직을 수정했습니다. 테스트 코드 두 개도 추가했습니다~

Summary by CodeRabbit

  • Bug Fixes

    • Prevented dining analytics events from being recorded when no valid dining segment is selected.
    • Prevented analytics events from being recorded for swipes that do not change the selected dining segment.
    • Improved handling of invalid segment selections and swipe boundaries to avoid unintended defaults.
  • Tests

    • Added coverage for invalid segment selections and ignored swipe gestures.

@oeunji
oeunji requested a review from hgjwilly September 6, 2026 07:04
@oeunji oeunji self-assigned this Sep 6, 2026
@oeunji oeunji added the FIX 버그 수정 label Sep 6, 2026
@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 8fb5aa7a-13e1-4d35-8343-548fe5b0c11b

📥 Commits

Reviewing files that changed from the base of the PR and between 0f8be9a and ed7831b.

📒 Files selected for processing (2)
  • Koin/Presentation/Dining/Dining/DiningViewController.swift
  • koinUnitTests/Dining/DiningLoggingTests.swift

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The dining controller now represents invalid segment selections with nil, skips related analytics events, and ignores out-of-bounds swipes. Tests verify that invalid selections and ignored swipes produce no events.

Changes

Dining analytics validity

Layer / File(s) Summary
Validate dining segments and event logging
Koin/Presentation/Dining/Dining/DiningViewController.swift
currentDiningType returns nil for invalid indices. Segment changes and analytics handlers return without action when no dining type exists. Swipe handling uses bounded index updates.
Verify suppressed analytics events
koinUnitTests/Dining/DiningLoggingTests.swift
Tests verify that invalid segment selections and ignored right swipes produce no analytics events.

Estimated code review effort: 3 (Moderate) | ~15–30 minutes

Merge Risk: ⚪ Minimal · up to ed783

유효하지 않은 식단 세그먼트와 경계를 벗어난 스와이프에서 잘못된 분석 이벤트가 기록되지 않도록 수정했으며, 해당 동작을 검증하는 테스트도 추가되었습니다. 현재 확인된 병합 차단 위험은 없습니다.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: preventing dining logging when no segment is selected or when a swipe is ignored.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dining-logging

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.

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: 세그먼트 미선택/무시된 스와이프에서 잘못 기록되던 식단 로깅 수정

1 participant