Skip to content

fix: Feed/Memory/GroupSearch 머지 충돌 해결#316

Merged
heeeeyong merged 3 commits into
refactorfrom
refactor-feed-initial-rendering
Feb 28, 2026
Merged

fix: Feed/Memory/GroupSearch 머지 충돌 해결#316
heeeeyong merged 3 commits into
refactorfrom
refactor-feed-initial-rendering

Conversation

@heeeeyong

@heeeeyong heeeeyong commented Feb 28, 2026

Copy link
Copy Markdown
Collaborator

📝작업 내용

  • Feed: FollowList 로딩 상태와 피드 초기 스켈레톤 타이밍 동기화, 캐시/초기 로딩 분기 정리
  • Memory: 무한스크롤 유지한 채 페이지별 보기 입력 모드가 자동으로 닫히는 문제 방지
  • GroupSearch: 검색 쿼리/타입 처리 충돌 정리 및 로딩 흐름 안정화
  • PostBody: 상세 이동 네비게이션 누락 보완
  • ReplyList: 첫 렌더 시 스피너/빈 상태 중복 노출 제거(스켈레톤 우선)
  • useUserSearch, UserSearchResult, UserSearch
    • 사용자 검색 초기 로딩에 스켈레톤 UI를 적용하고 로딩 타이밍을 500ms로 통일했습니다.
    • 검색어 변경/엔터 시 이전 검색 결과가 잠깐 보이는 문제를 해결하기 위해 요청 버전 가드를 추가했습니다.
    • 초기 로딩에서만 스켈레톤이 보이고 이후 검색에서는 결과 리스트 전환이 자연스럽게 되도록 분기 로직을 정리했습니다.

Summary by CodeRabbit

  • New Features

    • 게시물 클릭 시 상세 피드로 이동 기능 추가
    • 레코드 삭제 기능 추가
  • Bug Fixes

    • 댓글 목록의 초기 로딩 표시 개선
    • 필터 선택 시 중복 동작 방지 및 입력 모드 자동 리셋
    • 탭 전환에 따른 피드 로딩 상태 동기화 개선
  • Chores

    • 피드 데이터 캐싱 추가
    • 최근 검색 로딩 타이밍 및 검색 쿼리 처리 조정

@heeeeyong heeeeyong self-assigned this Feb 28, 2026
@heeeeyong heeeeyong added the 🐞 BugFix Something isn't working label Feb 28, 2026
@vercel

vercel Bot commented Feb 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
thip Ready Ready Preview, Comment Feb 28, 2026 7:01am

@coderabbitai

coderabbitai Bot commented Feb 28, 2026

Copy link
Copy Markdown

Walkthrough

PostBody에 포스트 클릭 네비게이션이 추가되었습니다. ReplyList는 초기 로딩 상태 처리를 분리했고, Feed는 피드 캐시 저장 및 탭-로딩 동기화를 도입했습니다. RecordFilters와 Memory는 필터 입력 모드 및 필터 해석 로직을 강화하고, MemoryContent에 삭제(onDelete) 핸들러를 전달합니다. GroupSearch는 검색 페칭 트리거와 useInfiniteScroll 제네릭/파라미터를 조정했습니다.

Changes

Cohort / File(s) Summary
라우팅 / 포스트 클릭
src/components/common/Post/PostBody.tsx
useNavigate 도입 및 클릭 핸들러에서 navigate('/feed/${feedId}') 호출로 포스트 클릭 시 라우팅 추가.
댓글 목록 및 로딩 처리
src/components/common/Post/ReplyList.tsx
초기 로딩 여부를 구분하는 isInitialLoading 추가; 초기 빈 상태일 때 스피너 렌더링 제거 및 EmptyState 렌더 조건 조정.
피드 페이지 상태·캐싱
src/pages/feed/Feed.tsx
activeTab 관련 로딩 상태 재배치, 피드 데이터(리스트·다음 커서·isLast 등)를 캐시에 저장하는 effect 추가, 탭 변경 시 팔로우 리스트 로딩 동기화 로직 추가(일부 기존 복합 로딩 변수 제거로 showInitialLoading 정의 누락 우려).
그룹 검색 페칭 / 상태 추적
src/pages/groupSearch/GroupSearch.tsx
useRef 추가 및 prevSearchStatusRef로 이전 상태 추적; 마운트와 검색 상태 변화 시 fetchRecentSearches 재요청 효과 분리; useInifinieScroll<SearchRoomItem>(...)로 제네릭 적용; 검색 페칭에 queryTerm 사용으로 파라미터 소스 변경.
레코드 필터 및 입력 모드
src/components/memory/RecordFilters/RecordFilters.tsx
useEffect 추가로 activeFilter 변경 시 showInputMode를 false로 리셋; 페이지 필터 클릭에서 중복 onFilterChange 호출 방지 조건 추가.
메모리 페이지 및 삭제 흐름
src/pages/memory/Memory.tsx
resolvedFilter 도입으로 필터 정규화(페이지 필터 유무에 따른 처리); fetch/reload 키와 파라미터에 resolvedFilter 사용; MemoryContentonDelete={handleRecordDelete} 전달로 삭제 연동; 관련 useEffect 의존성 확장.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • ho0010
  • ljh130334

