Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds Kakao memo support: new constants and service for sending memos, message trimming/limits, and integrations in clinic, report, and notification UIs with character counting, recipient filtering, async send flow, and unified success alerts. Changes
Sequence DiagramsequenceDiagram
actor User
participant UI as Educator UI Component
participant Service as Kakao Service
participant API as Backend API
User->>UI: Trigger send (clinic/report/notification)
UI->>UI: Compose payload (title, description, image, webUrl)
UI->>Service: sendKakaoMemo(payload)
Service->>Service: normalize/trim fields (KAKAO_MESSAGE_LIMITS)
Service->>API: POST /kakao/memo
API-->>Service: Success/Error
Service-->>UI: Resolve/Reject
UI->>User: Update UI (alerts, reset/close, send-state)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 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 |
yoorrll
left a comment
There was a problem hiding this comment.
LGTM 넘 고생하셨씁니다 !!! 진짜 첨부파일 수정 기능 제외하면 다 했네요...!!!! 짱이다
There was a problem hiding this comment.
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 (2)
src/app/(dashboard)/educators/students/_components/modal/TalkNotificationModal.tsx (1)
109-113:⚠️ Potential issue | 🟠 Major전송 중 모달 종료를 막아야 상태 꼬임을 줄일 수 있습니다.
현재는 전송 중에도 닫기 동작이 가능해서, 요청 진행 중 폼/선택 상태가 먼저 초기화될 수 있습니다. 전송 중에는 닫기 경로를 차단하는 편이 안전합니다.
💡 Proposed fix
<Dialog open={isOpen} onOpenChange={(open) => { - if (!open) handleClose(); + if (!open && isSending) return; + if (!open) handleClose(); }} > ... <Button className="cursor-pointer h-[48px] px-[28px] py-[12px] rounded-[12px] bg-white border border-neutral-200 hover:bg-neutral-50 text-label-normal shadow-none" type="button" variant="outline" onClick={handleClose} + disabled={isSending} > 취소 </Button>Also applies to: 264-269
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/app/`(dashboard)/educators/students/_components/modal/TalkNotificationModal.tsx around lines 109 - 113, The Dialog currently allows closing while a send is in progress which can reset form/state; update the onOpenChange handler to ignore close events when the send flag is true (e.g., if (!open && isSending) return; else handleClose()), and apply the same guard to the other Dialog instance referenced (lines ~264-269). Also ensure any explicit close controls call handleClose only when not isSending so the modal cannot be dismissed mid-send.src/components/common/modals/KakaoNotificationModal.tsx (1)
94-97:⚠️ Potential issue | 🟠 Major전송 실패 시 사용자 피드백이 누락됩니다.
onSend실패 시 콘솔 로그만 남기고 종료되어 사용자 입장에서 실패 원인이 보이지 않습니다. 모달 유지는 좋지만 실패 알럿은 반드시 노출하는 편이 안전합니다.💡 Proposed fix
} catch (error) { console.error("Failed to send notification:", error); - // Keep modal open on failure + await showAlert({ + title: mode === "prepare" ? "준비 실패" : "전송 실패", + description: + mode === "prepare" + ? "카카오톡 발송 준비 중 오류가 발생했습니다." + : "카카오톡 전송 중 오류가 발생했습니다.", + }); + // Keep modal open on failure } finally {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/common/modals/KakaoNotificationModal.tsx` around lines 94 - 97, The catch block in KakaoNotificationModal's onSend handler only logs to console and leaves the user unaware of failure; update the catch to present a user-facing error (e.g., call the project's toast/error-notification helper or set a local error state that renders an inline alert) with a clear message including the error detail, keep the modal open, and still log the error for debugging (preserve console.error). Target the catch inside the onSend function of KakaoNotificationModal and use the existing UI feedback mechanism (toast.error, showAlert, or setError state) to surface the failure to the user.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/app/`(dashboard)/educators/exams/clinic/_components/ClinicHeader.tsx:
- Around line 63-84: When targetType is "all" the title uses
deliverableRecipients.length (one per student) but the UI expects total contact
count (students + parents); update the logic that builds the title before
calling sendKakaoMemo: compute a recipientCount variable where if targetType ===
"all" you sum for each recipient the number of available contacts
(Boolean(r.phone) + Boolean(r.parentPhone)), otherwise set recipientCount =
deliverableRecipients.length; then use recipientCount in the title (`[클리닉 알림]
${recipientCount}명 대상 (${targetLabel})`) and keep the existing
deliverableRecipients/nameList logic for the description and validation.
---
Outside diff comments:
In
`@src/app/`(dashboard)/educators/students/_components/modal/TalkNotificationModal.tsx:
- Around line 109-113: The Dialog currently allows closing while a send is in
progress which can reset form/state; update the onOpenChange handler to ignore
close events when the send flag is true (e.g., if (!open && isSending) return;
else handleClose()), and apply the same guard to the other Dialog instance
referenced (lines ~264-269). Also ensure any explicit close controls call
handleClose only when not isSending so the modal cannot be dismissed mid-send.
In `@src/components/common/modals/KakaoNotificationModal.tsx`:
- Around line 94-97: The catch block in KakaoNotificationModal's onSend handler
only logs to console and leaves the user unaware of failure; update the catch to
present a user-facing error (e.g., call the project's toast/error-notification
helper or set a local error state that renders an inline alert) with a clear
message including the error detail, keep the modal open, and still log the error
for debugging (preserve console.error). Target the catch inside the onSend
function of KakaoNotificationModal and use the existing UI feedback mechanism
(toast.error, showAlert, or setError state) to surface the failure to the user.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
src/app/(dashboard)/educators/exams/clinic/_components/ClinicHeader.tsxsrc/app/(dashboard)/educators/exams/report/_hooks/usePremiumReportTemplateActions.tsxsrc/app/(dashboard)/educators/exams/report/_hooks/useSimpleReportTemplateActions.tsxsrc/app/(dashboard)/educators/students/_components/modal/TalkNotificationModal.tsxsrc/components/common/modals/KakaoNotificationModal.tsxsrc/constants/kakao.tssrc/services/kakao.service.ts
⚡️ Lighthouse Report🏠 URL: http://localhost:3000/
|
🔗 관련 이슈
✨ 작업 단계 및 변경 사항
작업 단계: Phase 2 (API 연동 및 전송 UX 정합성 개선)
변경 사항:
src/services/kakao.service.ts)src/constants/kakao.ts)targetType(학생/학부모/전체) 반영🧪 테스트 방법
리뷰어가 확인해야 할 핵심 포인트입니다.
targetType이 제목/내용에 반영되어 전송되는가?KAKAO_MESSAGE_LIMITS.DESCRIPTION)으로 동작하는가?📸 스크린샷 (선택)
(원하면 학생 알림 모달/공통 카카오 모달 화면 캡처 추가 가능)
✅ 체크리스트
Phase에 맞는 이슈 체크리스트를 모두 완료했는가?Summary by CodeRabbit
New Features
Improvements
Documentation