Skip to content

Comments

클로드 가이드 추가 및 스터디 개설 날짜 수정#373

Merged
HA-SEUNG-JEONG merged 5 commits intodevelopfrom
claude
Feb 4, 2026
Merged

클로드 가이드 추가 및 스터디 개설 날짜 수정#373
HA-SEUNG-JEONG merged 5 commits intodevelopfrom
claude

Conversation

@HA-SEUNG-JEONG
Copy link
Contributor

@HA-SEUNG-JEONG HA-SEUNG-JEONG commented Feb 4, 2026

🌱 연관된 이슈

☘️ 작업 내용

  • CLAUDE.md 수정
  • 스터디 시작이 오늘부터가 아닌 다음날부터 가능하도록 다시 수정

🍀 참고사항

스크린샷 (선택)

Summary by CodeRabbit

  • 버그 수정 및 개선사항

    • 스터디 그룹 생성 시 날짜 유효성 강화: 시작일은 내일부터 선택 가능, 종료일은 시작일 또는 그 이후만 허용
    • 날짜 입력의 최소값이 한국 시간 기준으로 정확히 적용되도록 개선
  • 문서

    • TanStack Query 사용 예시 및 레거시 API 안내를 포함한 아키텍처 및 사용 가이드 문서 업데이트

@HA-SEUNG-JEONG HA-SEUNG-JEONG self-assigned this Feb 4, 2026
@vercel
Copy link

vercel bot commented Feb 4, 2026

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

Project Deployment Actions Updated (UTC)
study-platform-client-dev Ready Ready Preview, Comment Feb 4, 2026 7:43am

@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

문서에 TanStack Query 사용 예시와 레거시 axios 예시를 추가하고, 그룹 스터디 폼에 날짜 검증(superRefine)을 도입했으며 UI에서 한국 시간 기준으로 날짜 최소값을 내일로 변경했습니다.

Changes

Cohort / File(s) Summary
문서화
CLAUDE.md
TanStack Query의 useQuery/useMutation 사용 패턴, queryKey 관례, post-mutation invalidation 예시 및 레거시 axios 사용 예시(레거시 방식) 추가; 아키텍처 다이어그램에 TanStack Query 기반 서버 상태 관리 참조 추가.
폼 검증
src/features/study/group/model/group-study-form.schema.ts
parseDate 헬퍼 추가 및 superRefine에서 startDate가 한국 기준 내일(또는 이후)인지, endDatestartDate보다 빠르지 않은지 검사하는 커스텀 이슈 검증 로직 추가.
UI 날짜 입력
src/features/study/group/ui/step/step1-group.tsx
addDaysgetKoreaDate를 사용해 날짜 입력의 최소값을 한국 시간 기준으로 +1일(내일)로 변경; endDate의 fallback 최소값 로직 조정.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 한국 시간에 한 발짝,
내일로 점프하는 작은 계획,
검증은 당근으로 깔끔히,
문서엔 길을 밝힌 표식,
함께 뛰어 더 나은 코드로! 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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 제목은 변경사항의 주요 내용을 명확하게 요약하고 있습니다. CLAUDE.md 가이드 추가와 스터디 개설 날짜 수정이라는 두 가지 주요 변경사항을 간결하게 표현했습니다.

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

✨ 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 claude

Comment @coderabbitai help to get the list of available commands and usage tips.

@HA-SEUNG-JEONG HA-SEUNG-JEONG merged commit 242ad0c into develop Feb 4, 2026
8 checks passed
@HA-SEUNG-JEONG HA-SEUNG-JEONG deleted the claude branch February 4, 2026 07:44
Copy link

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

🤖 Fix all issues with AI agents
In `@src/features/study/group/model/group-study-form.schema.ts`:
- Around line 105-139: The validation wrongly parses YYYY-MM-DD into local Date
via parseDate causing timezone drift; replace the date arithmetic with pure
string comparisons using KST-based reference strings: import getKoreaDate (and
use the same format function used by the UI, e.g., formatKoreaYMD) to compute
tomorrowKstYmd, then for the startDate check (ISO_DATE_REGEX and data.startDate)
compare data.startDate < tomorrowKstYmd and call ctx.addIssue if true; likewise,
for the endDate vs startDate check (ISO_DATE_REGEX on both) compare data.endDate
< data.startDate and call ctx.addIssue if true, removing reliance on
parseDate/new Date for validation.

Comment on lines 105 to 139
const parseDate = (s: string) => {
const [y, m, d] = s.split('-').map(Number);

return new Date(y, m - 1, d);
};

