Skip to content

Conversation

@chock-cho
Copy link
Member

@chock-cho chock-cho commented Dec 14, 2025

💡 작업 내용

  • YS-589 feature: 공고 목록 조회 시 응답값에 timeRequired(소요시간), count(횟수) 컬럼 추가

✅ 셀프 체크리스트

  • PR 제목을 형식에 맞게 작성했나요?
  • 브랜치 전략에 맞는 브랜치에 PR을 올리고 있나요?
  • 테스트는 잘 통과했나요?
  • 빌드에 성공했나요?
  • 본인을 assign 해주세요.
  • 해당 PR에 맞는 label을 붙여주세요.

🙋🏻‍ 확인해주세요

  • 관련된 Discussion 등이 있다면 첨부해주세요

🔗 Jira 티켓


https://yappsocks.atlassian.net/browse/YS-589

Summary by CodeRabbit

변경 사항

  • 새로운 기능
    • 실험 포스트에 참가자 수(count) 및 소요 시간(timeRequired) 필드 추가
    • 조회·목록·생성·수정 API의 응답과 생성/수정 입력에 해당 필드 반영 (포스트 정보에 일정량/소요시간 노출)

✏️ Tip: You can customize this high-level summary in your review settings.

🔗 Jira 티켓


https://yappsocks.atlassian.net/browse/YS-589

@coderabbitai
Copy link

coderabbitai bot commented Dec 14, 2025

Walkthrough

실험 포스트 관련 UseCase, 프레젠테이션 DTO 및 매퍼에 선택 필드 count: Int?timeRequired: TimeSlot?가 추가되어 해당 값들이 출력·입력 매핑과 테스트 검증에 포함되도록 확장되었습니다.

Changes

응집력 / 파일 변경 요약
GetPosts UseCase 출력
application/src/main/kotlin/com/dobby/usecase/experiment/GetExperimentPostsUseCase.kt
GetExperimentPostsUseCase.Output.PostInfoOutputcount: Int?timeRequired: TimeSlot? 필드 추가; 매핑 로직이 해당 필드를 채움; TimeSlot 임포트 추가
Create/Update UseCase 출력·입력
application/src/main/kotlin/com/dobby/usecase/experiment/CreateExperimentPostUseCase.kt, application/src/main/kotlin/com/dobby/usecase/experiment/UpdateExperimentPostUseCase.kt
PostInfo(출력) 및 Input(업데이트/생성)에 timeRequired: TimeSlot?, count: Int? 추가; 생성/업데이트 결과에 해당 값들 반영
프레젠테이션 DTO
presentation/src/main/kotlin/com/dobby/api/dto/response/experiment/PostInfo.kt
PostInfo 데이터 클래스에 timeRequired: TimeSlot?, count: Int? 필드 추가; TimeSlot 임포트 추가
API 매퍼 변경
presentation/src/main/kotlin/com/dobby/api/mapper/ExperimentPostMapper.kt
Create/Update/Get 매핑 로직에 timeRequiredcount 매핑 추가 (toCreatePostUseCaseInput, toCreatePostInfo, toUpdatePostInfo, toGetExperimentPostsUseCasePagination, toGetExperimentPostsResponse 등)
테스트 업데이트
application/src/test/kotlin/com/dobby/usecase/experiment/GetExperimentPostsUseCaseTest.kt
테스트에 timeRequired(예: TimeSlot.ABOUT_1H) 및 count(예: 10)에 대한 검증 추가

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • 추가로 주의해서 확인할 항목:
    • TimeSlot의 직렬화/임포트 및 패키지 일관성
    • 매퍼에서 null 처리(입력/출력) 일관성
    • 기존 API 클라이언트 호환성(선택 필드 누락 시 동작)

Poem

🐰 새 필드 두 개 깡충 들어왔네,
count는 숫자를, timeRequired는 시간을 재네.
매퍼는 조심스레 값을 옮기고,
테스트는 깐깐히 확인하네.
토실한 코드에 당근 하나 척! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경사항의 핵심을 명확하게 설명합니다. 공고 목록 조회 응답값에 timeRequired(소요시간)와 count(횟수) 컬럼을 추가하는 변경사항을 정확하게 반영하고 있습니다.
✨ 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 feature/YS-589

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 97b91be and 1d24052.

📒 Files selected for processing (5)
  • application/src/main/kotlin/com/dobby/usecase/experiment/CreateExperimentPostUseCase.kt (2 hunks)
  • application/src/main/kotlin/com/dobby/usecase/experiment/UpdateExperimentPostUseCase.kt (2 hunks)
  • application/src/test/kotlin/com/dobby/usecase/experiment/GetExperimentPostsUseCaseTest.kt (1 hunks)
  • presentation/src/main/kotlin/com/dobby/api/dto/response/experiment/PostInfo.kt (1 hunks)
  • presentation/src/main/kotlin/com/dobby/api/mapper/ExperimentPostMapper.kt (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (6)
presentation/src/main/kotlin/com/dobby/api/dto/response/experiment/PostInfo.kt (1)

8-9: 새 필드 추가 완료

timeRequiredcount 필드가 적절하게 nullable 타입으로 추가되었으며, PR 목표에 부합합니다.

application/src/test/kotlin/com/dobby/usecase/experiment/GetExperimentPostsUseCaseTest.kt (1)

117-118: 테스트 검증 추가 완료

새로 추가된 timeRequiredcount 필드에 대한 검증이 적절하게 추가되었습니다.

application/src/main/kotlin/com/dobby/usecase/experiment/UpdateExperimentPostUseCase.kt (2)

32-33: 입력 필드 확장 완료

counttimeRequired 필드가 Input에 적절하게 추가되었습니다.


73-74: 출력 필드 확장 및 매핑 완료

PostInfo 출력 구조에 timeRequiredcount 필드가 추가되고, 업데이트된 포스트 데이터에서 올바르게 매핑됩니다.

Also applies to: 130-131

application/src/main/kotlin/com/dobby/usecase/experiment/CreateExperimentPostUseCase.kt (1)

77-78: 출력 필드 확장 및 매핑 완료

PostInfo에 timeRequiredcount 필드가 추가되고, 저장된 포스트 데이터에서 올바르게 매핑됩니다.

Also applies to: 148-149

presentation/src/main/kotlin/com/dobby/api/mapper/ExperimentPostMapper.kt (1)

107-108: 매퍼 함수 업데이트 완료

Create, Update, Get 플로우 전반에 걸쳐 timeRequiredcount 필드가 일관되게 매핑됩니다.

Also applies to: 147-148, 412-413


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

@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)
presentation/src/main/kotlin/com/dobby/api/dto/response/experiment/PostInfo.kt (1)

5-15: 응답 DTO의 durationInfo를 non-null로 설정하는 것은 API 계약 변경 폭이 큽니다

CreateExperimentPostUseCase.PostInfo에서는 durationInfo: DurationInfo?로 nullable이지만, 응답 DTO PostInfo에서는 durationInfo: DurationInfo로 non-null입니다. 매퍼에서 DurationInfo(input.durationInfo?.startDate, input.durationInfo?.endDate)로 변환하면 input이 null일 때 DurationInfo(null, null)이 되어, 구조적으로는 non-null이지만 의미상으로는 "정보 없음"입니다.

기존 클라이언트가 nullable 스키마를 기대할 경우 파싱 실패 가능성이 있습니다. DurationInfo?로 변경하거나, durationInfo가 항상 유의미한 값을 가지도록 보장하는 방안을 검토하세요.

🧹 Nitpick comments (1)
presentation/src/main/kotlin/com/dobby/api/dto/response/experiment/PostInfo.kt (1)

17-20: DurationInfo 스코프(재사용 여부)에 따라 중첩 클래스로 두는 것도 고려
DurationInfo가 이 DTO에서만 쓰이면 PostInfo.DurationInfo로 중첩해서 네임스페이스 오염을 줄이는 편이 깔끔합니다(반대로 여러 DTO에서 공유면 top-level 유지가 맞음).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4e71a4d and 97b91be.

📒 Files selected for processing (2)
  • presentation/src/main/kotlin/com/dobby/api/dto/response/experiment/PostInfo.kt (1 hunks)
  • presentation/src/main/kotlin/com/dobby/api/mapper/ExperimentPostMapper.kt (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • presentation/src/main/kotlin/com/dobby/api/mapper/ExperimentPostMapper.kt
🧰 Additional context used
🪛 GitHub Actions: ktlint-code-quality-check
presentation/src/main/kotlin/com/dobby/api/dto/response/experiment/PostInfo.kt

[error] 2-2: KtLint: Imports must be ordered lexicographically and without empty lines between groups.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build

Comment on lines 2 to 4
import com.dobby.enums.experiment.TimeSlot

import java.time.LocalDate
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

ktlint 실패(Import 그룹 사이 빈 줄/정렬)로 CI가 깨집니다 — 즉시 수정 필요
현재 import 사이 빈 줄 때문에 ktlint-code-quality-check가 실패합니다.

 import com.dobby.enums.experiment.TimeSlot
-
 import java.time.LocalDate
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import com.dobby.enums.experiment.TimeSlot
import java.time.LocalDate
import com.dobby.enums.experiment.TimeSlot
import java.time.LocalDate
🧰 Tools
🪛 GitHub Actions: ktlint-code-quality-check

[error] 2-2: KtLint: Imports must be ordered lexicographically and without empty lines between groups.

🤖 Prompt for AI Agents
In
presentation/src/main/kotlin/com/dobby/api/dto/response/experiment/PostInfo.kt
around lines 2 to 4, ktlint is failing because import groups are separated by an
extra blank line and/or misordered; remove the blank line between the imports
and ensure imports are sorted/ grouped according to project ktlint rules
(standard Kotlin stdlib/java imports first, then project imports) so that the
two imports appear contiguous and properly ordered without extra empty lines.

@chock-cho chock-cho merged commit 6f693b2 into dev Dec 14, 2025
4 checks passed
@chock-cho chock-cho deleted the feature/YS-589 branch December 14, 2025 09:11
@chock-cho chock-cho self-assigned this Dec 14, 2025
@chock-cho chock-cho added the ✨ FEATURE 기능 추가 label Dec 14, 2025
chock-cho added a commit that referenced this pull request Dec 15, 2025
…#174)

* feature: add timeRequired, count field to ExperimentPost responses

* fix: add fixture to non-import classes

* fix: fix compile errors
@chock-cho chock-cho mentioned this pull request Dec 15, 2025
6 tasks
chock-cho added a commit that referenced this pull request Dec 15, 2025
…#174)

* feature: add timeRequired, count field to ExperimentPost responses

* fix: add fixture to non-import classes

* fix: fix compile errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ FEATURE 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants