Skip to content

패널 및 일기 수정#133

Merged
lejuho merged 1 commit into
developfrom
chore/132-dae-ju-ho
Aug 27, 2025
Merged

패널 및 일기 수정#133
lejuho merged 1 commit into
developfrom
chore/132-dae-ju-ho

Conversation

@lejuho
Copy link
Copy Markdown
Collaborator

@lejuho lejuho commented Aug 27, 2025

Summary by CodeRabbit

  • New Features
    • 위시트리에 다음 단계 표기 및 필요 포인트 안내, 진행률 계산 개선
    • 오늘의 미션 상태 카드(일기/퀴즈/체크) 표시 및 완료 여부 반영
    • 피드에서 공개 게시물 중심 노출 범위 확대 및 아바타 게시물 페이징 개선
  • Bug Fixes
    • 일일 질문 검증 메시지를 한국어로 수정하고 필수값 검증 보완
    • 패널 응답의 일기 완료 표기 오타 수정
  • Refactor
    • 일일 미션 집계에 상한(최대 3건) 적용
  • Documentation
    • ER 다이어그램 파일 추가

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 27, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

홈 패널/미션/피드 전반에 걸쳐 DTO와 서비스 로직이 확장 및 수정됨. 홈 패널 DTO에 nextStage 필드가 추가되고, HomeService는 exists 기반 체크와 WishTreeStage를 사용. 피드 서비스는 차단 사용자 필터를 비활성화. 신규 서비스/DTO 추가와 리포지토리 메서드들이 도입됨. ERD Mermaid 파일이 추가됨.

Changes

Cohort / File(s) Summary
Home 패널 및 위시트리 단계 로직
src/main/java/.../home/PannelResponseDTO.java, src/main/java/.../home/service/HomeService.java, src/main/java/.../mission/wishTree/WishTreeStage.java
패널 DTO의 WishTreeDtonextStage 필드 추가. HomeService가 일일 미션 완료 여부를 exists 쿼리로 계산하고 WishTreeStage의 현재/다음 단계 이름 및 필요 포인트, 진행 퍼센트 생성. WishTreeStage에 getNextStage() 추가.
일일 미션 상태 인프라(스캐폴딩)
src/main/java/.../mission/DailyMissionStatusService.java, src/main/java/.../mission/MissionStatusDto.java
읽기 전용 서비스 클래스와 미션 상태 DTO 추가. 로직은 주석으로 스캐폴딩 상태.
일지/퀴즈 존재 여부 체크 리포지토리 확장
src/main/java/.../mission/diary/domain/repository/DiaryRepository.java, src/main/java/.../realquiz/repository/UserQuizRepository.java
당일 구간 존재 여부 확인 메서드 추가: existsByUserAndCreatedAtBetween(...), existsByUserAndIsCompletedIsTrueAndCreatedAtBetween(...).
미션 집계 조정 및 DTO 변경
src/main/java/.../mission/MissionAggregationService.java, src/main/java/.../mission/user_daily_mission/dto/MissionCountPerDay.java
일자별 일지 카운트를 최대 3으로 클램핑. MissionCountPerDay에 세터 추가(변경 가능).
피드/소셜 도메인 변경
src/main/java/.../social/feed/service/FeedService.java, src/main/java/.../social/avatarpost/domain/repository/AvatarPostRepository.java, src/main/java/.../social/avatarpost/domain/AvatarPost.java
피드에서 차단 사용자 필터링을 비활성화하고 공개/팔로우 기반 조회로 단순화. AvatarPostRepository에 페이지네이션용 findAllBy(Pageable) 추가. AvatarPost에서 생성자와 @PrePersist 제거(타임스탬프는 Hibernate 어노테이션으로 처리).
데일리 질문 요청 검증 수정
src/main/java/.../member/daily_question/dto/DailyQuestionAnswerRequest.java
questionId 검증을 @NotBlank에서 @NotNull("질문 ID는 필수입니다.")로 변경.
문서/스키마
src/main/resources/erd.mermaid
전체 도메인 스키마를 표현하는 Mermaid ER 다이어그램 파일 추가.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor U as User
  participant HS as HomeService
  participant DR as DiaryRepository
  participant UQR as UserQuizRepository
  participant DQAR as DailyQuestionAnswerRepository
  participant WTS as WishTreeStage

  U->>HS: getPanelData(user)
  HS->>HS: today start/end 계산 (LocalDate)
  HS->>DR: existsByUserAndCreatedAtBetween(user, start, end)
  DR-->>HS: boolean isDiaryCompleted
  HS->>UQR: existsByUserAndIsCompletedIsTrueAndCreatedAtBetween(...)
  UQR-->>HS: boolean isQuizCompleted
  HS->>DQAR: existsByUserAndAnsweredDate(user, today)
  DQAR-->>HS: boolean isCheckingCompleted
  HS->>WTS: current.getNextStage()
  WTS-->>HS: nextStage or null
  HS-->>U: PanelResponseDTO (missions, wishTree with nextStage)
  note over HS: 신규/변경된 단계 명칭 및 진행률 포함
