Skip to content

Bugfix/#65 2차 자체 QA 버그 수정#67

Merged
DongChyeon merged 12 commits intodevelopfrom
bugfix/#65-qa-2
Mar 11, 2026
Merged

Bugfix/#65 2차 자체 QA 버그 수정#67
DongChyeon merged 12 commits intodevelopfrom
bugfix/#65-qa-2

Conversation

@DongChyeon
Copy link
Member

@DongChyeon DongChyeon commented Mar 10, 2026

🛠 Related issue

closed #65

어떤 변경사항이 있었나요?

  • 🐞 BugFix Something isn't working
  • 🎨 Design Markup & styling
  • 📃 Docs Documentation writing and editing (README.md, etc.)
  • ✨ Feature Feature
  • 🔨 Refactor Code refactoring
  • ⚙️ Setting Development environment setup
  • ✅ Test Test related (Junit, etc.)

✅ CheckPoint

PR이 다음 요구 사항을 충족하는지 확인하세요.

  • PR 컨벤션에 맞게 작성했습니다. (필수)
  • merge할 브랜치의 위치를 확인해 주세요(main❌/develop⭕) (필수)
  • Approve된 PR은 assigner가 머지하고, 수정 요청이 온 경우 수정 후 다시 push를 합니다. (필수)
  • BugFix의 경우, 버그의 원인을 파악하였습니다. (선택)

✏️ Work Description

🐞 BugFix

  • 로그인 성공 시 백스택 미제거

    • 원인: onLoginSuccess에서 popUpTo(SPLASH_ROUTE)를 사용했으나, navigateToLogin() 호출 시점에 이미 SPLASH_ROUTE가 백스택에서 제거된 상태라 AUTH_ROUTE가 잔류
    • 수정: popUpTo(AUTH_ROUTE) { inclusive = true }로 변경 (BuyOrNotNavHost.kt)
  • 투표 피드 중복 업로드

    • 원인: 업로드 버튼 활성화 조건에 isLoading 체크 누락
    • 수정: uiState.isLoading 중 업로드 버튼 비활성화 및 ViewModel에서 이중 호출 방어 (UploadScreen.kt, UploadViewModel.kt)
  • 회원탈퇴 다이얼로그 미노출

    • 원인: WithdrawalScreen에서 onShowWithdrawalDialog / onDismissWithdrawalDialog 콜백이 전달되지 않음
    • 수정: 누락된 콜백 연결 (WithdrawalScreen.kt)
  • 투표 낙관적 업데이트 시 득표율 노출

    • 원인: 낙관적 업데이트로 투표 수가 임시 변경될 때 투표 결과(득표율 바)가 노출됨
    • 수정: API 응답 확정 전까지 UI에 결과를 반영하지 않도록 처리 (HomeViewModel.kt)

✨ Feature

  • Pull To Refresh 구현

    • HomeUiStateisRefreshing 상태 추가
    • HomeIntent.Refresh 추가
    • Material3 PullToRefreshBoxLazyColumn 감싸기
    • PTR 시 isLoading(전체 화면 스피너) 대신 isRefreshing을 사용해 기존 피드를 유지한 채로 갱신
  • 필터 변경 시 깜빡임 방지

    • 필터 칩 선택 시 기존 피드 목록을 비우지 않고 유지(clearFeeds = false)
    • API 응답이 오면 조용히 교체 → 화면 깜빡임 최소화

🔨 Refactor

  • HomeScreen 헤더 구현 단순화

    • 기존: SubcomposeLayout으로 TopBar·Tab 높이를 별도 측정 → NestedScrollConnection + offset으로 수동 제어
    • 변경: TopBar를 LazyColumn의 일반 item으로, Tab을 stickyHeader로 배치
    • 제거: SubcomposeLayout, HomeHeader composable, NestedScrollConnection, topBarHeightPx/tabHeightPx state (HomeScreen.kt)
  • HomeViewModel 리팩토링

    • cachedFeeds 제거 → 탭/필터 변경 시 API를 직접 호출하도록 변경
    • FilterChip.toFeedStatus() 추가: 필터 칩 선택 값을 API feedStatus 파라미터("OPEN" / "CLOSED" / null)로 변환하여 서버 사이드 필터링
    • applyFiltering() 제거 → loadFeeds() 내에서 결과를 바로 state에 반영

