Skip to content

Conversation

@gonn-i
Copy link
Member

@gonn-i gonn-i commented Nov 28, 2025

✨ 변경 사항

  • 여행보드 수정 시, 과거에 생성된 여행의 경우 여행 시작일이 오늘 기준 과거 날짜이기 때문에 form validation에 의해 CTA 버튼이 비활성화되는 문제가 있었습니다.
  • 오늘 이전 날짜도 유효한 여행 시작일로 판단하도록 validation 로직을 수정했습니다.

➡️ 캘린더에서 이미 오늘 이전 날짜 선택이 disabled 처리되어 있어,
추가적인 form validation 로직 없이도 사용성에 영향을 주지 않는 것 같아요.

✅ 체크리스트

  • 기능 동작 확인
  • 코드 리뷰 반영
  • 테스트 통과
  • UI/UX 확인

📸 스크린샷 (선택)

default.mp4

📝 기타 참고 사항

Summary by CodeRabbit

  • 버그 수정
    • 날짜 범위 선택 검증이 개선되었습니다. 시작 날짜에 대한 불필요한 제약이 제거되어 더 유연한 날짜 선택이 가능해졌으며, 유효한 날짜 범위 확인만 수행됩니다.

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

@github-actions
Copy link

github-actions bot commented Nov 28, 2025

🎫 관련 Jira 티켓 🔗: Y26W2-430

📝 Jira 티켓 정보:

  • 제목: [FE] 여행보드 이름 수정할 때, CTA가 비활성화되는 이슈
  • 상태: 진행 중
  • 담당자: 김고은

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 28, 2025

개요

날짜 범위 선택기의 검증 로직이 단순화되었습니다. 시작 날짜가 오늘 이상이어야 한다는 조건이 제거되었으며, 새로운 검증은 두 경계 날짜의 존재 여부와 종료 날짜가 시작 날짜보다 이전이 아님만 확인합니다.

변경 사항

집합 / 파일 요약
날짜 범위 검증 로직 단순화
apps/web/src/domains/dashboard/components/base-form-field/index.tsx
dateRange 검증에서 과거 시작 날짜를 제외하는 조건 제거. 유효한 날짜 범위 확보만 검증하도록 변경

예상 코드 리뷰 난이도

🎯 2 (단순) | ⏱️ ~8분

  • 검증 로직 변경의 의도와 영향 범위 확인 필요
  • 제거된 과거 날짜 조건이 다른 비즈니스 로직에 의존하는지 검토 권장

🐰 날짜의 족쇄를 풀었네,

과거를 품을 수 있도록,

범위만 맞으면 된다 했고,

달력은 더 자유로워졌네! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경사항의 핵심을 정확하게 요약하고 있습니다. 과거 날짜의 여행 시작일에 대한 validation 허용이라는 주요 변경 사항을 명확하게 설명합니다.
Description check ✅ Passed PR 설명이 템플릿의 모든 필수 섹션을 포함하고 있으며, 문제 상황, 해결 방법, 추가 정보, 완료된 체크리스트, 그리고 스크린샷까지 제공하고 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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/Y26W2-430-board-edit

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
Contributor

@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: 0

🧹 Nitpick comments (1)
apps/web/src/domains/dashboard/components/base-form-field/index.tsx (1)

52-61: 과거 시작일 허용 로직은 요구사항과 일치합니다

dateRangevalidatefrom/to 존재 여부와 to >= from만 확인하도록 바뀌어서,

  • 과거 시작일은 허용하면서도
  • 미입력 상태나 종료일이 시작일보다 빠른 잘못된 구간은 막는

동작으로 정리된 점 좋습니다. PR 설명에 적힌 “과거 시작일 허용” 요구사항과도 일치합니다.

추가로, 이 블록은 항상 boolean만 반환하므로, (그리고 value가 혹시 undefined일 수도 있다는 점을 고려하면) 아래처럼 한 줄 boolean 표현으로 정리해 두면 가독성과 안정성이 조금 더 좋아질 것 같습니다(선택 사항입니다).

-          rules={{
-            validate: (value) => {
-              const today = new Date();
-              today.setHours(0, 0, 0, 0);
-
-              if (!value.from || !value.to || value.to < value.from) {
-                return false;
-              }
-
-              return true;
-            },
-          }}
+          rules={{
+            validate: (value) =>
+              !!value && !!value.from && !!value.to && value.to >= value.from,
+          }}

이렇게 하면 value가 초기값으로 undefined인 경우에도 런타임 에러 없이 “유효하지 않은 값”으로만 처리됩니다.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3648427 and ffe62fc.

📒 Files selected for processing (1)
  • apps/web/src/domains/dashboard/components/base-form-field/index.tsx (1 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). (2)
  • GitHub Check: build
  • GitHub Check: deploy

@github-actions
Copy link

This pull request (commit ffe62fc) has been deployed to Vercel ▲ - View GitHub Actions Workflow Logs

Name Link
🌐 Unique https://ssok-9zqsna1ma-sudosubin-team.vercel.app
🔍 Inspect https://vercel.com/sudosubin-team/ssok/7RRPDtpAr9sppjgLEqb2FuWQsZRh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants