유효하지 않은 링크에 대한 문제 수정#448
Conversation
- 과제 제출 과정에서 링크 입력 유효성 추가 검증
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough외부 링크 유효성 검사 및 포맷팅 유틸을 추가하고, 숙제 제출/수정 모달과 다수 컴포넌트의 외부 링크에 이를 적용했습니다. 일부 UI 클래스와 컴포넌트 내부 클래스 조합이 정리되고 텍스트 입력 제한이 조정되었습니다. Changes
Estimated code review effort🎯 3 (보통 수준) | ⏱️ ~25분 Possibly related PRs
토끼의 축하 시
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
🧹 Nitpick comments (1)
src/components/common/modals/edit-homework-modal.tsx (1)
108-112: 빈 문자열 처리 시undefined대신''가 전달될 수 있습니다.
attachmentLink가 빈 문자열''일 경우, 삼항 연산자는 falsy로 평가되어formatExternalLink를 거치지 않고''를 그대로 반환합니다. 백엔드에서 빈 문자열과undefined를 다르게 처리한다면 의도치 않은 동작이 발생할 수 있습니다.💡 명시적으로 undefined 처리 제안
optionalSubmission: { link: values.attachmentLink ? formatExternalLink(values.attachmentLink) - : values.attachmentLink, + : undefined, },🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/common/modals/edit-homework-modal.tsx` around lines 108 - 112, The code currently may pass '' to optionalSubmission.link when values.attachmentLink is an empty string; change the assignment so empty or whitespace-only strings become undefined and only non-empty strings are passed (after formatting): check values.attachmentLink (e.g., values.attachmentLink?.trim() === ''), set optionalSubmission.link to undefined for empty/whitespace, otherwise set it to formatExternalLink(values.attachmentLink); update the optionalSubmission object assignment to use this explicit check referencing optionalSubmission, attachmentLink, values and formatExternalLink.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/components/common/modals/edit-homework-modal.tsx`:
- Around line 108-112: The code currently may pass '' to optionalSubmission.link
when values.attachmentLink is an empty string; change the assignment so empty or
whitespace-only strings become undefined and only non-empty strings are passed
(after formatting): check values.attachmentLink (e.g.,
values.attachmentLink?.trim() === ''), set optionalSubmission.link to undefined
for empty/whitespace, otherwise set it to
formatExternalLink(values.attachmentLink); update the optionalSubmission object
assignment to use this explicit check referencing optionalSubmission,
attachmentLink, values and formatExternalLink.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a68803ae-b04b-4aa1-bbf1-ef9a387ec03f
📒 Files selected for processing (10)
src/components/common/modals/edit-homework-modal.tsxsrc/components/common/modals/submit-homework-modal.tsxsrc/components/contents/homework-detail-content.tsxsrc/components/hall-of-fame/mvp-team-card.tsxsrc/components/lists/study-list-table.tsxsrc/components/schedule/today-study-card.tsxsrc/features/mentoring/ui/note-consultation/note-consultation-composite.tsxsrc/features/study/one-to-one/history/ui/study-history-row.tsxsrc/utils/format.tssrc/utils/validation.ts
🌱 연관된 이슈
☘️ 작업 내용
과제 제출 과정에서 링크 입력 유효성 추가 검증
🍀 참고사항
스크린샷 (선택)
Summary by CodeRabbit
릴리스 노트
New Features
Bug Fixes
Style
Refactor