Skip to content

Comments

fix: 내 피드인경우, 비밀글 보이게 수정#184

Merged
heeeeyong merged 1 commit intodevelopfrom
chore/minor-updates
Aug 20, 2025
Merged

fix: 내 피드인경우, 비밀글 보이게 수정#184
heeeeyong merged 1 commit intodevelopfrom
chore/minor-updates

Conversation

@heeeeyong
Copy link
Collaborator

@heeeeyong heeeeyong commented Aug 20, 2025

이하동일

Summary by CodeRabbit

  • New Features
    • 피드 로딩 중 로딩 스피너 표시.
    • 게시물이 없을 때 빈 상태 화면 제공.
  • Refactor
    • props 기반 렌더링에서 내부 상태 기반으로 전환하여 피드 게시물과 총 게시물 수를 관리.
    • 내 피드/다른 사용자 피드에 따라 데이터 로딩 경로 분기, 일부 요청 병렬 처리로 초기 로딩 개선.
    • 총 게시물 수 표시 로직을 별도 상태로 정비.
    • 오류 처리 로깅 추가.
    • 프로필 및 팔로우 버튼 노출 로직 유지, 내 피드 여부 전달 방식 정리.

@vercel
Copy link

vercel bot commented Aug 20, 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 20, 2025 1:29pm

@coderabbitai
Copy link

coderabbitai bot commented Aug 20, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

OtherFeed 컴포넌트가 내부 상태와 훅을 도입해 피드 로딩/에러/비어있음 상태를 관리하고, isMyself 여부에 따라 내 피드(getMyFeeds+getMyProfile 병렬) 또는 타인 피드(getOtherFeed)를 호출해 feedPosts/totalFeedCount를 설정하도록 변경되었습니다. 로딩 스피너와 EmptyState가 추가되었습니다.

Changes

Cohort / File(s) Summary of Changes
피드 데이터 로딩 및 UI 상태 관리
src/components/feed/OtherFeed.tsx
- useState/useEffect 도입, feedPosts·loading·totalFeedCount 상태 추가
- isMyself 분기: 내 피드(getMyFeeds)와 내 프로필(getMyProfile) 병렬 요청, 아니면 getOtherFeed(userId) 호출
- posts prop 초기값만 사용하고 이후는 feedPosts로 렌더링
- 로딩 시 LoadingSpinner, 비어있음 시 EmptyState 렌더링
- totalFeedCount 표기를 상태로 대체, 오류 시 console.error

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor U as User
  participant C as OtherFeed (Component)
  participant A1 as API:getMyFeeds
  participant A2 as API:getMyProfile
  participant A3 as API:getOtherFeed
  participant UI as UI

  U->>C: 마운트/prop 변경
  C->>UI: setLoading(true)
  alt isMyself = true
    par 내 피드 요청
      C->>A1: getMyFeeds()
      A1-->>C: feeds
    and 내 프로필 요청
      C->>A2: getMyProfile()
      A2-->>C: profile(totalFeedCount)
    end
    C->>C: set(feedPosts, totalFeedCount)
  else isMyself = false
    C->>A3: getOtherFeed(userId)
    A3-->>C: feeds
    C->>C: set(feedPosts)
  end
  C->>UI: setLoading(false)
  alt loading = true
    UI->>U: LoadingSpinner
  else feedPosts.length > 0
    UI->>U: 게시글 목록 렌더링
  else
    UI->>U: EmptyState 표시
  end
  note over C,UI: 오류 발생 시 console.error 호출
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

🐞 BugFix, 📬 API

Poem

폴짝, 폴짝—피드 길을 건너가네 🐇
내 피드냐, 남의 피드냐 분기길 두 갈래
스피너가 돌고, 빈 초원엔 바람만—
호출 둘 병렬로 당근처럼 아삭!
총계도 챙겨 넣고, 오늘도 무사 배포 끝! 🌿✨


📜 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 c2e9b5c and 83f89ed.

📒 Files selected for processing (1)
  • src/components/feed/OtherFeed.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 chore/minor-updates

🪧 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 53176c8 into develop Aug 20, 2025
2 of 3 checks passed
@heeeeyong heeeeyong self-assigned this Aug 20, 2025
@heeeeyong heeeeyong added the 🐞 BugFix Something isn't working label Aug 20, 2025
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