Loading
sequenceDiagram
  autonumber
  actor U as User
  participant FS as FeedService
  participant DR as DiaryRepository
  participant APR as AvatarPostRepository

  U->>FS: getFeed(user, pageable)
  FS->>FS: blockedUserIds = empty list
  alt not following
    FS->>DR: findByIsPublicIsTrue(pageable)
    FS->>APR: findAllBy(pageable)
  else following
    FS->>DR: findByUserInAndUser_IdNotIn(..., blocked=[])
    FS->>APR: findByUserInAndUser_IdNotIn(..., blocked=[])
  end
  FS-->>U: FeedResponse (without block filtering)
  note over FS: 차단 필터링 비활성화
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

Feature, Refactor

Suggested reviewers

  • xoruddl
  • c5ln

Poem

귀가 펄쩍, 코드 밭을 훑었지요 🐇
패널엔 다음 단계, 피드엔 바람이 불고—
오늘의 미션은 깃털처럼 체크 완료!
저장소는 살짝, 존재 여부만 톡.
ERD 별자리 아래, 디버그는 고요 🌟
폴짝폴짝, 머지까지 한 번에!

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 dc208d5 and 0021b90.

📒 Files selected for processing (14)
  • src/main/java/com/example/cp_main_be/domain/home/PannelResponseDTO.java (1 hunks)
  • src/main/java/com/example/cp_main_be/domain/home/service/HomeService.java (4 hunks)
  • src/main/java/com/example/cp_main_be/domain/member/daily_question/dto/DailyQuestionAnswerRequest.java (1 hunks)
  • src/main/java/com/example/cp_main_be/domain/mission/DailyMissionStatusService.java (1 hunks)
  • src/main/java/com/example/cp_main_be/domain/mission/MissionAggregationService.java (1 hunks)
  • src/main/java/com/example/cp_main_be/domain/mission/MissionStatusDto.java (1 hunks)
  • src/main/java/com/example/cp_main_be/domain/mission/diary/domain/repository/DiaryRepository.java (1 hunks)
  • src/main/java/com/example/cp_main_be/domain/mission/user_daily_mission/dto/MissionCountPerDay.java (1 hunks)
  • src/main/java/com/example/cp_main_be/domain/mission/wishTree/WishTreeStage.java (1 hunks)
  • src/main/java/com/example/cp_main_be/domain/realquiz/repository/UserQuizRepository.java (1 hunks)
  • src/main/java/com/example/cp_main_be/domain/social/avatarpost/domain/AvatarPost.java (0 hunks)
  • src/main/java/com/example/cp_main_be/domain/social/avatarpost/domain/repository/AvatarPostRepository.java (1 hunks)
  • src/main/java/com/example/cp_main_be/domain/social/feed/service/FeedService.java (2 hunks)
  • src/main/resources/erd.mermaid (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 chore/132-dae-ju-ho

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.

@lejuho lejuho merged commit 42b8cf8 into develop Aug 27, 2025
0 of 2 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🚨 PR 본문이 비어있습니다!

아래 템플릿을 복사하여 PR 내용을 작성해주세요.


📝 개요

이번 PR의 핵심 내용을 한 줄로 요약해 주세요.


💻 작업 내용

이번 PR에서 작업한 내용을 상세히 설명해 주세요.

  • 작업 내용 1
  • 작업 내용 2
  • ...

✅ PR 체크리스트

PR을 보내기 전에 아래 체크리스트를 확인해 주세요.

  • 커밋 메시지는 포맷에 맞게 작성했나요?
  • 스스로 코드를 다시 한번 검토했나요?
  • 관련 이슈를 연결했나요?
  • 빌드 및 테스트가 로컬에서 성공했나요?

🔗 관련 이슈

이번 PR과 관련된 이슈 번호를 기재해 주세요.
예: Closes #123


스크린샷 (선택)

UI 변경 사항이 있다면 스크린샷을 첨부해 주세요.

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