😅 Uncompleted Tasks

N/A

📢 To Reviewers

클로드는 신이예요

📃 RCA 룰

  • R: 꼭 반영해 주세요. 적극적으로 고려해 주세요. (Request changes)
  • C: 웬만하면 반영해 주세요. (Comment)
  • A: 반영해도 좋고 넘어가도 좋습니다. 그냥 사소한 의견입니다. (Approve)

Summary by CodeRabbit

  • 버그 수정

    • 업로드 중 중복 제출 방지 및 로딩 중 제출 버튼 비활성화
    • 투표 검증 강화 및 실패 시 해당 항목만 이전 상태로 복원
  • 개선 사항

    • 홈 화면 레이아웃 단순화, 피드 내 헤더 통합 및 스티키 탭 적용
    • 당겨서 새로고침 지원(isRefreshing/새로고침 동작 추가) 및 새로고침 UX 개선
    • 로그인 후 뒤로가기 동작 변경(로그인 후 백스택 처리 개선)
    • 스낵바가 하단 내비게이션 여백을 반영하도록 레이아웃 조정
    • 회원탈퇴 대화상자 제어 콜백 추가

@DongChyeon DongChyeon requested a review from Imagine-Choi March 10, 2026 11:35
@DongChyeon DongChyeon self-assigned this Mar 10, 2026
@DongChyeon DongChyeon added 🛠️ FIX 버그 및 문제 해결 💪 동현동현동현 ♻️ REFACTOR 코드 리팩토링 labels Mar 10, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

Walkthrough

로그인 후 백스택 정리 대상 변경, 홈 화면 레이아웃을 LazyColumn 내로 재구성해 새로고침/낙관적 투표 흐름을 도입(롤백 지원), 스낵바 하단 패딩 적용, 회원 탈퇴 다이얼로그 콜백 노출, 업로드 중복 제출 방지 로직 추가.

Changes

Cohort / File(s) Summary
네비게이션 백스택 관리
app/src/main/java/com/sseotdabwa/buyornot/navigation/BuyOrNotNavHost.kt
로그인 성공 시 navOptions의 popUpTo 대상이 SPLASH_ROUTE에서 AUTH_ROUTE로 변경되어 로그인 후 백스택 초기화 대상이 수정됨.
디자인시스템 - 스낵바 레이아웃
core/designsystem/src/main/java/com/sseotdabwa/buyornot/core/designsystem/components/SnackBar.kt
스낵바 호스트 modifier에 navigationBarsPadding() 추가로 하단 내비게이션 영역 패딩 적용.
홈 화면 UI 재구성
feature/home/src/main/java/.../ui/HomeScreen.kt, feature/home/src/main/java/.../ui/HomeFeedList*
상단 바/탭을 LazyColumn 내부로 이동, 중첩 스크롤·측정 로직 제거, PullToRefreshBox 도입, 헤더/탭을 리스트 항목(stickyHeader 포함)으로 통합.
홈 상태·로직 변경(투표/리프레시/페이징)
feature/home/src/main/java/.../ui/HomeViewModel.kt, feature/home/src/main/java/.../ui/HomeContract.kt
UI 상태를 단일 소스로 전환, isRefreshing 상태·Refresh 인텐트 추가, 필터를 API 파라미터화, optimisticVoteUpdate(낙관적 업데이트 + 실패 시 롤백) 및 투표 유효성 검사(자기 투표/마감/중복) 도입.
회원 탈퇴 다이얼로그 제어 노출
feature/mypage/src/main/java/.../ui/WithdrawalScreen.kt
WithdrawalScreen 시그니처에 onShowWithdrawalDialogonDismissWithdrawalDialog 콜백 추가(기본값 유지).
업로드 중복 제출 방지
feature/upload/src/main/java/.../ui/UploadScreen.kt, feature/upload/src/main/java/.../ui/UploadViewModel.kt
UI의 제출 가능성 판정에 isLoading 검사 추가 및 ViewModel의 submitFeed에서 이미 로딩 중이면 조기 반환하여 동시 제출 차단.

