Skip to content

develp branch 작업내용 머지 : develop -> main#155

Merged
heeeeyong merged 14 commits into
mainfrom
develop
Aug 18, 2025
Merged

develp branch 작업내용 머지 : develop -> main#155
heeeeyong merged 14 commits into
mainfrom
develop

Conversation

@heeeeyong
Copy link
Copy Markdown
Collaborator

@heeeeyong heeeeyong commented Aug 18, 2025

이하동일

Summary by CodeRabbit

  • 신규 기능
    • 오늘의 한마디: 서버 연동으로 메시지 로드, 페이지네이션/무한 스크롤, 초기/추가 로딩 표시, 에러 안내, 일일 작성 제한(5회) 알림을 지원합니다.
    • 방 인사말 불러오기 기능을 추가했습니다.
  • 개선 사항
    • 더보기 메뉴가 작성자 여부와 타입(게시글/댓글)에 따라 편집/삭제/신고를 구분해 표시합니다. 신고 시 안내 스낵바가 노출됩니다.
    • 메시지 목록에서 사용자 프로필 이미지를 아바타로 표시합니다.
    • 피드 상세에서 책 이미지와 작성자 여부 표시를 지원합니다.

heeeeyong and others added 14 commits August 18, 2025 04:42
브랜치 히스토리 동기화: main -> develop
  - getDailyGreeting API 함수 생성 (src/api/rooms/getDailyGreeting.ts)
  - TodayWords 컴포넌트에 실제 API 데이터 연동
  - 무한 스크롤 및 페이지네이션 구현 (nextCursor 기반)
  - 로딩 상태 및 에러 처리 추가
  - 프로필 이미지 지원 기능 추가
  - 타입 정의 개선 (Message 인터페이스에 profileImageUrl, isWriter 필드 추가)
  - 새 메시지 작성 후 자동 새로고침 기능
  - 개발용 토글 버튼으로 실제/더미 데이터 전환 가능
feat: 오늘의 한마디 조회 API 연동 구현
fix: 더보기 모달 isWriter 분기처리 반영
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 18, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

피드 상세 타입에 bookImageUrl/isWriter 필드가 추가되고, 방의 데일리 인사(getDailyGreeting) API가 신설되었습니다. MoreMenu/팝업 체계가 작성자 여부와 타입(post/reply)에 따라 편집/삭제/신고로 분기하도록 확장되었습니다. 오늘의 한마디 페이지는 API 연동, 페이징, 무한 스크롤, 일일 작성 제한을 도입했습니다.

Changes

