Skip to content

과제 제출 기간 관련 로직 수정 ,코드 복구 및 짜잘한 수정 작업#470

Merged
HA-SEUNG-JEONG merged 10 commits into
developfrom
fix/mission
Apr 3, 2026
Merged

과제 제출 기간 관련 로직 수정 ,코드 복구 및 짜잘한 수정 작업#470
HA-SEUNG-JEONG merged 10 commits into
developfrom
fix/mission

Conversation

@HA-SEUNG-JEONG

@HA-SEUNG-JEONG HA-SEUNG-JEONG commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

🌱 연관된 이슈

☘️ 작업 내용

  • 기존 fix/mission 브랜치 존재 여부를 모르고 작업하여 코드 복구 작업 진행
  • MyHomeworkStatusCard 컴포넌트 네이밍 일관성 추가
  • 과제 제출 기간이 지난 경우에는 과제 제출 종료 안내 UI와 함께 과제 제출을 못하도록 수정

🍀 참고사항

스크린샷 (선택)

Summary by CodeRabbit

  • UI/UX 개선

    • 결제 완료 페이지 레이아웃·스타일 및 결제 정보 표시를 재설계했습니다.
    • 미션 카드의 잠금 아이콘 디자인을 업데이트했습니다.
    • 과제 상태 표시 UI를 개선하고 제출 버튼 동작·비활성화 처리를 명확히 했습니다.
  • 개선 사항

    • 미션 생성 시 목록 갱신이 즉시 반영되도록 데이터 갱신 흐름을 개선하고 성공 토스트를 명확히 표시합니다.
  • 문서

    • 내부 가이드들을 통합된 포함 문서로 정리했습니다.

@HA-SEUNG-JEONG HA-SEUNG-JEONG self-assigned this Apr 2, 2026
@vercel

vercel Bot commented Apr 2, 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 Apr 3, 2026 8:49am

@coderabbitai

coderabbitai Bot commented Apr 2, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

문서 모듈화(대표 규칙 파일 포함)와 결제 성공 페이지 UI 재설계, 미션 생성 뮤테이션에 React Query 캐시 무효화 추가, 일부 컴포넌트 임포트명·아이콘·타이포그래피 클래스 수정이 포함된 변경입니다.

Changes

Cohort / File(s) Summary
문서 모듈화
CLAUDE.md
도메인 설명·TanStack Query 패턴·백엔드 데이터 안전성·에러 핸들링 상세 섹션들을 각각 @.claude/rules/... 포함문으로 대체하여 문서를 외부 규칙 파일로 분리함.
결제 성공 UI 재설계
src/app/(service)/payment/success/page.tsx
전체 레이아웃/배경 및 내부 컨테이너 크기·패딩 변경, 성공 이미지로 교체, 결제 정보 섹션 구조 재편성, 하단 버튼을 수직에서 수평 레이아웃으로 변경, 일부 InfoRow 타이포그래피 클래스 상향 조정.
미션 생성 뮤테이션 캐시 무효화
src/components/common/modals/create-mission-modal.tsx
useQueryClient() 추가, createMissiononSuccessasync로 변경하고 queryClient.invalidateQueries(['missions', groupStudyId]) 호출 추가, 토스트 호출에 성공 유형 명시.
컴포넌트 임포트 및 접근성 변경
src/components/contents/mission-detail-content.tsx
MyHomeworkStatusMyHomeworkStatusCard로 교체, 내 과제 섹션 렌더링 유지, HomeworkCard 클릭 래퍼를 <button type="button">으로 변경하고 disabled 속성 추가.
내 과제 상태 로직 개선
src/components/card/my-homework-status-card.tsx
isSubmissionOpen 유도 변수 추가, 미제출 상태 문구를 제출 가능/불가에 따라 분기 표시하고 제출 모달은 제출 가능할 때만 렌더링하도록 변경.
아이콘 스타일 조정
src/components/card/mission-card.tsx
잠금( Lock ) 아이콘의 크기 클래스 h-[18px] w-[18px]size-225로 교체(색상·shrink 속성 유지).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 문서짚고 규칙 붙이고,
결제화면엔 새 옷 갈아입고,
캐시의 옷깃을 한번 털어,
임포트는 단정히, 아이콘은 쁘띠,
토스트는 환하게 띄우네 ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Title check ❓ Inconclusive 제목이 여러 작업(코드 복구, 네이밍 수정, 과제 제출 로직)을 포괄하고 있어 모호하며, '짜잘한 수정'은 비구체적인 표현이다. 제목을 더 구체적으로 수정하여 주요 변경사항을 명확히 표현하세요. 예: '과제 제출 기간 종료 후 제출 방지 로직 추가 및 컴포넌트 네이밍 정리'
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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/mission

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.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/app/(service)/payment/success/page.tsx (1)