Sequence Diagram

sequenceDiagram
    participant User as 사용자
    participant UI as HomeScreen UI
    participant VM as HomeViewModel
    participant Cache as LocalState
    participant Server as Backend(API)
    rect rgba(200,200,255,0.5)
    Note over UI,VM: 사용자가 투표를 시도
    end
    User->>UI: 투표 클릭
    UI->>VM: handleVote(itemId, choice)
    VM->>VM: 소유자/종료/중복 검사
    alt 검사 실패
        VM->>UI: 에러 이벤트 (스낵바)
    else 검사 통과
        VM->>Cache: optimisticVoteUpdate (UI 즉시 변경)
        VM->>Server: 투표 요청 전송
        alt 서버 성공
            Server-->>VM: 최종 결과
            VM->>Cache: 서버 결과로 확정
            VM->>UI: 성공 이벤트
        else 서버 실패
            Server-->>VM: 에러 응답
            VM->>Cache: 이전 상태로 롤백
            VM->>UI: 실패 이벤트 (스낵바)
        end
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • Imagine-Choi
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Out of Scope Changes check ❓ Inconclusive 대부분의 변경사항은 이슈 #65와 관련이 있으나, HomeScreen의 SubcomposeLayout 제거 및 구조 개선은 명시된 버그 요구사항을 초과하는 리팩토링으로 보입니다. HomeScreen 리팩토링의 범위를 명확히 하고, nested scroll 오류 해결과의 직접적 관계를 문서화하는 것이 좋습니다.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 '2차 자체 QA 버그 수정'이라는 실제 변경사항과 관련이 있으나, 한국어와 이슈 번호만 포함되어 있어 구체적인 내용을 파악하기 어렵습니다.
Linked Issues check ✅ Passed PR은 이슈 #65의 모든 주요 요구사항을 충족합니다: 중복 투표 방지(isLoading 가드), 탈퇴 다이얼로그 콜백 연결, 낙관적 업데이트 개선, 백스택 초기화(AUTH_ROUTE), Pull-to-Refresh 기능 추가.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/#65-qa-2

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

@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.

Caution

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

⚠️ Outside diff range comments (1)
core/designsystem/src/main/java/com/sseotdabwa/buyornot/core/designsystem/components/SnackBar.kt (1)

151-156: ⚠️ Potential issue | 🟡 Minor

KDoc 문서가 실제 구현과 일치하지 않습니다.

Line 155에서 "Mutex를 사용하여 순차적으로 처리합니다"라고 설명하고 있지만, Mutex가 제거되었습니다. 현재 구현은 이전 스낵바를 즉시 dismiss하고 새 메시지로 교체하는 방식입니다.

📝 문서 수정 제안
 * 이 함수는 suspend 함수로, 스낵바가 사라질 때까지 대기합니다.
