Skip to content

유효하지 않은 링크에 대한 문제 수정#448

Merged
HA-SEUNG-JEONG merged 2 commits into
developfrom
fix/peer-review
Mar 25, 2026
Merged

유효하지 않은 링크에 대한 문제 수정#448
HA-SEUNG-JEONG merged 2 commits into
developfrom
fix/peer-review

Conversation

@HA-SEUNG-JEONG

@HA-SEUNG-JEONG HA-SEUNG-JEONG commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

🌱 연관된 이슈

☘️ 작업 내용

과제 제출 과정에서 링크 입력 유효성 추가 검증

🍀 참고사항

스크린샷 (선택)

Summary by CodeRabbit

릴리스 노트

  • New Features

    • 외부 링크 자동 정규화 및 URL 유효성 검사 기능 추가로 링크 처리 안전성 향상
  • Bug Fixes

    • 과제 제출/편집 시 첨부 링크 검증 강화 및 제출 데이터의 링크 정상화
    • 앱 내 여러 외부 링크가 올바르게 열리도록 링크 처리 안정화
  • Style

    • 카드 색상·그라데이션 및 간격 조정, 아바타·텍스트 크기·타이포그래피 개선
  • Refactor

    • 조건부 스타일 처리 간소화로 코드 가독성 향상

- 과제 제출 과정에서 링크 입력 유효성 추가 검증
@HA-SEUNG-JEONG HA-SEUNG-JEONG self-assigned this Mar 25, 2026
@vercel

vercel Bot commented Mar 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
study-platform-client-dev Error Error Mar 25, 2026 8:42am

@coderabbitai

coderabbitai Bot commented Mar 25, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ae49b9f1-7cd7-42c1-8d20-05bd3bf9d6ee

📥 Commits

Reviewing files that changed from the base of the PR and between cb309b4 and 81f47d3.

📒 Files selected for processing (1)
  • src/features/mentoring/ui/note-consultation/note-consultation-composite.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/features/mentoring/ui/note-consultation/note-consultation-composite.tsx

📝 Walkthrough

Walkthrough

외부 링크 유효성 검사 및 포맷팅 유틸을 추가하고, 숙제 제출/수정 모달과 다수 컴포넌트의 외부 링크에 이를 적용했습니다. 일부 UI 클래스와 컴포넌트 내부 클래스 조합이 정리되고 텍스트 입력 제한이 조정되었습니다.

Changes

Cohort / File(s) Summary
유틸 추가
src/utils/validation.ts, src/utils/format.ts
isValidUrl(url)formatExternalLink(url) 추가: 입력 트림, 간단 유효성 검사, 필요시 https:// 접두어 추가 및 정규화 로직 제공.
숙제 모달
src/components/common/modals/submit-homework-modal.tsx, src/components/common/modals/edit-homework-modal.tsx
첨부 링크 폼 스키마에 URL 검증(isValidUrl) 추가; 제출/수정 페이로드에서 formatExternalLink()로 링크 정규화; textContent UI 최대값을 5000→1000으로 조정해 스키마와 일치시킴.
컨텐츠/리스트/카드 외부 링크 적용
src/components/contents/homework-detail-content.tsx, src/components/lists/study-list-table.tsx, src/components/schedule/today-study-card.tsx, src/features/mentoring/ui/note-consultation/note-consultation-composite.tsx, src/features/study/one-to-one/history/ui/study-history-row.tsx, src/components/hall-of-fame/mvp-team-card.tsx
여러 컴포넌트의 앵커 hrefformatExternalLink(...)로 감싸 링크 포맷/정규화 적용; 일부 링크 렌더링 조건(예: 빈 링크 시 null 반환) 보강.
스타일 및 className 정리
src/components/hall-of-fame/mvp-team-card.tsx, src/components/schedule/today-study-card.tsx, src/features/mentoring/ui/note-consultation/note-consultation-composite.tsx, src/features/study/one-to-one/history/ui/study-history-row.tsx
Tailwind 클래스 및 사이징 조정, cn(...)로 className 구성 통일, 일부 텍스트/배지 내용 및 버튼 type 명시 등 UI/스타일 변경.

Estimated code review effort

🎯 3 (보통 수준) | ⏱️ ~25분

Possibly related PRs

토끼의 축하 시

🐰✨ 링크들에 옷을 입혀주고,
빈칸엔 빈집을 남기지 않네,
https로 손잡고 출발하니,
외부 세상도 안심이야,
당근으로 축하! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.65% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 PR의 주요 변경사항인 링크 유효성 검증 추가를 명확하게 요약하고 있습니다.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/peer-review

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 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

📥 Commits

Reviewing files that changed from the base of the PR and between 7cce796 and cb309b4.

📒 Files selected for processing (10)
  • src/components/common/modals/edit-homework-modal.tsx
  • src/components/common/modals/submit-homework-modal.tsx
  • src/components/contents/homework-detail-content.tsx
  • src/components/hall-of-fame/mvp-team-card.tsx
  • src/components/lists/study-list-table.tsx
  • src/components/schedule/today-study-card.tsx
  • src/features/mentoring/ui/note-consultation/note-consultation-composite.tsx
  • src/features/study/one-to-one/history/ui/study-history-row.tsx
  • src/utils/format.ts
  • src/utils/validation.ts

@HA-SEUNG-JEONG HA-SEUNG-JEONG merged commit 36e332d into develop Mar 25, 2026
8 of 9 checks passed
@HA-SEUNG-JEONG HA-SEUNG-JEONG deleted the fix/peer-review branch March 25, 2026 07:44
@HA-SEUNG-JEONG HA-SEUNG-JEONG restored the fix/peer-review branch March 25, 2026 07:45
@coderabbitai coderabbitai Bot mentioned this pull request Mar 25, 2026
@HA-SEUNG-JEONG HA-SEUNG-JEONG deleted the fix/peer-review branch April 3, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant