Skip to content

문의 이미지 미반영 및 multipart 인터셉터 버그 수정#446

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

문의 이미지 미반영 및 multipart 인터셉터 버그 수정#446
HA-SEUNG-JEONG merged 2 commits into
developfrom
fix/study-question

Conversation

@HA-SEUNG-JEONG

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

Copy link
Copy Markdown
Contributor

Summary

  • 문의 수정 시 이미지 변경 후 반영 안 되는 버그 수정 (S3 업로드 완료 후 쿼리 재무효화)
  • multipart 인터셉터에서 토큰 갱신 재시도 시 잘못된 axios 인스턴스 사용 수정
  • 스터디 후기 작성 기간을 종료 후 7일 이내로 제한
  • Tailwind 임의값 제거 및 커스텀 토큰으로 교체 (min-h-150, max-w-500, size-icon)

Changes

Bug Fixes

파일 내용
src/components/common/modals/question-modal.tsx S3 업로드 완료 후 invalidateQueries 재호출하여 이미지 포함 최신 데이터 로드
src/api/client/axios.ts 토큰 갱신 후 재시도 시 axiosInstanceaxiosInstanceForMultipart (2곳), timeout 10s → 60s
src/app/(service)/(my)/my-study-review/_components/completed-study-review-page.tsx isWithinReviewPeriod() 추가 — 종료 후 7일 초과 시 후기 작성 차단

Style

파일 내용
src/app/global.css @utility min-h-150, max-w-500, size-icon 토큰 추가
src/components/common/ui/image-upload-input.tsx border-gray-300border-border-default, 파일 크기 힌트 텍스트 추가, 임의값 제거

Test plan

  • 스터디 문의 이미지 수정 후 저장 시 변경된 이미지가 즉시 반영되는지 확인
  • 문의 등록/수정 중 토큰이 만료될 경우 자동 갱신 후 파일 업로드 정상 처리되는지 확인
  • 스터디 종료 후 7일 이후에는 후기 작성 버튼이 동작하지 않는지 확인
  • 이미지 업로드 컴포넌트의 파일 크기 힌트 텍스트 표시 확인

🤖 Generated with Claude Code

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 스터디 리뷰에 7일 리뷰 기간 제한 추가
  • 버그 수정

    • 파일/이미지 업로드 안정성 개선 (업로드 시간 허용량 증가 및 재시도 동작 개선)
    • 편집 시 이미지 업로드 후 관련 데이터 캐시 자동 갱신
  • 개선사항

    • 이미지 업로드 UI 개선(최대 파일 크기 표시, 미리보기·아이콘 및 크기 스타일 업데이트)
    • 전역 유틸리티 스타일(최소 높이, 최대 너비, 아이콘 크기) 추가

  └ S3 업로드 후 쿼리 재무효화, 토큰 갱신 재시도 인스턴스 수정, 후기 작성 기간 7일 제한 적용

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@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 1:59am

@coderabbitai

coderabbitai Bot commented Mar 25, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 300c14e7-7eab-4e53-9b90-613ce7f9b6a5

📥 Commits

Reviewing files that changed from the base of the PR and between 39e344d and acf6e36.

📒 Files selected for processing (1)
  • src/components/common/ui/image-upload-input.tsx

📝 Walkthrough

Walkthrough

다중부분 업로드 타임아웃을 10초에서 60초로 늘리고, 토큰 갱신 후 재시도에서 multipart 전용 axios 인스턴스를 사용하도록 수정했습니다. 리뷰 페이지에 종료일 기준 7일 검토 기간 검증을 추가하고, 글로벌 유틸리티 CSS와 모달·이미지 업로드 관련 UI·캐시 무효화 로직을 조정했습니다.

Changes