- * 동시에 여러 스낵바가 표시되지 않도록 Mutex를 사용하여 순차적으로 처리합니다.
+ * 새로운 스낵바 표시 요청 시 기존 스낵바를 즉시 dismiss하여 항상 최신 메시지만 표시합니다.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@core/designsystem/src/main/java/com/sseotdabwa/buyornot/core/designsystem/components/SnackBar.kt`
around lines 151 - 156, The KDoc for the SnackBar implementation incorrectly
says a Mutex is used to serialize snackbars; update the comment for the SnackBar
function (SnackBar in SnackBar.kt) to reflect the current behavior: remove any
mention of Mutex and state sequential queuing, and instead document that the
implementation immediately dismisses the previous snackbar and replaces it with
the new message, and that the function is suspend and waits until the displayed
snackbar disappears.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In
`@core/designsystem/src/main/java/com/sseotdabwa/buyornot/core/designsystem/components/SnackBar.kt`:
- Around line 151-156: The KDoc for the SnackBar implementation incorrectly says
a Mutex is used to serialize snackbars; update the comment for the SnackBar
function (SnackBar in SnackBar.kt) to reflect the current behavior: remove any
mention of Mutex and state sequential queuing, and instead document that the
implementation immediately dismisses the previous snackbar and replaces it with
the new message, and that the function is suspend and waits until the displayed
snackbar disappears.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: b7baf244-383d-4530-a4e4-061762049e06

📥 Commits

Reviewing files that changed from the base of the PR and between 786be1b and d7855ad.

📒 Files selected for processing (7)
  • app/src/main/java/com/sseotdabwa/buyornot/navigation/BuyOrNotNavHost.kt
  • core/designsystem/src/main/java/com/sseotdabwa/buyornot/core/designsystem/components/SnackBar.kt
  • feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeScreen.kt
  • feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeViewModel.kt
  • feature/mypage/src/main/java/com/sseotdabwa/buyornot/feature/mypage/ui/WithdrawalScreen.kt
  • feature/upload/src/main/java/com/sseotdabwa/buyornot/feature/upload/ui/UploadScreen.kt
  • feature/upload/src/main/java/com/sseotdabwa/buyornot/feature/upload/ui/UploadViewModel.kt

@DongChyeon DongChyeon changed the title Bugfix/#65 2차 자체 QA 버그 수 Bugfix/#65 2차 자체 QA 버그 수정 Mar 10, 2026
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: 4

Caution

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

⚠️ Outside diff range comments (1)
feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeViewModel.kt (1)

147-165: ⚠️ Potential issue | 🟠 Major

이전 요청의 늦은 응답이 현재 탭/필터를 덮어쓸 수 있습니다.

Line 147에서 requestedFilter를 잡아두지만 Line 163에서는 탭만 비교하고 있고, loadFeeds()/handleRefresh()는 요청 시점의 탭/필터를 아예 검증하지 않습니다. 탭/필터를 빠르게 바꾸면 늦게 끝난 이전 요청이 현재 목록을 덮어써 잘못된 피드가 보일 수 있습니다. 요청 파라미터나 requestId를 캡처해서 불일치 응답은 버려주세요.

Also applies to: 337-377, 392-415

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

In
`@feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeViewModel.kt`
around lines 147 - 165, The issue is that late responses can overwrite the
current tab/filter because only requestedTab is validated; modify
loadFeeds()/handleRefresh() flows to capture an immutable request identifier
(e.g., requestId or the exact request params: requestedTab + requestedFilter +
currentState.nextCursor) before calling runCatchingCancellable and, onSuccess,
verify the captured params still match currentState (compare both selectedTab
and selectedFilter or the requestId) and only then call updateState/apply the
result (otherwise drop the response); apply the same fix to the other similar
blocks referenced (around the code handling pagination and refresh: the blocks
using runCatchingCancellable and feedRepository.getFeedList/getMyFeeds).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeScreen.kt`:
- Around line 18-25: The file is missing Lazy DSL imports used by the
composables: add the missing imports for stickyHeader, items, and animateItem
from the androidx.compose.foundation.lazy package so the LazyColumn/LazyRow DSL
references resolve (i.e., import the functions referenced as stickyHeader,
items, and animateItem to match their usages in HomeScreen.kt).

