Skip to content

[fix]/#208 1차 스프린트 2차 qa 반영#209

Merged
KuKaH merged 2 commits intodevelopfrom
fix/#208-sprint1-qa2-hjb
Apr 10, 2026
Merged

[fix]/#208 1차 스프린트 2차 qa 반영#209
KuKaH merged 2 commits intodevelopfrom
fix/#208-sprint1-qa2-hjb

Conversation

@KuKaH
Copy link
Copy Markdown
Contributor

@KuKaH KuKaH commented Apr 9, 2026

✅ Check List

  • 팀원 전원의 Approve를 받은 후 머지해주세요.
  • 변경 사항은 500줄 이내로 유지해주세요.
  • Approve된 PR은 Assigner가 직접 머지해주세요.
  • 수정 요청이 있다면 반영 후 다시 push해주세요.

📌 Related Issue


📎 Work Description

  • 결과 입력 및 확인에서 점수 입력 기능 삭제에 따른 ui 반영
  • 지역변경 및 스포츠 변경 시 홈화면 즉시 갱신

📷 Screenshots

기능/화면 iPhone 11 Pro iPhone 16 Pro
A 기능
B 기능

💬 To Reviewers

  • 리뷰어에게 전달하고 싶은 메시지를 남겨주세요.

Summary by CodeRabbit

릴리스 노트

  • Bug Fixes

    • 스포츠 변경 후 뷰 새로고침 로직이 개선되어 상태 관리가 더 효율적으로 작동합니다.
  • Refactor

    • 매치 결과 카드의 점수 표시 UI가 단순화되었습니다. 개별 점수 대신 중앙 정렬된 "vs" 레이블만 표시됩니다.

@KuKaH KuKaH requested review from LJIN24 and Rudy-009 April 9, 2026 21:59
@KuKaH KuKaH self-assigned this Apr 9, 2026
@KuKaH KuKaH linked an issue Apr 9, 2026 that may be closed by this pull request
1 task
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

📝 Walkthrough

Walkthrough

스포츠 선택 후 프로필 새로고침 로직이 HomeViewController에 추가되었으며, MatchResultCardView에서 점수 표시 UI와 관련 공개 메서드가 제거되고 "vs" 라벨로 대체되었습니다.

Changes

Cohort / File(s) Summary
HomeViewController 스포츠 변경 새로고침 로직
SMASHING/Presentation/Home/HomeViewController.swift
스포츠 선택 시 shouldRefreshAfterSportChange 플래그를 설정하고, myProfileFetched sink에서 조건부로 viewWillAppear 이벤트를 전송하도록 수정. AddressSearchViewControllerupdateRegion sink도 약한 참조로 변경되었습니다.
MatchResultCardView 점수 UI 제거
SMASHING/Presentation/MatchResultCreate/MatchResultComponents/MatchResultCardView.swift
점수 상태(currentMyScore, currentRivalScore)와 점수 표시 UI 요소 제거. updateScore(), getMyScore(), getRivalScore() 공개 메서드 제거 및 단일 "vs" 라벨로 대체.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • Rudy-009
  • LJIN24
🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (1 warning, 2 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive 제목은 이슈 #208과 관련이 있지만 구체적인 변경 사항을 명확하게 설명하지 못하고 있습니다. 제목을 더 구체적으로 변경하세요. 예: '[fix] 점수 입력 삭제 및 홈 화면 즉시 갱신' 또는 '[fix/#208] 결과 입력 UI 및 홈 화면 갱신 기능 개선'
Linked Issues check ❓ Inconclusive 링크된 이슈 #208은 구체적인 작업 항목이 명시되지 않아 코드 변경사항 검증이 어렵지만, PR의 변경사항(점수 입력 기능 제거, 홈 화면 갱신)이 QA 반영 목적과 일치합니다. 이슈 #208의 '세부적으로 적어주세요' 항목을 명확히 작성하여 구체적인 요구사항을 문서화하세요.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed PR 설명이 기본 템플릿을 따르고 있으며, 관련 이슈, 작업 설명, 스크린샷이 포함되어 있습니다.
Out of Scope Changes check ✅ Passed HomeViewController와 MatchResultCardView의 변경사항은 모두 PR 목표인 점수 입력 기능 제거와 홈 화면 갱신 기능에 직접적으로 관련되어 있습니다.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#208-sprint1-qa2-hjb

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: 1

🧹 Nitpick comments (1)
SMASHING/Presentation/Home/HomeViewController.swift (1)

261-262: 수동 refresh에 .viewWillAppear를 재사용하지 않는 편이 좋습니다.

현재 HomeViewModel.viewWillAppear마다 바로 fetchHomeData()를 수행합니다. 비수명주기 코드에서 같은 input을 수동으로 보내면 실제 viewWillAppear(_:)와 겹칠 때 동일 fetch가 중첩되고, 호출 의도도 흐려집니다. refreshHome 같은 별도 input으로 분리해 두면 중복 요청 제어와 추적이 훨씬 쉬워집니다.

Also applies to: 430-432

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@SMASHING/Presentation/Home/HomeViewController.swift` around lines 261 - 262,
The view lifecycle input `.viewWillAppear` is being reused for manual refreshes
which causes overlapping/duplicate fetches; add a new input case (e.g.,
`.refreshHome`) to HomeViewModel and handle it by invoking `fetchHomeData()` (or
the same fetching logic) separately from `.viewWillAppear`, then update
HomeViewController to send `.refreshHome` instead of `.viewWillAppear` for
manual refresh actions (replace occurrences where
`self.input.send(.viewWillAppear)` is used for user-initiated refreshes,
including the other instance referenced).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@SMASHING/Presentation/Home/HomeViewController.swift`:
- Line 31: Replace the Boolean flag shouldRefreshAfterSportChange with an
optional pendingSportCode (e.g., String?) and change the logic around where you
set and consume that flag: when initiating a sport change set pendingSportCode =
newSportCode instead of true; in the myProfileFetched response handler compare
response.activeProfile.sportCode to pendingSportCode and only call
fetchHomeData() and clear pendingSportCode when they match; ensure other code
paths (e.g., viewWillAppear responses) do not blindly refresh when
pendingSportCode is non-nil and clear pendingSportCode only after a successful
matching refresh.

---

Nitpick comments:
In `@SMASHING/Presentation/Home/HomeViewController.swift`:
- Around line 261-262: The view lifecycle input `.viewWillAppear` is being
reused for manual refreshes which causes overlapping/duplicate fetches; add a
new input case (e.g., `.refreshHome`) to HomeViewModel and handle it by invoking
`fetchHomeData()` (or the same fetching logic) separately from
`.viewWillAppear`, then update HomeViewController to send `.refreshHome` instead
of `.viewWillAppear` for manual refresh actions (replace occurrences where
`self.input.send(.viewWillAppear)` is used for user-initiated refreshes,
including the other instance referenced).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 847a4fc9-2158-4588-9f24-677c25a9ae7c

📥 Commits

Reviewing files that changed from the base of the PR and between 7b04816 and cd0c695.

📒 Files selected for processing (2)
  • SMASHING/Presentation/Home/HomeViewController.swift
  • SMASHING/Presentation/MatchResultCreate/MatchResultComponents/MatchResultCardView.swift
📜 Review details
🔇 Additional comments (1)
SMASHING/Presentation/MatchResultCreate/MatchResultComponents/MatchResultCardView.swift (1)

42-45: 점수 UI 제거 방향과 잘 맞습니다.

vs 라벨로 역할을 단순화한 변경이 PR 목적과 일치하고, 제공된 상위 뷰 사용처 기준으로도 공개 API 축소가 안전해 보입니다. 중앙 정렬 제약도 현재 카드 레이아웃과 자연스럽게 맞습니다.

Also applies to: 77-77, 105-108


private var tooltipView: TooltipView?
private var tooltipDismissTap: UITapGestureRecognizer?
private var shouldRefreshAfterSportChange = false
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

스포츠 변경 완료를 Bool 플래그 하나로 추적하면 잘못된 프로필 응답에 반응할 수 있습니다.

myProfileFetched는 초기 로드/재진입/스포츠 변경 결과를 모두 타는 스트림인데, 지금 구조에서는 어떤 응답이 먼저 와도 shouldRefreshAfterSportChange == true면 홈을 새로고침합니다. 기존 .viewWillAppear 요청의 응답이 늦게 도착하면 변경 전 sport 기준으로 fetchHomeData()가 먼저 실행되고, 실제 sport 변경 완료 응답에서는 플래그가 이미 내려가 후속 갱신이 빠질 수 있습니다. Bool 대신 pending sport 값을 들고 있다가 response.activeProfile.sportCode와 일치할 때만 refresh 하도록 묶는 편이 안전합니다.

예시 방향
-    private var shouldRefreshAfterSportChange = false
+    private var pendingSportRefresh: Sports?

...
-                if self.shouldRefreshAfterSportChange {
-                    self.shouldRefreshAfterSportChange = false
+                if self.pendingSportRefresh == response.activeProfile.sportCode {
+                    self.pendingSportRefresh = nil
                     self.input.send(.viewWillAppear)
                 }

...
-                    self.shouldRefreshAfterSportChange = true
+                    self.pendingSportRefresh = sport
                     self.myProfileInput.send(.sportsCellTapped(sport))

Also applies to: 259-262, 639-640

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@SMASHING/Presentation/Home/HomeViewController.swift` at line 31, Replace the
Boolean flag shouldRefreshAfterSportChange with an optional pendingSportCode
(e.g., String?) and change the logic around where you set and consume that flag:
when initiating a sport change set pendingSportCode = newSportCode instead of
true; in the myProfileFetched response handler compare
response.activeProfile.sportCode to pendingSportCode and only call
fetchHomeData() and clear pendingSportCode when they match; ensure other code
paths (e.g., viewWillAppear responses) do not blindly refresh when
pendingSportCode is non-nil and clear pendingSportCode only after a successful
matching refresh.

Copy link
Copy Markdown
Contributor

@LJIN24 LJIN24 left a comment

Choose a reason for hiding this comment

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

어완

@KuKaH KuKaH merged commit b9741e6 into develop Apr 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] 1차 스프린트 2차 QA

3 participants