Cohort / File(s) Summary
API 인프라 구성
src/api/client/axios.ts
axiosInstanceForMultipart의 timeout을 1000060000으로 증가. 토큰 리프레시 후 재요청을 JSON 인스턴스가 아닌 multipart 인스턴스로 재전송하도록 수정(타임아웃/설정 유지).
검토 기간 검증
src/app/(service)/(my)/my-study-review/_components/completed-study-review-page.tsx
종료시간 기준 7일(상수 REVIEW_PERIOD_DAYS = 7) 검토 윈도우 검사(isWithinReviewPeriod) 추가. 검토 기간을 벗어나면 클릭 핸들러가 즉시 반환하도록 변경.
스타일 유틸리티
src/app/global.css
Tailwind 유틸리티 3개 추가: min-h-150(min-height:150px), max-w-500(max-width:500px), size-icon(width/height:36px).
모달 및 이미지 업로드 컴포넌트
src/components/common/modals/question-modal.tsx, src/components/common/ui/image-upload-input.tsx
question-modaluseQueryClient 추가 및 이미지 업로드 성공 시 edit 모드에서 관련 쿼리 무효화 추가. 폼 리셋 로직을 모달 닫힘 시점으로 이동. image-upload-input의 드래그 이벤트 타입, 테두리 색상, 간격, 미리보기/버튼 스타일(class)과 에러 텍스트 스타일 조정, 빈 상태에 최대 크기(MB) 표시 추가.

Sequence Diagram(s)

(생성 조건에 해당하지 않아 생략)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐰 토큰은 길어졌네, 업로드도 한숨 돌려,
7일 창문으로 조심히 살펴보렴,
CSS 한 땀 더해 아이콘 반짝,
모달은 닫힐 때 정리해요,
이미지 올라가면 쿼리도 깨끗이! ✨

🚥 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 제목이 주요 변경사항들을 정확하게 요약하고 있습니다. '문의 이미지 미반영 및 multipart 인터셉터 버그 수정'은 PR의 핵심 목표 두 가지(이미지 미반영 버그 수정, multipart 인터셉터 버그 수정)를 명확하게 전달합니다.

✏️ 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/study-question

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.

@HA-SEUNG-JEONG HA-SEUNG-JEONG self-assigned this Mar 25, 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.

Actionable comments posted: 2

🤖 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)/(my)/my-study-review/_components/completed-study-review-page.tsx:
- Around line 168-170: The early return in the completed review flow (the
isWithinReviewPeriod(study.endTime) check) silently stops rendering and should
instead show a user-facing toast; update the branch in the component that calls
isWithinReviewPeriod to invoke the toast API (useToastStore) with a clear
message about reviews being outside the allowed period before returning,
matching other branches' behavior (i.e., call useToastStore().show or the
project’s toast method with a descriptive title/body and appropriate intent) so
users see why the action was blocked.

In `@src/components/common/ui/image-upload-input.tsx`:
- Around line 161-163: The JSX renders sizeError with a non-existent CSS token
class "text-text-danger"; update the class to use the correct semantic token
class (e.g., "text-text-error") or apply the CSS variable --color-text-error
(via your existing token-based class) so the error text uses the defined token;
locate the JSX that outputs sizeError (the <p> rendering of sizeError) and
replace "text-text-danger" with the correct token-based class name.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5a792ee7-ed97-443e-aead-30da0d4b9c30

📥 Commits

Reviewing files that changed from the base of the PR and between fc46d4b and 39e344d.

📒 Files selected for processing (5)
  • src/api/client/axios.ts
  • src/app/(service)/(my)/my-study-review/_components/completed-study-review-page.tsx
  • src/app/global.css
  • src/components/common/modals/question-modal.tsx
  • src/components/common/ui/image-upload-input.tsx

Comment thread src/components/common/ui/image-upload-input.tsx
@HA-SEUNG-JEONG HA-SEUNG-JEONG merged commit 0c060c7 into develop Mar 25, 2026
7 of 9 checks passed
@HA-SEUNG-JEONG HA-SEUNG-JEONG deleted the fix/study-question branch March 25, 2026 00:38
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