perf: PR 상세 헤더 LCP 경로 개선 - #175
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
작업 유형
관련 마일스톤
개요
PR 상세 페이지의 헤더 데이터가 클라이언트 fetch 이후에만 렌더링되던 흐름을 개선했습니다. 서버에서 접근 권한이 확인된 PR 상세 데이터를 먼저 로드해 React Query 초기 데이터와 헤더 렌더링에 재사용합니다.
Closes #174
변경 사항
lib/pr-detail/pullRequestDetail.ts로 추출했습니다./api/pulls/[id]route가 같은 서버 로더를 사용하도록 정리하면서 기존reviews응답 계약은 유지했습니다.PRDetailContainer에 전달합니다.PRDetailHeader까지 초기 데이터를 내려 첫 렌더에서 제목, 번호, 상태, 브랜치, 변경량을 표시할 수 있게 했습니다.staleTime을 부여해 마운트 직후 중복 상세 요청을 줄였습니다.스크린샷 (선택)
N/A - 데이터 로딩 경로 개선이며 UI 모양 변경은 없습니다.
테스트
npm.cmd run build)npm.cmd run lint) - 통과, 기존hooks/useRealtimeComments.ts미사용 변수 warning 1건 유지npm.cmd test -- --runInBand) - 23 suites / 133 tests passed참고 사항
npm.cmd ci --prefer-offline --ignore-scripts실행 중 기존 peer dependency warning 및 audit 취약점 리포트가 출력되었지만, lockfile 변경은 없습니다.