In
`@feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeViewModel.kt`:
- Around line 211-213: The optimistic update currently sets userVotedOptionIndex
(via optimisticVoteUpdate and updateState on feeds) which prevents hiding
results until server confirmation; change the flow so optimisticVoteUpdate
updates only a separate pending field (e.g., add pendingUserVoteIndex or
pendingVoteState on the Feed model) to block duplicate taps, and do NOT set
userVotedOptionIndex there; instead set userVotedOptionIndex only in the success
path (the code that handles server confirmation) and clear the pending field on
failure; update references in optimisticVoteUpdate, the Feed data class, and the
success/failure handlers to use these distinct fields so pending vs confirmed
state are separated.
- Around line 209-244: The rollback currently replaces the entire feeds list
with previousFeeds, wiping other concurrent updates; instead, when handling
failure in the vote flow (in HomeViewModel inside the viewModelScope.launch
failure handler), updateState should only restore the single failed feed:
compute the originalFeed by finding previousFeeds.first { it.id == feedId } and
then map the current state feeds (it.feeds) to replace the feed with matching id
with originalFeed while leaving others untouched; update the rollback call that
now uses updateState { it.copy(feeds = previousFeeds) } to perform this
single-feed replacement using feedId and previousFeeds.
- Around line 132-135: handleFilterSelection currently updates selectedFilter
but leaves pagination state (hasNextPage/nextCursor) from the previous filter,
causing subsequent loadFeeds calls to pass stale cursors; fix by resetting
pagination when changing filter: in handleFilterSelection (and any other
filter-change entrypoints) call updateState to set selectedFilter = filter AND
clear nextCursor (e.g., null) and set hasNextPage = false (and optionally clear
current feeds if needed), so that loadFeeds will request the new filter's first
page instead of using the old nextCursor; also audit loadFeeds and any code
paths that append pages (references: handleFilterSelection, loadFeeds,
selectedFilter, nextCursor, hasNextPage) to ensure they rely on the reset values
when clearFeeds is false/true.

---

Outside diff comments:
In
`@feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeViewModel.kt`:
- Around line 147-165: The issue is that late responses can overwrite the
current tab/filter because only requestedTab is validated; modify
loadFeeds()/handleRefresh() flows to capture an immutable request identifier
(e.g., requestId or the exact request params: requestedTab + requestedFilter +
currentState.nextCursor) before calling runCatchingCancellable and, onSuccess,
verify the captured params still match currentState (compare both selectedTab
and selectedFilter or the requestId) and only then call updateState/apply the
result (otherwise drop the response); apply the same fix to the other similar
blocks referenced (around the code handling pagination and refresh: the blocks
using runCatchingCancellable and feedRepository.getFeedList/getMyFeeds).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: dd5b0076-c258-4917-8877-bbc00f845e25

📥 Commits

Reviewing files that changed from the base of the PR and between d7855ad and e2864e5.

📒 Files selected for processing (4)
  • core/designsystem/src/main/java/com/sseotdabwa/buyornot/core/designsystem/components/SnackBar.kt
  • feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeContract.kt
  • feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeScreen.kt
  • feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeViewModel.kt
🚧 Files skipped from review as they are similar to previous changes (1)
  • core/designsystem/src/main/java/com/sseotdabwa/buyornot/core/designsystem/components/SnackBar.kt

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.

Caution

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

⚠️ Outside diff range comments (1)
feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeViewModel.kt (1)

169-188: ⚠️ Potential issue | 🟡 Minor

페이지네이션 응답 시 필터 변경 검증 누락

Line 170에서 탭 변경은 검증하지만, 필터 변경은 검증하지 않습니다. 요청 중 필터가 변경되면 이전 필터의 데이터가 새 필터 목록에 추가될 수 있습니다.

