Skip to content

feat: search 로직 변경, 무한 스크롤 추가#148

Merged
ho0010 merged 2 commits intodevelopfrom
feat/api-rooms
Aug 17, 2025
Merged

feat: search 로직 변경, 무한 스크롤 추가#148
ho0010 merged 2 commits intodevelopfrom
feat/api-rooms

Conversation

@ho0010
Copy link
Collaborator

@ho0010 ho0010 commented Aug 17, 2025

group search 무한 스크롤 구현은 완료 했으나 develop 구현 사항과 병합시에 테스트가 필요합니다.

Summary by CodeRabbit

  • 신기능

    • 그룹 검색 결과에 무한 스크롤 도입으로 자동 로드 지원
    • 입력 디바운싱 기반의 즉시/지연 검색 흐름 추가
    • 로딩 중/더 이상 결과 없음 상태 표시 문구 제공
  • 개선

    • 검색 완료 시에만 총 개수 노출로 가독성 향상
    • 뒤로가기 시 페이지 이동 대신 내부 상태 초기화로 자연스러운 복귀
    • 최근 검색 로딩 흐름 정비로 일관된 표시
    • 결과 리스트 간격 축소 및 하단 패딩 추가, 색상 조정으로 UI 정돈

@vercel
Copy link

vercel bot commented Aug 17, 2025

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

Project Deployment Preview Comments Updated (UTC)
thip Ready Ready Preview Comment Aug 17, 2025 3:49pm

@coderabbitai
Copy link

coderabbitai bot commented Aug 17, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

검색 결과 컴포넌트와 그룹 검색 페이지를 무한 스크롤 및 디바운스 기반의 검색 흐름으로 전환했습니다. GroupSearchResult의 공개 API가 변경되었고, GroupSearch 페이지는 초기/더보기 로딩 분리, IntersectionObserver 기반 last-item 관찰, 입력 디바운스, 최근 검색 로딩 분리, 내부 상태 초기화 기반의 뒤로가기 처리로 수정되었습니다.

Changes

Cohort / File(s) Summary
검색 결과 컴포넌트(API 변경 및 렌더링 수정)
src/components/search/GroupSearchResult.tsx
Props 변경: 추가(type, isLoadingMore?, hasMore?, lastRoomElementCallback?), 제거(isLast, onLoadMore). ResultType('searching'
그룹 검색 페이지(검색 흐름·무한 스크롤 도입)
src/pages/groupSearch/GroupSearch.tsx
useRef/IntersectionObserver 도입. 디바운스 입력(handleChange)과 즉시 검색(handleSearch) 분리. 첫 페이지 fetch(searchFirstPage)와 더보기(loadMore) 분리. 최근 검색 초기 로딩 경로 정리. 뒤로가기 시 내부 상태 리셋. GroupSearchResult에 신규 props 연결(type, isLoading, isLoadingMore, hasMore, lastRoomElementCallback). 정리용 cleanup 추가.

Sequence Diagram(s)

sequenceDiagram
  participant U as User
  participant SB as SearchBar
  participant GS as GroupSearch.tsx
  participant API as SearchAPI
  U->>SB: 입력 변경
  SB->>GS: handleChange(term)
  GS->>GS: 디바운스 타이머 설정/갱신
  GS->>API: searchFirstPage(term, cursor=undefined)
  API-->>GS: 결과(rooms, nextCursor, isLast)
  GS-->>SB: isSearched/isLoading 업데이트
Loading
sequenceDiagram
  participant View as Viewport
  participant GSR as GroupSearchResult
  participant GS as GroupSearch.tsx
  participant API as SearchAPI
  View->>GSR: 마지막 카드 노출
  GSR->>GS: lastRoomElementCallback(node)
  GS->>GS: IntersectionObserver 콜백
  alt hasMore && !isLoadingMore
    GS->>API: loadMore(nextCursor)
    API-->>GS: 추가 결과(rooms+, nextCursor, isLast)
    GS-->>GSR: isLoadingMore/hasMore 갱신
  else no more
    GS-->>GSR: hasMore=false (종료 텍스트 표시)
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

✨ Feature

Suggested reviewers

  • heeeeyong
  • ljh130334

Poem

토끼가 톡톡, 키를 누르네
디바운스 숨결에 검색이 피네
끝 카드에 살짝 앉아 기다리면
바람 타고 방들이 또 오네
더 없으면 고개 끄덕, “여기까지!”
무한 들판 뛰어도 흐름은 가지런히 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9de997c and 7f6081c.

📒 Files selected for processing (2)
  • src/components/search/GroupSearchResult.tsx (6 hunks)
  • src/pages/groupSearch/GroupSearch.tsx (3 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/api-rooms

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant