Skip to content

[Enhancement] 체리 레벨 0~4로 변경#141

Merged
ssyoung02 merged 2 commits intodevelopfrom
140-feature/change-cherry-level-logic
Jan 22, 2026
Merged

[Enhancement] 체리 레벨 0~4로 변경#141
ssyoung02 merged 2 commits intodevelopfrom
140-feature/change-cherry-level-logic

Conversation

@Kimgyuilli
Copy link
Copy Markdown
Contributor

🛠 Related issue 🛠

✏️ Work Description ✏️

  • 데모 챌린지 체리 레벨 로직 변경
    • completedCount가 0개일 때 레벨 0(몽롱체리)으로 반환
    • 1개 이상 완료 시 기존 레벨 구간(1~4) 적용
  • CherryLevel enum 수정
    • LEVEL_0(0, "몽롱체리") 추가
    • 레벨 0, 1 모두 "몽롱체리" 이름 사용
  • DemoChallengeStatistics 수정
    • calculateCherryLevel(): completedCount == 0이면 레벨 0 반환
    • getProgressToNextLevel(): completedCount == 0이면 0.0 반환
    • getRemainingRoutinesToNextLevel(): 레벨 0, 1 모두 레벨 2(25%)까지 남은 개수 반환
    • 초기 cherryLevel 값 1 → 0으로 변경

📸 Screenshot 📸

설명 사진
루틴 0개 완료 시 (레벨 0) image
루틴 1개 이상 완료 시 (레벨 1~4) image

😅 Uncompleted Tasks 😅

  • 없음

📢 To Reviewers 📢

  • 레벨 구간 정리
    completedCount 진행률 레벨 이름
    0 - 0 몽롱체리
    1개 이상 0~24% 1 몽롱체리
    - 25~49% 2 뽀득체리
    - 50~74% 3 팡팡체리
    - 75~100% 4 꾸꾸체리
  • demo 패키지에만 적용되었습니다 (core는 기존 로직 유지)

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

체리 레벨 시스템을 1–4에서 0–4로 확장해 LEVEL_0을 추가하고, 데모 챌린지 통계의 기본 레벨·진행도·남은 루틴 계산 로직과 에러 메시지를 해당 범위로 조정했습니다.

Changes

Cohort / File(s) 요약
레벨 열거형 및 에러 메시지
src/main/java/com/sopt/cherrish/domain/challenge/core/domain/model/CherryLevel.java, src/main/java/com/sopt/cherrish/domain/challenge/core/exception/ChallengeErrorCode.java
LEVEL_0(0, "몽롱체리") 추가; enum 상수 순서 삽입 및 fromLevel(int) Javadoc 업데이트; INVALID_CHERRY_LEVEL 메시지의 유효 범위를 (0-4)로 변경
데모 챌린지 통계 로직
src/main/java/com/sopt/cherrish/domain/challenge/demo/domain/model/DemoChallengeStatistics.java
기본 cherryLevel 초기값을 10으로 변경; calculateCherryLevel()이 완료 수 0일 때 LEVEL_0 반환하도록 수정; getProgressToNextLevel()/getRemainingRoutinesToNextLevel() 계산 경로 및 하한 임계값 조정

Sequence Diagram(s)

(해당 변경은 내부 데이터 모델과 계산 로직 변경에 한정되며 다중 컴포넌트 제어 흐름 변경이 아니므로 시퀀스 다이어그램을 생략합니다.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

✨ Feature

Suggested reviewers

  • ssyoung02
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed 설명이 관련 이슈, 작업 내용, 스크린샷, 검수자 지침을 포함하며 변경사항과 완전히 연관되어 있습니다.
Linked Issues check ✅ Passed PR은 이슈 #140의 모든 요구사항을 충족합니다: completedCount가 0일 때 레벨 0, 1 이상일 때 레벨 1~4를 적용합니다.
Out of Scope Changes check ✅ Passed 모든 변경사항은 이슈 #140의 범위 내에 있으며, demo 패키지의 체리 레벨 로직 변경만 포함합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed PR 제목이 변경의 핵심을 정확하게 반영하고 있습니다. 체리 레벨을 기존의 14 범위에서 04 범위로 변경하는 것이 주요 변화이며, 제목에서 명확하게 표현되었습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 140-feature/change-cherry-level-logic

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/main/java/com/sopt/cherrish/domain/challenge/core/domain/model/CherryLevel.java (1)

34-38: Javadoc의 유효 범위(1-4) 업데이트 필요.

현재 주석이 1-4로 남아 있어 레벨 0 추가와 불일치합니다.

✏️ 제안 수정
-	 * `@param` level 체리 레벨 (1-4)
+	 * `@param` level 체리 레벨 (0-4)
🤖 Fix all issues with AI agents
In
`@src/main/java/com/sopt/cherrish/domain/challenge/core/domain/model/CherryLevel.java`:
- Around line 21-25: Update the Javadoc for the CherryLevel.fromLevel(Integer)
method to reflect the new enum range including LEVEL_0: change any references
that say "1-4" to "0-4" and adjust the `@param` description to indicate valid
level values are 0 through 4 (or handle null as currently documented). Locate
the fromLevel method and its Javadoc in the CherryLevel enum class and correct
the textual range so it accurately documents LEVEL_0 through LEVEL_4.

@Kimgyuilli Kimgyuilli requested a review from ssyoung02 January 22, 2026 15:20
@Kimgyuilli Kimgyuilli self-assigned this Jan 22, 2026
@Kimgyuilli Kimgyuilli added 우선순위: P0 즉시 대응 필요, 서비스 장애 또는 핵심 기능 불가 담당: 규일🍊 규일 담당 작업 labels Jan 22, 2026
@Kimgyuilli Kimgyuilli changed the title feat(challenge): 체리 레벨 0~4로 변경 [Feature] 체리 레벨 0~4로 변경 Jan 22, 2026
@Kimgyuilli Kimgyuilli added ✨ Feature and removed 우선순위: P0 즉시 대응 필요, 서비스 장애 또는 핵심 기능 불가 labels Jan 22, 2026
Copy link
Copy Markdown
Contributor

@ssyoung02 ssyoung02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿굿

@ssyoung02 ssyoung02 merged commit 80dd993 into develop Jan 22, 2026
2 checks passed
@Kimgyuilli Kimgyuilli changed the title [Feature] 체리 레벨 0~4로 변경 [Enhancement] 체리 레벨 0~4로 변경 Feb 20, 2026
@Kimgyuilli Kimgyuilli added 도메인: 챌린지🏆 챌린지 관련 기능 작업 우선순위: P1 현재 스프린트 내 처리, 주요 기능 개발 및 중요 버그 labels Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

담당: 규일🍊 규일 담당 작업 도메인: 챌린지🏆 챌린지 관련 기능 작업 우선순위: P1 현재 스프린트 내 처리, 주요 기능 개발 및 중요 버그

Projects

None yet

Development

Successfully merging this pull request may close these issues.

챌린지 페이지 수행한 루틴 수가 0개일 때는 0레벨 1개인 순간부터 1레벨로 설정

2 participants