Skip to content

[Fix/#133] 굿즈 카테고리 QA 이슈 반영#134

Merged
jyvnee merged 3 commits intodevelopfrom
fix/#133-home-qa
Jan 23, 2026
Merged

[Fix/#133] 굿즈 카테고리 QA 이슈 반영#134
jyvnee merged 3 commits intodevelopfrom
fix/#133-home-qa

Conversation

@doyeon0307
Copy link
Contributor

@doyeon0307 doyeon0307 commented Jan 23, 2026

Related issue 🛠️

Work Description ✏️

  • 홈에 추천 굿즈 랜덤으로 왔다면 카테고리에 artistId=null 전달
  • 추천 굿즈 정렬 기본값 인기순으로 변경
  • 다른 굿즈 구경하기에 정렬 UI 제거 + 여백 추가
  • 참여뷰 입금 바텀시트 키보드 올라올 때 여백 조정

Screenshot 📸

다른 굿즈 구경하기 바텀시트 여백 조정
default.mp4

Uncompleted Tasks 😅

To Reviewers 📢

키보드 올라올 때 bottomPadding값이 분기로 변경되는데요
이때 바텀시트가 리컴포지션 되면서 뽀잉 하는 효과가 생깁니다
개선 방법을 찾기 어려워 일단 디쌤한테 갠찮다고 확인받고 올려요

Summary by CodeRabbit

릴리스 노트

  • 버그 수정

    • 아티스트 ID 검증 로직을 추가하여 불일치 상황 감지 및 처리 개선
  • 새로운 기능

    • 아티스트 ID 무효화 상태 추적 기능 추가
  • 개선사항

    • 마이 아티스트 화면에서 조건부 정렬 버튼 표시
    • 기본 정렬 순서를 인기순으로 변경

✏️ Tip: You can customize this high-level summary in your review settings.

@doyeon0307 doyeon0307 linked an issue Jan 23, 2026 that may be closed by this pull request
3 tasks
@doyeon0307 doyeon0307 requested a review from a team January 23, 2026 10:08
@doyeon0307 doyeon0307 self-assigned this Jan 23, 2026
@doyeon0307 doyeon0307 added 🛠️ Fix 버그 및 오류 해결 🐣 도연 labels Jan 23, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 23, 2026

📝 Walkthrough

Walkthrough

홈 추천 굿즈 조회 흐름에 artistId 일관성 검증(validateArtistId)과 이를 반영하는 상태(artistIdToNull)를 추가했습니다. 또한 상품 카테고리 화면에서 내 아티스트 여부에 따라 정렬 버튼 노출을 조건부로 변경하고, 카테고리 기본 정렬을 인기순으로 바꿨습니다.

Changes

Cohort / File(s) 변경 요약
홈 화면 상태 및 검증 로직
app/src/main/.../presentation/party/home/HomeViewModel.kt, app/src/main/.../presentation/party/home/model/Contracts.kt
HomeViewModel에 validateArtistId() 추가 및 성공 경로에서 호출. HomeUiStateartistIdToNull: Boolean 추가. OnMyArtistCategoryClick 처리 시 artistIdToNull에 따라 artistId를 null로 전달.
상품 카테고리 화면 UI
app/src/main/.../presentation/party/product/productcategory/ProductCategoryScreen.kt
ProductCategoryScreen 시그니처에 isMyArtsit: Boolean 추가 및 정렬 버튼을 해당 플래그로 조건부 렌더링(미노출 시 Spacer 사용). Preview 및 라우트 연동 업데이트.
상품 카테고리 기본 정렬 타입
app/src/main/.../presentation/party/product/productcategory/model/Contracts.kt
ProductCategoryUiState.selectedSortType 기본값을 ProductSortType.LATEST에서 ProductSortType.HOT으로 변경.
히스토리 입금 BottomSheet 레이아웃/IME 처리
app/src/main/.../presentation/history/participant/component/HistoryDepositBottomSheet.kt
IME 대응용 WindowInsets/ExperimentalLayoutApi 적용, sheetState/bottomPadding 계산 및 BottomSheetContent 분리·하위 컴포저블에 bottomPadding 전달. 입력 타입 및 레이아웃 패딩 동적 처리로 교체.

Sequence Diagram(s)

(생성 조건에 부합하지 않아 다이어그램을 생략했습니다.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

🔎 UI

Suggested reviewers

  • sonyerim
  • jyvnee
  • cmj7271
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
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.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 주요 변경사항인 '굿즈 카테고리 QA 이슈 반영'을 명확하게 설명하고 있습니다.
Description check ✅ Passed PR 설명이 템플릿 구조를 따르고 있으며, 관련 이슈(#133)와 구체적인 작업 내용(3가지)을 포함하고 있습니다.
Linked Issues check ✅ Passed 모든 코드 변경사항이 이슈 #133의 목표들을 충족합니다: artistId null 전달, 정렬 기본값 변경, 정렬 UI 제거가 구현되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 이슈 #133의 범위 내에 있으며, 무관한 변경사항은 발견되지 않았습니다.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@github-actions
Copy link

github-actions bot commented Jan 23, 2026

Ktlint check passed.

Run: https://github.com/team-poti/POTI-ANDROID/actions/runs/21284409081

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.

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (1)
app/src/main/java/com/poti/android/presentation/party/product/productcategory/ProductCategoryScreen.kt (1)

77-95: 정렬 바텀시트 노출 조건을 isMyArtsit와 동기화하세요.
정렬 버튼을 숨겨도, 상태가 남아 있으면 바텀시트가 노출될 수 있습니다. “다른 굿즈 구경하기”에서는 정렬 옵션이 절대 보이지 않도록 조건을 강화하는 편이 안전합니다.

✅ 제안 수정
-    if (isSortBottomSheetVisible) {
+    if (isMyArtsit && isSortBottomSheetVisible) {
         GoodsSortBottomSheet(
             selectedSortType = selectedSortType,
             onSelect = onSortSelect,
             onDismissRequest = onSortDismiss,
         )
     }
🤖 Fix all issues with AI agents
In `@app/src/main/java/com/poti/android/presentation/party/home/HomeViewModel.kt`:
- Around line 51-59: In validateArtistId(), avoid calling first() on an empty
myGroupItems and ensure artistIdToNull is reset when items are uniform: retrieve
content via getSuccessDataOrNull(), if content?.myGroupItems.isNullOrEmpty()
then call updateState { copy(artistIdToNull = false) } and return; otherwise
compare all items against first()/firstOrNull() safely to compute diff, and call
updateState { copy(artistIdToNull = true) } when diff is true and updateState {
copy(artistIdToNull = false) } when diff is false so the state is always
consistent.

Comment on lines +51 to +59
private fun validateArtistId() {
uiState.value.homeContentLoadState.getSuccessDataOrNull()?.let { content ->
val diff = content.myGroupItems.any { item ->
item.artistId != content.myGroupItems.first().artistId
}

if (diff) {
updateState { copy(artistIdToNull = true) }
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

빈 리스트 처리 및 상태 재설정이 필요합니다.
first()는 빈 리스트에서 크래시가 나며, diff가 false일 때 artistIdToNull이 복구되지 않아 이후 동작이 잘못될 수 있습니다.

🛠️ 제안 수정
-    private fun validateArtistId() {
-        uiState.value.homeContentLoadState.getSuccessDataOrNull()?.let { content ->
-            val diff = content.myGroupItems.any { item ->
-                item.artistId != content.myGroupItems.first().artistId
-            }
-
-            if (diff) {
-                updateState { copy(artistIdToNull = true) }
-            }
-        }
-    }
+    private fun validateArtistId() {
+        val items = uiState.value.homeContentLoadState
+            .getSuccessDataOrNull()
+            ?.myGroupItems
+            .orEmpty()
+
+        val firstArtistId = items.firstOrNull()?.artistId ?: run {
+            updateState { copy(artistIdToNull = false) }
+            return
+        }
+
+        val diff = items.any { it.artistId != firstArtistId }
+        updateState { copy(artistIdToNull = diff) }
+    }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
private fun validateArtistId() {
uiState.value.homeContentLoadState.getSuccessDataOrNull()?.let { content ->
val diff = content.myGroupItems.any { item ->
item.artistId != content.myGroupItems.first().artistId
}
if (diff) {
updateState { copy(artistIdToNull = true) }
}
private fun validateArtistId() {
val items = uiState.value.homeContentLoadState
.getSuccessDataOrNull()
?.myGroupItems
.orEmpty()
val firstArtistId = items.firstOrNull()?.artistId ?: run {
updateState { copy(artistIdToNull = false) }
return
}
val diff = items.any { it.artistId != firstArtistId }
updateState { copy(artistIdToNull = diff) }
}
🤖 Prompt for AI Agents
In `@app/src/main/java/com/poti/android/presentation/party/home/HomeViewModel.kt`
around lines 51 - 59, In validateArtistId(), avoid calling first() on an empty
myGroupItems and ensure artistIdToNull is reset when items are uniform: retrieve
content via getSuccessDataOrNull(), if content?.myGroupItems.isNullOrEmpty()
then call updateState { copy(artistIdToNull = false) } and return; otherwise
compare all items against first()/firstOrNull() safely to compute diff, and call
updateState { copy(artistIdToNull = true) } when diff is true and updateState {
copy(artistIdToNull = false) } when diff is false so the state is always
consistent.

@jyvnee jyvnee merged commit 85682ce into develop Jan 23, 2026
2 checks passed
@github-project-automation github-project-automation bot moved this from To-do to Done in POTI-ANDROID Jan 23, 2026
@jyvnee jyvnee deleted the fix/#133-home-qa branch January 23, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐣 도연 🛠️ Fix 버그 및 오류 해결

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Fix] 홈 카테고리 QA

2 participants