344-358: ⚠️ Potential issue | 🟡 Minor

조건부 className 조합은 cn()으로 통일해 주세요.

Line 344-358은 조건 분기에 따른 클래스 조합이므로 cn() 유틸 사용 규칙에 맞춰 정리하는 편이 좋습니다.

수정 예시
+import { cn } from '@/components/common/ui/(shadcn)/lib/utils';

- className={
-   bold
-     ? 'font-designer-18b text-text-default'
-     : 'font-designer-16m text-text-subtle'
- }
+ className={cn(
+   bold
+     ? 'font-designer-18b text-text-default'
+     : 'font-designer-16m text-text-subtle',
+ )}

- className={
-   bold
-     ? 'font-designer-18b text-text-default'
-     : 'font-designer-16m text-text-default'
- }
+ className={cn(
+   bold
+     ? 'font-designer-18b text-text-default'
+     : 'font-designer-16m text-text-default',
+ )}

As per coding guidelines "**/*.{tsx,jsx}: Always use cn() utility for className composition. Never use template literal className strings."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/`(service)/payment/success/page.tsx around lines 344 - 358, The
conditional className strings used on the span elements that render {label}
(using the bold boolean) should be replaced with the cn() utility: import cn if
not already, and compute className via cn({ 'font-designer-18b
text-text-default': bold, 'font-designer-16m text-text-subtle': !bold }) for the
first span and similarly for the second span (use 'font-designer-18b
text-text-default' when bold else 'font-designer-16m text-text-default'); update
the className props on those span elements (the ones referencing bold and
rendering {label}) to use cn() consistently.
🤖 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/`(service)/payment/success/page.tsx:
- Around line 178-181: The InfoRow usage renders
paymentData?.amount?.toLocaleString() which can produce "undefined원" when amount
is missing; update the rendering in the InfoRow calls (the ones passing label
"상품 금액" and the other similar call around InfoRow at the later block) to provide
a safe fallback by checking paymentData?.amount (or using a nullish coalescing
fallback) before calling toLocaleString, and pass a formatted fallback string
(e.g., "-" or "0원") to the value prop so the UI never shows "undefined원".
- Line 147: Replace the forbidden Tailwind arbitrary width value in the payment
success page: remove the max-w-[860px] arbitrary class on the wrapper div (the
element with classes "rounded-150 bg-fill-neutral-subtle-default shadow-2
mx-auto w-full max-w-[860px] p-500") and swap it for the appropriate project
design-token class (e.g., the defined max-w token from your design system such
as max-w-<your-token-name> or container/token class used elsewhere) so the
layout uses a sanctioned project scale class instead of an arbitrary value.

---

Outside diff comments:
In `@src/app/`(service)/payment/success/page.tsx:
- Around line 344-358: The conditional className strings used on the span
elements that render {label} (using the bold boolean) should be replaced with
the cn() utility: import cn if not already, and compute className via cn({
'font-designer-18b text-text-default': bold, 'font-designer-16m
text-text-subtle': !bold }) for the first span and similarly for the second span
(use 'font-designer-18b text-text-default' when bold else 'font-designer-16m
text-text-default'); update the className props on those span elements (the ones
referencing bold and rendering {label}) to use cn() consistently.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e5e2036c-9d03-4eae-b929-fe17fce272e3

📥 Commits

Reviewing files that changed from the base of the PR and between b843120 and 9daca72.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (5)
  • CLAUDE.md
  • src/app/(service)/payment/success/page.tsx
  • src/components/card/mission-card.tsx
  • src/components/common/modals/create-mission-modal.tsx
  • src/components/contents/mission-detail-content.tsx

Comment thread src/app/(service)/payment/success/page.tsx
Comment on lines +178 to +181
<InfoRow
label="상품 금액"
value={`${paymentData?.amount?.toLocaleString()}원`}
/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

금액이 없을 때 undefined원이 노출될 수 있습니다.

paymentData?.amount?.toLocaleString() 결과가 없으면 사용자에게 깨진 문자열이 보입니다. fallback을 명시해 주세요.

수정 예시
- value={`${paymentData?.amount?.toLocaleString()}원`}
+ value={
+   paymentData?.amount != null
+     ? `${paymentData.amount.toLocaleString()}원`
+     : '-'
+ }

- value={`${paymentData?.amount?.toLocaleString()}원`}
+ value={
+   paymentData?.amount != null
+     ? `${paymentData.amount.toLocaleString()}원`
+     : '-'
+ }

Also applies to: 190-193

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/`(service)/payment/success/page.tsx around lines 178 - 181, The
InfoRow usage renders paymentData?.amount?.toLocaleString() which can produce
"undefined원" when amount is missing; update the rendering in the InfoRow calls
(the ones passing label "상품 금액" and the other similar call around InfoRow at the
later block) to provide a safe fallback by checking paymentData?.amount (or
using a nullish coalescing fallback) before calling toLocaleString, and pass a
formatted fallback string (e.g., "-" or "0원") to the value prop so the UI never
shows "undefined원".

@HA-SEUNG-JEONG HA-SEUNG-JEONG changed the title 코드 복구 및 짜잘한 수정 작업 과제 제출 기간 관련 로직 수정 ,코드 복구 및 짜잘한 수정 작업 Apr 2, 2026

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/card/my-homework-status-card.tsx (1)

36-51: ⚠️ Potential issue | 🟡 Minor

로딩 중/시작 전 상태를 제출 기간 종료로 묶어 표시하는 분기는 오해를 유발할 수 있습니다.

현재 분기에서는 IN_PROGRESS가 아니면 모두 종료 메시지를 보여서, 미션 데이터 로딩 중(mission 미정)이나 NOT_STARTED에서도 “제출 기간이 종료되었습니다.”가 노출됩니다. 상태를 최소 NOT_STARTED/ENDED로 분리하고, 로딩 중에는 중립 UI(예: 스켈레톤 또는 빈 상태)로 처리하는 게 안전합니다.

제안 수정안
-  const isSubmissionOpen = mission?.status === 'IN_PROGRESS';
+  const missionStatus = mission?.status;
+  const isSubmissionOpen = missionStatus === 'IN_PROGRESS';
+  const isMissionNotStarted = missionStatus === 'NOT_STARTED';
+  const isMissionStatusReady = missionStatus !== undefined;
...
-          <span className="text-text-subtlest font-designer-14r">
-            {isSubmissionOpen
-              ? '아직 과제를 제출하지 않았습니다.'
-              : '제출 기간이 종료되었습니다.'}
-          </span>
-          {isSubmissionOpen && <SubmitHomeworkModal missionId={missionId} />}
+          <span className="text-text-subtlest font-designer-14r">
+            {!isMissionStatusReady
+              ? '과제 상태를 확인하는 중입니다.'
+              : isSubmissionOpen
+                ? '아직 과제를 제출하지 않았습니다.'
+                : isMissionNotStarted
+                  ? '아직 제출 기간이 시작되지 않았습니다.'
+                  : '제출 기간이 종료되었습니다.'}
+          </span>
+          {isSubmissionOpen && <SubmitHomeworkModal missionId={missionId} />}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/card/my-homework-status-card.tsx` around lines 36 - 51, The
current rendering lumps mission undefined/loading and NOT_STARTED together as
"제출 기간이 종료되었습니다."—change the conditional in the MyHomeworkStatusCard component
so you explicitly handle mission being undefined (show a neutral/loading UI like
a skeleton or empty state), treat mission.status === 'NOT_STARTED' as a "제출 기간이
아직 시작되지 않았습니다." message, and only show the "제출 기간이 종료되었습니다." message when
mission.status === 'ENDED' (keep isSubmissionOpen defined as mission?.status ===
'IN_PROGRESS' and only render SubmitHomeworkModal when mission exists and
isSubmissionOpen is true); update checks referencing mission, isSubmissionOpen,
and myHomework.homeworkStatus accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/components/card/my-homework-status-card.tsx`:
- Around line 36-51: The current rendering lumps mission undefined/loading and
NOT_STARTED together as "제출 기간이 종료되었습니다."—change the conditional in the
MyHomeworkStatusCard component so you explicitly handle mission being undefined
(show a neutral/loading UI like a skeleton or empty state), treat mission.status
=== 'NOT_STARTED' as a "제출 기간이 아직 시작되지 않았습니다." message, and only show the "제출
기간이 종료되었습니다." message when mission.status === 'ENDED' (keep isSubmissionOpen
defined as mission?.status === 'IN_PROGRESS' and only render SubmitHomeworkModal
when mission exists and isSubmissionOpen is true); update checks referencing
mission, isSubmissionOpen, and myHomework.homeworkStatus accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0f036e8d-f2c1-42f4-ae3b-0a94feeaad9c

📥 Commits

Reviewing files that changed from the base of the PR and between 9daca72 and fd13041.

📒 Files selected for processing (2)
  • src/components/card/my-homework-status-card.tsx
  • src/components/contents/mission-detail-content.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/contents/mission-detail-content.tsx

@HA-SEUNG-JEONG HA-SEUNG-JEONG merged commit 5a237c0 into develop Apr 3, 2026
8 of 9 checks passed
@HA-SEUNG-JEONG HA-SEUNG-JEONG deleted the fix/mission branch April 3, 2026 07:30
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.

2 participants