Cohort / File(s) Summary
API – Feed/Rooms
src/api/feeds/getFeedDetail.ts
FeedDetailDatabookImageUrl: string, isWriter: boolean 필드 추가. 응답/함수 시그니처 변화 없음.
API – Daily Greeting
src/api/rooms/getDailyGreeting.ts
DailyGreetingResponse, DailyGreetingParams 추가. getDailyGreeting({ roomId, cursor }) 신설, GET /rooms/{roomId}/daily-greeting 호출 및 페이지네이션(cursor/isLast) 처리, 에러 로깅 후 재throw.
Popup/MoreMenu 시스템
src/components/common/Modal/MoreMenu.tsx, src/stores/usePopupStore.ts, src/hooks/usePopupActions.ts
MoreMenu가 onReport, isWriter, `type('post'
Post – Reply UI 분기
src/components/common/Post/Reply.tsx, src/components/common/Post/SubReply.tsx
삭제 확인 모달 흐름 제거. 작성자면 메뉴에 삭제 제공, 비작성자면 신고 처리 및 스낵바 표시. openMoreMenutype:'reply', isWriter 전달.
Today-words 타입 및 리스트
src/types/today.ts, src/components/today-words/MessageList/MessageList.styled.ts, src/components/today-words/MessageList/MessageList.tsx
MessageprofileImageUrl?, isWriter? 추가. TodayCommentItem, DailyGreetingData 신설. Avatar가 profileImageUrl 배경 이미지 지원. 메시지 소유 판단을 isWriter 기반으로 변경, 정렬/삭제 로직 단순화, MessageList props에서 onMessageDelete, isRealTimeMode 제거.
Today-words 페이지 로직
src/pages/today-words/TodayWords.tsx
getDailyGreeting 연동, 변환함수 추가, 초기/추가 로딩 상태 및 커서 기반 페이징/무한 스크롤 구현. 일일 작성 제한(5회) 로직과 스낵바 안내 추가. 메시지 전송 후 목록 새로고침.
Feed 상세 페이지 분기
src/pages/feed/FeedDetailPage.tsx
feedData.isWriter에 따라 MoreMenu 분기. 작성자는 편집/삭제(삭제는 확인 후 처리 및 이동), 비작성자는 신고 스낵바. openMoreMenutype:'post', isWriter 전달.

Sequence Diagram(s)

sequenceDiagram
  participant UI as TodayWords Page
  participant API as getDailyGreeting()
  participant S as Server

  UI->>API: getDailyGreeting({ roomId, cursor? })
  API->>S: GET /rooms/{roomId}/daily-greeting?cursor=...
  S-->>API: { data: { todayCommentList, nextCursor, isLast } }
  API-->>UI: DailyGreetingResponse.data
  UI->>UI: convertToMessage()로 매핑 후 목록 갱신
  UI->>UI: 스크롤 하단 근접 시 loadMore (isLast=false일 때)
Loading
sequenceDiagram
  participant User
  participant Menu as MoreMenu
  participant Caller as Caller Component

  User->>Menu: ... 버튼 클릭
  alt type=post/reply AND isWriter=true
    Menu-->>User: 편집 / 삭제 표시
    User->>Caller: onEdit 또는 onDelete 트리거
  else isWriter=false
    Menu-->>User: 신고 표시
    User->>Caller: onReport 트리거
  end
Loading
sequenceDiagram
  participant User
  participant Page as FeedDetailPage
  participant API as deleteFeedPost
  participant Nav as Router

  User->>Page: More 클릭
  alt feedData.isWriter
    User->>Page: 삭제 선택 (확인)
    Page->>API: 삭제 요청
    API-->>Page: 성공
    Page->>Nav: /feed (초기 탭 '내 피드')
  else
    User->>Page: 신고 선택
    Page-->>User: 신고 접수 스낵바
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

✨ Feature, 📬 API

Suggested reviewers

  • ljh130334
  • ho0010

Poem

깡충, 깡충, 메뉴는 두 갈래 길
글쓴 토끼면 편집·삭제를 고를 틸!
손님 토끼는 신고로 점잖게—
인사 한 마디는 스르르 스크롤 끝까지 가게.
오늘도 carrot-API에 털털 털— 행복이 쌓이네 🥕✨


📜 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 359f266 and ba38397.

📒 Files selected for processing (11)
  • src/api/feeds/getFeedDetail.ts (2 hunks)
  • src/api/rooms/getDailyGreeting.ts (1 hunks)
  • src/components/common/Modal/MoreMenu.tsx (2 hunks)
  • src/components/common/Post/Reply.tsx (2 hunks)
  • src/components/common/Post/SubReply.tsx (3 hunks)
  • src/components/today-words/MessageList/MessageList.styled.ts (1 hunks)
  • src/components/today-words/MessageList/MessageList.tsx (5 hunks)
  • src/pages/feed/FeedDetailPage.tsx (1 hunks)
  • src/pages/today-words/TodayWords.tsx (6 hunks)
  • src/stores/usePopupStore.ts (1 hunks)
  • src/types/today.ts (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 develop

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

@heeeeyong heeeeyong merged commit 8691986 into main Aug 18, 2025
1 of 2 checks passed
@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 18, 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 18, 2025 8:59am

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.

2 participants