Skip to content

feat: getSearchRoom API 연동#142

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

feat: getSearchRoom API 연동#142
ho0010 merged 4 commits intodevelopfrom
feat/api-rooms

Conversation

@ho0010
Copy link
Collaborator

@ho0010 ho0010 commented Aug 17, 2025

#️⃣연관된 이슈

[API] Rooms API 연동 #106

📝작업 내용

getSearchRoom API를 연동했습니다. 이어서 무한 스크롤도 구현하겠습니다!

Summary by CodeRabbit

  • 신규 기능

    • 방 검색을 서버와 연동하여 실제 결과 제공
    • 정렬 지원(마감 임박/인기)과 카테고리 탭 필터 추가
    • 페이지네이션(더보기)으로 추가 결과 로드
    • 최근 검색 목록 불러오기/삭제 개선 및 검색어 클릭 시 즉시 재검색
  • UX 개선

    • 로딩, 오류, 빈 결과 상태 표시 추가
    • 탭의 선택 상태를 명확히 보여 접근성 향상
    • 그룹 카드의 마감일 표시를 일관화하여 가독성 개선

@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 7:29am

@coderabbitai
Copy link

coderabbitai bot commented Aug 17, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

서버 기반 방 검색 기능과 페이징을 추가했다. 신규 API 헬퍼(getSearchRooms)와 타입을 도입하고, GroupSearch/GroupSearchResult에 연동했다. 그룹 모델의 deadLine 필드를 숫자에서 문자열(날짜/빈 문자열)로 일괄 전환했으며, 관련 컴포넌트들의 매핑을 이에 맞게 수정했다.

Changes

Cohort / File(s) Summary
Rooms 검색 API 추가
src/api/rooms/getSearchRooms.ts
방 검색용 API 래퍼 추가. SearchRoomItem, SearchRoomsResponse 타입 정의 및 getSearchRooms 구현(키워드/정렬/커서/isFinalized/카테고리 쿼리 지원). 에러 로그 후 재throw.
검색 기능 연동 및 UI 갱신
src/pages/groupSearch/GroupSearch.tsx, src/components/search/GroupSearchResult.tsx
서버 데이터 기반 검색/페이징 흐름 도입. 정렬(deadline/memberCount), 카테고리, 완료여부 필터 상태 추가. 에러/빈 상태/더 불러오기 UI 및 데이터 매핑(mapToGroupCardModel) 적용. 컴포넌트 시그니처를 Props 기반으로 변경.
deadLine 필드 문자열로 전환
src/components/group/MyGroupBox.tsx, src/components/group/CompletedGroupModal.tsx, src/components/group/MyGroupModal.tsx, src/pages/group/Group.tsx, src/pages/groupDetail/GroupDetail.tsx, src/pages/searchBook/SearchBookGroup.tsx
Group.deadLine 타입을 number→string으로 변경. 기존 0 또는 계산 일수 사용 로직을 제거/수정하고 deadlineDate 또는 빈 문자열('')을 할당하도록 매핑 수정.

Sequence Diagram(s)

sequenceDiagram
  participant U as User
  participant GS as GroupSearch(Page)
  participant API as getSearchRooms(API)
  participant R as GroupSearchResult(Component)

  U->>GS: 키워드 입력 후 검색
  GS->>API: getSearchRooms(keyword, sort, cursor?, isFinalized, category)
  API-->>GS: { roomList, nextCursor, isLast }
  GS->>R: rooms, isLoading, isLast, error, onLoadMore 등 전달
  R-->>U: 결과 리스트 렌더링

  U->>R: 더 불러오기 클릭
  R->>GS: onLoadMore()
  GS->>API: getSearchRooms(..., cursor=nextCursor)
  API-->>GS: { roomList(append), nextCursor, isLast }
  GS->>R: 갱신된 props로 재렌더
Loading
sequenceDiagram
  participant U as User
  participant GS as GroupSearch(Page)
  participant API as getSearchRooms(API)

  U->>GS: 카테고리/정렬 변경
  GS->>API: getSearchRooms(keyword, newSort, cursor=undefined, ...)
  API-->>GS: { roomList, nextCursor, isLast }
  GS-->>U: 초기 페이지로 결과 갱신
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related issues

Possibly related PRs

Suggested labels

✨ Feature, 📬 API

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 2018759 and 5ac5240.

📒 Files selected for processing (9)
  • src/api/rooms/getSearchRooms.ts (1 hunks)
  • src/components/group/CompletedGroupModal.tsx (1 hunks)
  • src/components/group/MyGroupBox.tsx (1 hunks)
  • src/components/group/MyGroupModal.tsx (1 hunks)
  • src/components/search/GroupSearchResult.tsx (4 hunks)
  • src/pages/group/Group.tsx (1 hunks)
  • src/pages/groupDetail/GroupDetail.tsx (1 hunks)
  • src/pages/groupSearch/GroupSearch.tsx (2 hunks)
  • src/pages/searchBook/SearchBookGroup.tsx (1 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