fix: API 성능 개선 및 UI 버그 수정 - #103
Conversation
- useDispute: staleTime 30s 추가 — 페이지 이동 시 캐시 재사용 - useJudgment: staleTime 10m 추가 — 판결 결과 캐시 유지 - result route: DB 쿼리 3번 → 1번으로 통합 - runJudge: window.location.reload() → invalidateQueries 교체 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…x/api-performance-ja
…x/api-performance-ja
- blobUrlRef로 이전 blob URL 추적 - 두 번째 이미지 선택 시 이전 URL revokeObjectURL 처리 - 컴포넌트 언마운트 시 마지막 URL 해제 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- BackButton 공통 클라이언트 컴포넌트 분리 (router.back + MUI 아이콘) - privacy/page.tsx, terms/page.tsx에서 'use client' 제거 - 정적 콘텐츠를 서버에서 렌더링하여 초기 로딩 개선 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthrough모든 API 라우트의 사용자 인증 방식을 NextAuth 세션 조회에서 JWT 기반 ChangesAPI 인증 방식 JWT 요청 기반 전환
프론트엔드 UX 개선
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/app/api/diary/route.ts (1)
73-75: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win에러 로깅에
console.error사용 권장다른 API 라우트들과 일관성을 위해
console.log대신console.error를 사용하세요.♻️ 제안된 수정
} catch (error) { - console.log(error); + console.error('[GET /api/diary] failed', error); return NextResponse.json<ApiResponse>(🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/app/api/diary/route.ts` around lines 73 - 75, In the catch block of the diary API route handler, change the console.log call to console.error when logging the error variable. This ensures consistency with how errors are logged across other API routes in the codebase.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/ui/BackButton.tsx`:
- Line 17: The aria-label attribute in the BackButton component uses "뒤로 가기"
(with space) but the existing Header back button uses "뒤로가기" (without space).
Change the aria-label value in the BackButton.tsx file from "뒤로 가기" to "뒤로가기" to
ensure consistency across the application for screen reader text and test
reliability.
---
Nitpick comments:
In `@src/app/api/diary/route.ts`:
- Around line 73-75: In the catch block of the diary API route handler, change
the console.log call to console.error when logging the error variable. This
ensures consistency with how errors are logged across other API routes in the
codebase.
🪄 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: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 8ff33021-3d73-4195-b136-2d8252e8a50c
📒 Files selected for processing (27)
src/app/(page)/disputes/[id]/DisputePage.module.scsssrc/app/(page)/disputes/[id]/page.tsxsrc/app/(page)/mypage/edit/page.tsxsrc/app/(page)/privacy/page.tsxsrc/app/(page)/terms/page.tsxsrc/app/api/calendar/route.tssrc/app/api/diary/route.tssrc/app/api/disputes/[id]/judge/route.tssrc/app/api/disputes/[id]/result/route.tssrc/app/api/disputes/[id]/route.tssrc/app/api/disputes/[id]/statements/route.tssrc/app/api/disputes/[id]/statements/submit/route.tssrc/app/api/disputes/[id]/status/route.tssrc/app/api/disputes/route.tssrc/app/api/rooms/[id]/close/route.tssrc/app/api/rooms/[id]/invite/route.tssrc/app/api/rooms/[id]/route.tssrc/app/api/rooms/join/[token]/route.tssrc/app/api/rooms/route.tssrc/app/api/user/me/profile-image/route.tssrc/app/api/user/me/route.tssrc/components/providers/QueryProvider.tsxsrc/components/ui/BackButton.tsxsrc/components/ui/Modal.module.scsssrc/domains/dispute/dispute.hooks.tssrc/domains/judgement/judgement.hooks.tssrc/lib/auth/session.ts
| type="button" | ||
| className={className} | ||
| onClick={() => router.back()} | ||
| aria-label="뒤로 가기" |
There was a problem hiding this comment.
접근성 라벨 문구를 기존 뒤로가기 버튼과 통일하세요.
Line 17의 aria-label이 "뒤로 가기"인데, 기존 Header 버튼은 "뒤로가기"를 사용합니다. 스크린리더 문구/라벨 기반 테스트 일관성을 위해 동일한 문구로 맞추는 것이 안전합니다.
🔧 제안 변경
- aria-label="뒤로 가기"
+ aria-label="뒤로가기"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| aria-label="뒤로 가기" | |
| aria-label="뒤로가기" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/components/ui/BackButton.tsx` at line 17, The aria-label attribute in the
BackButton component uses "뒤로 가기" (with space) but the existing Header back
button uses "뒤로가기" (without space). Change the aria-label value in the
BackButton.tsx file from "뒤로 가기" to "뒤로가기" to ensure consistency across the
application for screen reader text and test reliability.
|
@evenif99 머지 부탁드립니다 |
@juahcheon 확인했슴다 |
Summary
getServerSession→getRequestUserId(getToken)전환으로 API 인증 처리 경량화 (16개 라우트)retry: 0설정으로 불필요한 재시도 제거BackButton클라이언트 컴포넌트 분리)Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
릴리스 노트
새로운 기능
버그 수정
개선 사항