🔧 제안하는 수정
             }.onSuccess { feedList ->
-                if (currentState.selectedTab != requestedTab) {
+                if (currentState.selectedTab != requestedTab ||
+                    currentState.selectedFilter != requestedFilter
+                ) {
                     updateState { it.copy(isNextPageLoading = false) }
                     return@launch
                 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeViewModel.kt`
around lines 169 - 188, When applying paginated results in HomeViewModel (the
onSuccess block that checks currentState.selectedTab vs requestedTab), also
verify the active filter hasn't changed by comparing currentState.selectedFilter
(or selectedFilters) to the requestedFilter (or requestedFilters) used for the
request; if they differ, call updateState to set isNextPageLoading = false and
return without appending feedList.feeds. Ensure this additional guard is placed
before mapping/appending newItems so stale results from a previous filter aren't
merged into the current feeds.
🧹 Nitpick comments (1)
feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeViewModel.kt (1)

34-73: 초기화 시 중복 로드 가능성

init에서 observeUserPreferences()loadInitialData()가 동시에 실행됩니다. UserType.SOCIAL인 경우 두 경로 모두 loadCurrentUserIdSuspend()loadFeeds()를 호출할 수 있어 초기화 시 중복 API 호출이 발생할 수 있습니다.

isUserIdLoaded 플래그가 ID 중복 로드는 방지하지만, 피드 로드는 여전히 중복될 수 있습니다. 앱 시작 시 한 번만 발생하는 경미한 이슈이므로 우선순위가 낮습니다.

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

In
`@feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeViewModel.kt`
around lines 34 - 73, The init path can trigger loadFeeds twice because
observeUserPreferences() and loadInitialData() run concurrently; add a simple
guard (e.g., a new Boolean like isFeedLoaded) and use it in
observeUserPreferences(), loadInitialData(), loadUserIdAndRefreshFeeds(), and
any direct loadFeeds() callers to prevent duplicate feed calls: initialize
isFeedLoaded = false, set it true right before/after calling loadFeeds() (or
when feeds successfully start loading), and in observeUserPreferences() only
call loadUserIdAndRefreshFeeds() or loadFeeds() when isFeedLoaded is false (or
check existing isUserIdLoaded && isFeedLoaded to decide); update references in
functions loadCurrentUserIdSuspend(), loadUserIdAndRefreshFeeds(), loadFeeds(),
and the observeUserPreferences() branch that handles UserType.SOCIAL to use this
guard.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In
`@feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeViewModel.kt`:
- Around line 169-188: When applying paginated results in HomeViewModel (the
onSuccess block that checks currentState.selectedTab vs requestedTab), also
verify the active filter hasn't changed by comparing currentState.selectedFilter
(or selectedFilters) to the requestedFilter (or requestedFilters) used for the
request; if they differ, call updateState to set isNextPageLoading = false and
return without appending feedList.feeds. Ensure this additional guard is placed
before mapping/appending newItems so stale results from a previous filter aren't
merged into the current feeds.

---

Nitpick comments:
In
`@feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeViewModel.kt`:
- Around line 34-73: The init path can trigger loadFeeds twice because
observeUserPreferences() and loadInitialData() run concurrently; add a simple
guard (e.g., a new Boolean like isFeedLoaded) and use it in
observeUserPreferences(), loadInitialData(), loadUserIdAndRefreshFeeds(), and
any direct loadFeeds() callers to prevent duplicate feed calls: initialize
isFeedLoaded = false, set it true right before/after calling loadFeeds() (or
when feeds successfully start loading), and in observeUserPreferences() only
call loadUserIdAndRefreshFeeds() or loadFeeds() when isFeedLoaded is false (or
check existing isUserIdLoaded && isFeedLoaded to decide); update references in
functions loadCurrentUserIdSuspend(), loadUserIdAndRefreshFeeds(), loadFeeds(),
and the observeUserPreferences() branch that handles UserType.SOCIAL to use this
guard.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: f40f2cdc-a6c0-41c5-b677-68599f311c61

📥 Commits

Reviewing files that changed from the base of the PR and between e2864e5 and 0ff0026.

📒 Files selected for processing (1)
  • feature/home/src/main/java/com/sseotdabwa/buyornot/feature/home/ui/HomeViewModel.kt

Copy link
Member

@Imagine-Choi Imagine-Choi left a comment

Choose a reason for hiding this comment

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

수고하셨습니다~~~람쥐 !!
내가 또 QA 잔뜩 가져올게....

@DongChyeon DongChyeon merged commit 53c38e9 into develop Mar 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♻️ REFACTOR 코드 리팩토링 💪 동현동현동현 🛠️ FIX 버그 및 문제 해결

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐞 BugFix - 2차 자체 QA 버그 수정

3 participants