Merged
Conversation
- 세션 갱신 proxy.ts 생성 (Next.js 16 convention) → 로그인 간헐 실패 근본 수정 - 보안: Open Redirect 방지, SSRF 차단 (IPv4/IPv6), API 인증 체크 6건, 보안 헤더 - 모듈화: PageLoading/PageError, PartBadge, TagList, MEMBER_STATUS_CONFIG 공유 컴포넌트 추출 - 큐레이션 god component 분해 (1,087줄 → 220줄 + 3개 컴포넌트) - 반응형: 전 페이지 모바일 카드뷰, 레이아웃 오버플로우 수정, 사이드바 상태 리팩터링 - 코드 품질: MutationObserver 제거, stale closure 수정, dead code 정리 Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Link 컴포넌트 내부의 소셜 링크를 <a> → <span role="link">으로 변경하여 HTML spec 위반(<a> 안에 <a>) 및 hydration 에러 해결 Co-Authored-By: Claude <noreply@anthropic.com>
choihooo
added a commit
that referenced
this pull request
Mar 10, 2026
P0 #5: 주간 랭킹 날짜 필터 추가 - 문제: activityScores 테이블에서 모든 기간의 점수를 합산 - 해결: 이번 주 시작일(~ 00:00:00 KST)부터 종료일(~ 23:59:59.999 KST)까지의 점수만 필터링 - 파일: weekly-ranking.ts P0 #6: 회차 시작 알림 타임존 수정 - 문제: UTC 기준으로 날짜 비교해서 KST에서 실행 시 날짜 불일치 - 해결: KST (UTC+9) 기준으로 오늘 날짜 구해서 비교 - 파일: round-reporter.ts (sendRoundStartAnnouncement) P0 #7: 회차 종료 후 isCurrent 플래그 업데이트 - 문제: 회차 리포트 전송 후 isCurrent 플래그가 업데이트되지 않음 - 해결: 다음 회차가 있으면 해당 회차를 current로 설정, 없으면 현재 회차의 isCurrent를 false로 변경 - 파일: round-reporter.ts (sendRoundReport) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
choihooo
added a commit
that referenced
this pull request
Mar 10, 2026
* fix: 회차 스케줄러 버그 수정 (P0 #5, #6, #7) P0 #5: 주간 랭킹 날짜 필터 추가 - 문제: activityScores 테이블에서 모든 기간의 점수를 합산 - 해결: 이번 주 시작일(~ 00:00:00 KST)부터 종료일(~ 23:59:59.999 KST)까지의 점수만 필터링 - 파일: weekly-ranking.ts P0 #6: 회차 시작 알림 타임존 수정 - 문제: UTC 기준으로 날짜 비교해서 KST에서 실행 시 날짜 불일치 - 해결: KST (UTC+9) 기준으로 오늘 날짜 구해서 비교 - 파일: round-reporter.ts (sendRoundStartAnnouncement) P0 #7: 회차 종료 후 isCurrent 플래그 업데이트 - 문제: 회차 리포트 전송 후 isCurrent 플래그가 업데이트되지 않음 - 해결: 다음 회차가 있으면 해당 회차를 current로 설정, 없으면 현재 회차의 isCurrent를 false로 변경 - 파일: round-reporter.ts (sendRoundReport) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor: 타임존 처리를 formatKSTDate 헬퍼 함수로 분리 코드 리뷰 사항 반영: - P0 #6 타임존 처리 로직을 formatKSTDate() 헬퍼 함수로 분리 - 코드 재사용성과 명확성 향상 - KST 오프셋 계산 로직을 함수 내부로 캡슐화 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
디스코드 로그인 간헐적 실패 근본 수정, 보안 취약점 6건 해결, 전 페이지 모바일 반응형 개편, 공유 컴포넌트 추출을 통한 코드 모듈화, 큐레이션 god component 분해를 포함한 종합 리팩터링.
Changes
1. 로그인 간헐적 실패 수정
src/proxy.ts(신규)proxyconvention으로 세션 갱신 미들웨어 생성. 매 요청마다updateSession()호출하여 쿠키 기반 세션 자동 갱신src/lib/supabase/middleware.tssrc/app/auth/callback/route.ts근본 원인: middleware 파일이 존재하지 않아
updateSession()이 호출되지 않음 → 첫 로그인 시 세션 쿠키 미갱신 → 실패 → 재시도 시 성공하는 패턴2. 보안 취약점 수정 (6건)
src/app/auth/callback/route.tsstartsWith('/')→new URL(rawNext, origin).origin === origin검증src/lib/rss-detect.tsisSafeUrl()신규 — IPv4 사설대역 전체(172.16.0.0/12), IPv6 루프백(::1), 링크로컬(fe80::) 차단src/app/api/*/route.ts(6개)createClient()→getUser()인증 체크 추가next.config.jsX-Content-Type-Options,X-Frame-Options,Referrer-Policy추가src/app/api/admin/curation/[id]/route.tscategory,name,url,tags타입 및 enum 검증 강화src/app/api/members/route.tsALLOWED_STATUSESallowlist 검증3. 모듈화 — 공유 컴포넌트 추출
src/components/ui/page-state.tsxsrc/components/ui/part-badge.tsxsrc/components/ui/tag-list.tsxsrc/lib/member-config.ts4. God Component 분해 (큐레이션)
admin/curation/page.tsxadmin/curation/crawl-modal.tsx(신규)admin/curation/source-form.tsx(신규)admin/curation/sources-table.tsx(신규)5. 반응형 디자인 전면 개편
overflow-x-hidden+min-w-0으로 수평 오버플로우 근본 차단hidden md:block) + 모바일 카드(md:hidden) 이중 구조shrink-0, 텍스트min-w-0+truncateflex-col→sm:flex-row)6. 코드 품질 개선
MutationObserverDOM 해킹collapsedprop)setCrawlStatus((prev) => ...)<span onClick={window.open}><a target="_blank" rel="noopener noreferrer">key={editingSource.id}명시onCrawldead prop, 중복 블로그 URLDesign Decisions
proxy.ts(Next.js 16 convention)middleware.ts는 Next.js 16.1에서 deprecated.proxyexport가 공식 대체isSafeUrl()직접 구현172.16.0.0/12전체 + IPv6 커버PageLoading/PageError단일 컴포넌트Test Plan
pnpm typecheck— TypeScript 0 에러 확인 ✅pnpm dev:web으로 localhost:3200 정상 기동 확인?next=https://evil.com전달 시/dashboard로 리다이렉트 확인🤖 Generated with Claude Code