Poem

"포스트 길 따라 퐁당 뛰어들면 🐇
댓글은 조용히 기다림을 나누고,
필터는 깔끔히 정리해 주고,
캐시에 당근 한 줌 쌓아두니,
코드는 깡총깡총 춤을 춘다 ✨"

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경 사항의 주요 내용과 관련이 있습니다. 'Feed/Memory/GroupSearch 충돌 해결'은 수정 사항의 핵심 목표를 명확히 반영하고 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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 refactor-feed-initial-rendering

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 (2)
src/components/common/Post/PostBody.tsx (1)

16-16: LGTM! 네비게이션 로직이 올바르게 구현되었습니다.

useNavigate를 사용한 피드 상세 페이지 이동이 적절히 구현되었습니다. 선택적으로, handlePostClick 함수는 간단한 래퍼이므로 인라인으로 단순화할 수 있습니다:

♻️ 선택적 단순화
-  const handlePostClick = (feedId: number) => {
-    navigate(`/feed/${feedId}`);
-  };
...
-    <Container onClick={() => handlePostClick(feedId)}>
+    <Container onClick={() => navigate(`/feed/${feedId}`)}>

Also applies to: 22-24, 35-35

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

In `@src/components/common/Post/PostBody.tsx` at line 16, The handlePostClick
wrapper is unnecessary—replace the separate handlePostClick function with an
inline call to navigate returned by useNavigate() to simplify PostBody; locate
the useNavigate() call and any references to handlePostClick (e.g., onClick
handlers around the post card/preview and the function named handlePostClick)
and change them to directly call navigate(`/posts/${post.id}`) (or the existing
route format) inline where the click handlers are defined so you can remove the
handlePostClick function entirely.
src/components/common/Post/ReplyList.tsx (1)

57-57: 초기 로딩 상태 처리가 개선되었습니다.

isInitialLoading 도입으로 초기 로딩 중 빈 상태 메시지가 표시되지 않도록 올바르게 수정되었습니다. 다만, 초기 로딩 중 null을 렌더링하면 레이아웃 시프트가 발생할 수 있습니다. 스켈레톤 렌더링을 고려해볼 수 있습니다.

♻️ 초기 로딩 시 스켈레톤 렌더링 제안
-      ) : !isInitialLoading ? (
+      ) : isInitialLoading ? (
+        <LoadingSpinner size="small" fullHeight={false} />
+      ) : (
         <EmptyState disableBottomMargin={disableBottomMargin}>
           <div className="title">아직 댓글이 없어요</div>
           <div className="sub-title">첫번째 댓글을 남겨보세요</div>
         </EmptyState>
-      ) : null}
+      )}

Also applies to: 82-87

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

