Repository navigation
[Fix] 티칭맵 스텝 제목 누락 버그 수정 - #147
Conversation
|
Warning Review limit reached
Next review available in: 115 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesTeachingMap 제목 처리
Estimated code review effort: 1 (Trivial) | ~3 minutes Mergeability Score: 🟠 High · up to The PR is intended to prevent teaching-map creation failures by falling back to the material title, but the current implementation still saves the AI title directly, so affected requests may continue returning 500 errors. Merge should be blocked until the fallback value is used. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/main/java/com/teaching/backend/domain/teachingmap/service/TeachingMapService.java`:
- Around line 193-196: Update the TeachingMapStep.create call in the surrounding
service method to pass the computed title variable instead of node.title(),
ensuring null or blank AI titles are persisted using material.getTitle() as the
fallback.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 62f04ec5-b409-4c2d-b6a6-c92ab36a8394
📒 Files selected for processing (1)
src/main/java/com/teaching/backend/domain/teachingmap/service/TeachingMapService.java
EH-OI
left a comment
There was a problem hiding this comment.
수고하셨어요! 🙌
자료 많은 폴더에서 티칭맵 생성할 때 500 에러 나던 거 원인 잘 찾으셨네요.
AI 응답 검증(validateAiResult)에서 title 값 자체는 안 보고 있었던 부분이라
놓치기 쉬웠을 것 같은데 로그 보고 잘 짚으신 것 같아요.
title 없을 때 자료 원제목으로 fallback 처리한 것도 좋은 선택인 것 같습니다 —
사용자 입장에서 생성 자체가 실패하는 것보다 스텝 제목이 자료명으로 대체되는 게
훨씬 자연스러운 경험일 것 같아요.
고생하셨습니다 👍
✨ 어떤 이유로 PR를 하셨나요?
📋 세부 내용 - 왜 해당 PR이 필요한지 작업 내용을 자세하게 설명해주세요
티칭맵 생성(
POST /teaching-maps) 시 자료 개수가 많은 폴더(예: 15개)에서 간헐적으로500 Internal Server Error가 발생하던 문제를 수정했습니다.title이 비어있는 경우가 있었는데,validateAiResult()가 노드 개수/step 연속성/materialId 중복만 검증하고title값 자체는 검증하지 않아 그대로 통과됨 →TeachingMapStep.create()에서stepTitle이 null인 채로 DB insert 시도 →teaching_map_steps.step_titleNOT NULL 제약 위반으로DataIntegrityViolationException발생createTeachingMap()에서 스텝 생성 시node.title()이 null/blank이면 해당 자료(Material)의 원제목으로 대체하도록 fallback 로직 추가. AI 응답 품질과 무관하게 티칭맵 생성 자체는 항상 성공(200 OK)하도록 처리validateAiResult)은 변경하지 않음 — 실패 처리 대신 안전한 기본값으로 채우는 방향으로 결정📸 작업 화면 스크린샷
(재현했던 자료 15개 폴더로 재요청 → 200 OK 응답 스크린샷 첨부 예정)
🚨 관련 이슈 번호 #146
Summary by CodeRabbit