Skip to content

perf: PR 상세 헤더 LCP 경로 개선 - #175

Merged
phnml1 merged 1 commit into
mainfrom
codex-174-pr-header-lcp
May 16, 2026
Merged

perf: PR 상세 헤더 LCP 경로 개선#175
phnml1 merged 1 commit into
mainfrom
codex-174-pr-header-lcp

Conversation

@phnml1

@phnml1 phnml1 commented May 15, 2026

Copy link
Copy Markdown
Owner

작업 유형

  • 새로운 기능 (feat)
  • 버그 수정 (fix)
  • 리팩토링 (refactor)
  • 스타일/UI (style)
  • 테스트 (test)
  • 문서 (docs)
  • 설정/환경 (chore)

관련 마일스톤

  • Week 1-2: 프로젝트 기반 & 인증
  • Week 3-4: GitHub 연동
  • Week 5-6: AI 코드 리뷰
  • Week 7-8: 실시간 작업
  • Week 9-10: 대시보드 & 배포

개요

PR 상세 페이지의 헤더 데이터가 클라이언트 fetch 이후에만 렌더링되던 흐름을 개선했습니다. 서버에서 접근 권한이 확인된 PR 상세 데이터를 먼저 로드해 React Query 초기 데이터와 헤더 렌더링에 재사용합니다.

Closes #174

변경 사항

  • PR 상세 조회 로직을 lib/pr-detail/pullRequestDetail.ts로 추출했습니다.
  • /api/pulls/[id] route가 같은 서버 로더를 사용하도록 정리하면서 기존 reviews 응답 계약은 유지했습니다.
  • PR 상세 페이지 서버 컴포넌트에서 초기 PR 데이터를 가져와 PRDetailContainer에 전달합니다.
  • PRDetailHeader까지 초기 데이터를 내려 첫 렌더에서 제목, 번호, 상태, 브랜치, 변경량을 표시할 수 있게 했습니다.
  • 초기 데이터가 있을 때 React Query에 짧은 staleTime을 부여해 마운트 직후 중복 상세 요청을 줄였습니다.

스크린샷 (선택)

N/A - 데이터 로딩 경로 개선이며 UI 모양 변경은 없습니다.

테스트

  • 로컬 개발 서버에서 정상 동작 확인
  • 기존 기능에 영향 없음 확인
  • 타입 에러 없음 (npm.cmd run build)
  • ESLint 경고/에러 없음 (npm.cmd run lint) - 통과, 기존 hooks/useRealtimeComments.ts 미사용 변수 warning 1건 유지
  • Jest 전체 테스트 통과 (npm.cmd test -- --runInBand) - 23 suites / 133 tests passed

참고 사항

  • 검증용 npm.cmd ci --prefer-offline --ignore-scripts 실행 중 기존 peer dependency warning 및 audit 취약점 리포트가 출력되었지만, lockfile 변경은 없습니다.
  • 서버 로더는 기존 API의 GitHub 변경량 보강 로직을 그대로 공유합니다.

@vercel

vercel Bot commented May 15, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
code-mate Ready Ready Preview, Comment May 15, 2026 8:08am

@phnml1 phnml1 changed the title [codex] perf: PR 상세 헤더 LCP 경로 개선 perf: PR 상세 헤더 LCP 경로 개선 May 15, 2026
@phnml1
phnml1 marked this pull request as ready for review May 16, 2026 12:34
@phnml1
phnml1 merged commit 581169a into main May 16, 2026
3 of 4 checks passed
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.

perf: PR 상세 헤더 LCP 경로 개선

1 participant