In `@src/components/common/Post/ReplyList.tsx` at line 57, The new
isInitialLoading flag prevents empty-state text during initial load but
returning null causes layout shift; in the ReplyList component use
isInitialLoading (and the same check around the block at the commentFeed list
handling near lines 82-87) to render a skeleton/placeholder element instead of
null—render a SkeletonReplyList (or a simple fixed-height skeleton container
matching the expected list height) while commentFeed.isLoading && list.length
=== 0 so the layout stays stable and then render the normal list/empty state
after loading completes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/pages/groupSearch/GroupSearch.tsx`:
- Around line 52-60: Two useEffect hooks can both call fetchRecentSearches() on
mount (since searchStatus starts as 'idle'), causing duplicate API calls; remove
the unconditional useEffect and consolidate into a single effect that calls
fetchRecentSearches() only when searchStatus === 'idle' (i.e., keep the effect
using [searchStatus, fetchRecentSearches] and delete the earlier effect), or
otherwise guard the first effect with the same searchStatus === 'idle' check so
fetchRecentSearches() runs only once.

---

Nitpick comments:
In `@src/components/common/Post/PostBody.tsx`:
- Line 16: The handlePostClick wrapper is unnecessary—replace the separate
handlePostClick function with an inline call to navigate returned by
useNavigate() to simplify PostBody; locate the useNavigate() call and any
references to handlePostClick (e.g., onClick handlers around the post
card/preview and the function named handlePostClick) and change them to directly
call navigate(`/posts/${post.id}`) (or the existing route format) inline where
the click handlers are defined so you can remove the handlePostClick function
entirely.

In `@src/components/common/Post/ReplyList.tsx`:
- Line 57: The new isInitialLoading flag prevents empty-state text during
initial load but returning null causes layout shift; in the ReplyList component
use isInitialLoading (and the same check around the block at the commentFeed
list handling near lines 82-87) to render a skeleton/placeholder element instead
of null—render a SkeletonReplyList (or a simple fixed-height skeleton container
matching the expected list height) while commentFeed.isLoading && list.length
=== 0 so the layout stays stable and then render the normal list/empty state
after loading completes.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 75c0c5b and dc075db.

📒 Files selected for processing (6)
  • src/components/common/Post/PostBody.tsx
  • src/components/common/Post/ReplyList.tsx
  • src/components/memory/RecordFilters/RecordFilters.tsx
  • src/pages/feed/Feed.tsx
  • src/pages/groupSearch/GroupSearch.tsx
  • src/pages/memory/Memory.tsx

Comment thread src/pages/groupSearch/GroupSearch.tsx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/hooks/useUserSearch.ts (1)

36-42: 최소 로딩 시간 처리 방식 개선 권장

현재 구현은 API 호출 완료 후 500ms를 추가로 대기합니다. API가 200ms 걸리면 총 700ms가 됩니다. Promise.all을 사용하여 병렬 처리하면 API 응답이 500ms 미만일 때만 추가 대기하게 됩니다.

♻️ 병렬 처리로 개선하는 방법
        setLoading(true);
        setError(null);
-       const minLoadingTime = !isLoadMore ? new Promise(resolve => setTimeout(resolve, 500)) : null;
-       const response = await getUsers({
-         keyword: searchKeyword,
-         size,
-         isFinalized,
-       });
-       if (minLoadingTime) await minLoadingTime;
+       const minLoadingTime = new Promise(resolve => setTimeout(resolve, 500));
+       const apiCall = getUsers({
+         keyword: searchKeyword,
+         size,
+         isFinalized,
+       });
+       
+       const [response] = isLoadMore 
+         ? [await apiCall] 
+         : await Promise.all([apiCall, minLoadingTime]);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/hooks/useUserSearch.ts` around lines 36 - 42, Currently the code awaits
getUsers(...) then conditionally awaits minLoadingTime, causing total time to be
sum of both; change to start the timeout and the API call in parallel and await
them together so the extra 500ms only delays when the API is faster than 500ms:
create a responsePromise by calling getUsers({ keyword: searchKeyword, size,
isFinalized }) and set minLoadingTime to a Promise that resolves after 500ms
when !isLoadMore (or Promise.resolve() when isLoadMore), then use
Promise.all([responsePromise, minLoadingTime]) to await both and extract the API
response from the first result (reference symbols: getUsers,
responsePromise/minLoadingTime, searchKeyword, size, isFinalized, isLoadMore).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/hooks/useUserSearch.ts`:
- Around line 36-42: Currently the code awaits getUsers(...) then conditionally
awaits minLoadingTime, causing total time to be sum of both; change to start the
timeout and the API call in parallel and await them together so the extra 500ms
only delays when the API is faster than 500ms: create a responsePromise by
calling getUsers({ keyword: searchKeyword, size, isFinalized }) and set
minLoadingTime to a Promise that resolves after 500ms when !isLoadMore (or
Promise.resolve() when isLoadMore), then use Promise.all([responsePromise,
minLoadingTime]) to await both and extract the API response from the first
result (reference symbols: getUsers, responsePromise/minLoadingTime,
searchKeyword, size, isFinalized, isLoadMore).

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8f3d95b and 8264cfe.

📒 Files selected for processing (4)
  • src/hooks/useUserSearch.ts
  • src/pages/feed/UserSearch.tsx
  • src/pages/feed/UserSearchResult.styled.ts
  • src/pages/feed/UserSearchResult.tsx

@heeeeyong heeeeyong merged commit 9f45089 into refactor Feb 28, 2026
3 checks passed
@heeeeyong heeeeyong changed the title fix: Feed/Memory/GroupSearch 충돌 해결 fix: Feed/Memory/GroupSearch 머지 충돌 해결 Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 BugFix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant