[Fix] #868 - QA 반영#873
Conversation
개요포크 로그 화면의 라우팅 이슈를 해결하기 위해 ViewModel의 셀 탭 이벤트 처리에 섹션 필터를 추가하고, UseCase의 비동기 요청 실패 시 안전한 오류 처리 및 메모리 누수 방지를 개선합니다. 변경사항포크 라우팅 및 메모리 안전성
추정 코드 리뷰 난이도🎯 2 (단순) | ⏱️ ~8분 추천 검토자
시적 축하
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
SOPT-iOS/Projects/Domain/Sources/UseCase/PokeMainUseCase.swift (1)
73-75: 💤 Low value네트워크 실패 시 사용자 피드백 고려 검토
현재 실패 시 빈 데이터를 조용히 방출하는 방식은
getFriend()와 일관된 패턴이지만, 네트워크 오류나 서버 장애 시 사용자에게 간단한 알림(예: 토스트 메시지)을 제공하는 것을 고려해볼 수 있습니다. 다만 현재 패턴도 충분히 허용 가능한 UX입니다.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@SOPT-iOS/Projects/Domain/Sources/UseCase/PokeMainUseCase.swift` around lines 73 - 75, The failure branch currently swallows errors by sending an empty PokeFriendRandomUserModel; instead emit a user-visible error/feedback signal: capture the failure case in the getFriend() subscriber and either send an error state through an existing publisher (e.g., a new or existing errorPublisher) or call a UI feedback handler to show a toast; update the failure branch that references friendRandomUsers and PokeFriendRandomUserModel so it sends an error payload (or triggers showError(_:)) with the underlying error information rather than silently sending an empty list.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@SOPT-iOS/Projects/Domain/Sources/UseCase/PokeMainUseCase.swift`:
- Around line 73-75: The failure branch currently swallows errors by sending an
empty PokeFriendRandomUserModel; instead emit a user-visible error/feedback
signal: capture the failure case in the getFriend() subscriber and either send
an error state through an existing publisher (e.g., a new or existing
errorPublisher) or call a UI feedback handler to show a toast; update the
failure branch that references friendRandomUsers and PokeFriendRandomUserModel
so it sends an error payload (or triggers showError(_:)) with the underlying
error information rather than silently sending an empty list.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f385b3ec-1753-46d0-9277-78743b456b33
📒 Files selected for processing (2)
SOPT-iOS/Projects/Domain/Sources/UseCase/PokeMainUseCase.swiftSOPT-iOS/Projects/Features/SoptlogFeature/Sources/SoptlogScene/ViewModel/SoptlogViewModel.swift
| .sink { [weak self] event in | ||
| print("GetFriendRandomUser State: \(event)") | ||
| if case .failure = event { | ||
| self?.friendRandomUsers.send(PokeFriendRandomUserModel(randomInfoList: [])) |
There was a problem hiding this comment.
빈 배열을 보내면 조용한 실패로 리프레시 후 추천 친구 목록이 사라지게 되어 어색한 플로우가 될 것 같습니다.
빈 배열 대신 Error를 ViewModel에 보내 ViewModel이 네트워크 에러 모달을 띄워주도록 하는건 어떠신가요?
There was a problem hiding this comment.
요 경우가 Publisher3로 use case 3개의 결과를 받아서 처리하는 부분인데,
나머지 usecase들이 빈 배열을 보내고 있어서 비슷하게 처리했습니다!
저도 어색하게 느껴지긴 했어서 나머지 usecase들이 실패했을 때에도 모달 띄우도록 수정해볼게용 !
🌴 PR 요약
🌱 작업한 브랜치
🌱 PR Point
getFriendRandomUser실패 시 아무 값도 방출하지 않아Publishers.Zip3가 완료되지 않는 문제가 있었습니다.실패 시 빈
PokeFriendRandomUserModel을 방출하도록 처리해endRefreshLoading이 정상적으로 호출되도록 수정했습니다.📌 참고 사항
📮 관련 이슈