if (ISO_DATE_REGEX.test(data.startDate)) {
const start = parseDate(data.startDate);
const today = new Date();
const tomorrow = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate() + 1,
);

if (start < tomorrow) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: '스터디 시작일은 내일부터 설정할 수 있습니다.',
path: ['startDate'],
});
}
}

// 종료일은 시작일과 같거나 이후여야 함
if (ISO_DATE_REGEX.test(data.startDate) && ISO_DATE_REGEX.test(data.endDate)) {
const start = parseDate(data.startDate);
const end = parseDate(data.endDate);
if (end < start) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: '종료일은 시작일과 같거나 이후여야 합니다.',
path: ['endDate'],
});
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's examine the actual schema file
cat -n src/features/study/group/model/group-study-form.schema.ts | head -150

Repository: code-zero-to-one/study-platform-client

Length of output: 5392


🏁 Script executed:

# Check if getKoreaDate utility exists and how it's implemented
fd -t f "time" src/utils --exec cat -n {} \;

Repository: code-zero-to-one/study-platform-client

Length of output: 5638


🏁 Script executed:

# Search for getKoreaDate usage in the UI
rg "getKoreaDate|formatKoreaYMD" src/features/study/group -B 2 -A 2

Repository: code-zero-to-one/study-platform-client

Length of output: 1441


🏁 Script executed:

# Check the full schema file to understand context
wc -l src/features/study/group/model/group-study-form.schema.ts

Repository: code-zero-to-one/study-platform-client

Length of output: 143


🏁 Script executed:

# Verify the endDate comparison logic in the proposed fix
rg "endDate.*startDate" src/features/study/group -B 3 -A 3

Repository: code-zero-to-one/study-platform-client

Length of output: 64


스키마의 로컬 타임존 해석으로 인한 KST 검증 불일치 해결 필요

UI에서 formatKoreaYMD(addDays(getKoreaDate(), 1))로 KST 기준 내일 날짜를 min 속성으로 설정하지만, 스키마의 parseDate()new Date(y, m-1, d)로 브라우저의 로컬 타임존으로 해석합니다. 따라서 KST가 아닌 다른 타임존의 사용자에게서는 검증 결과가 어긋납니다.

YYYY-MM-DD 문자열 직접 비교로 타임존 해석을 완전히 제거하는 것이 안전합니다.

권장 수정안
    if (ISO_DATE_REGEX.test(data.startDate)) {
-      const start = parseDate(data.startDate);
-      const today = new Date();
-      const tomorrow = new Date(
-        today.getFullYear(),
-        today.getMonth(),
-        today.getDate() + 1,
-      );
-
-      if (start < tomorrow) {
+      const todayKst = getKoreaDate();
+      const tomorrow = new Date(todayKst);
+      tomorrow.setDate(todayKst.getDate() + 1);
+      const toYmd = (d: Date) =>
+        `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(
+          d.getDate(),
+        ).padStart(2, '0')}`;
+      const tomorrowYmd = toYmd(tomorrow);
+
+      if (data.startDate < tomorrowYmd) {
         ctx.addIssue({
           code: z.ZodIssueCode.custom,
           message: '스터디 시작일은 내일부터 설정할 수 있습니다.',
           path: ['startDate'],
         });
       }
     }

     // 종료일은 시작일과 같거나 이후여야 함
     if (ISO_DATE_REGEX.test(data.startDate) && ISO_DATE_REGEX.test(data.endDate)) {
-      const start = parseDate(data.startDate);
-      const end = parseDate(data.endDate);
-      if (end < start) {
+      if (data.endDate < data.startDate) {
         ctx.addIssue({
           code: z.ZodIssueCode.custom,
           message: '종료일은 시작일과 같거나 이후여야 합니다.',
           path: ['endDate'],
         });
       }
     }

상단에 import { getKoreaDate } from '@/utils/time'; 추가 필요.

🤖 Prompt for AI Agents
In `@src/features/study/group/model/group-study-form.schema.ts` around lines 105 -
139, The validation wrongly parses YYYY-MM-DD into local Date via parseDate
causing timezone drift; replace the date arithmetic with pure string comparisons
using KST-based reference strings: import getKoreaDate (and use the same format
function used by the UI, e.g., formatKoreaYMD) to compute tomorrowKstYmd, then
for the startDate check (ISO_DATE_REGEX and data.startDate) compare
data.startDate < tomorrowKstYmd and call ctx.addIssue if true; likewise, for the
endDate vs startDate check (ISO_DATE_REGEX on both) compare data.endDate <
data.startDate and call ctx.addIssue if true, removing reliance on parseDate/new
Date for validation.

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