Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🧪 테스트 결과
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Walkthrough로그인 라우트 상수와 헤더용 스타일 토큰이 추가되었고, 로그인 여부와 스크롤 상태에 따라 로고, 배경 블러, 로그인 CTA를 바꾸는 공통 Header 컴포넌트가 새로 구현되었습니다. Storybook 스토리와 모듈 재export도 함께 추가되었습니다. ChangesHeader 공통 컴포넌트 구현
Estimated code review effort: 2 (Simple) | ~15 minutes Sequence Diagram(s)sequenceDiagram
participant Browser
participant Header
participant ScrollListener
participant ROUTES
Browser->>Header: 페이지 렌더링 (user, isBackgroundBlurred 등 props 전달)
alt isBackgroundBlurred 미전달
Header->>ScrollListener: scroll 이벤트 리스너 등록
Browser->>ScrollListener: scroll 발생
ScrollListener->>Header: hasScrolled 업데이트
end
Header->>ROUTES: authenticatedLogoHref / loginHref 조회
alt user 존재
Header->>Browser: Profile 컴포넌트 렌더링
else user 없음
Header->>Browser: 로그인 LinkButton 렌더링
end
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
🚦 CI 검증 결과
|
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/widgets/common/header/Header.stories.tsx (1)
47-64: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
LoggedIn/LoggedInScrolled스토리 간user객체 리터럴 중복.동일한
user값을 상수로 추출해서 재사용하면 값 변경 시 두 곳을 동기화할 필요가 없어집니다.♻️ 제안 리팩터링
+const loggedInUser = { + name: '이서정', + profileImageUrl: DefaultProfileImage.src, +}; + export const LoggedIn: Story = { args: { - user: { - name: '이서정', - profileImageUrl: DefaultProfileImage.src, - }, + user: loggedInUser, }, }; export const LoggedInScrolled: Story = { args: { isBackgroundBlurred: true, - user: { - name: '이서정', - profileImageUrl: DefaultProfileImage.src, - }, + user: loggedInUser, }, };🤖 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/widgets/common/header/Header.stories.tsx` around lines 47 - 64, The LoggedIn and LoggedInScrolled story args duplicate the same user object literal, so extract that shared user value into a reusable constant in Header.stories.tsx and reference it from both Story definitions. Keep the existing Story objects the same otherwise, and use the shared symbol to avoid having to update the name and profileImageUrl in two places.src/widgets/common/header/Header.tsx (1)
44-64: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win스크롤 blur 로직에 대한 단위 테스트 부재.
스크롤 임계값(
blurThreshold) 기준 blur 전환, 외부 제어(isBackgroundBlurred) 시 스크롤 리스너 미등록 등은 로직 분기가 있는 만큼 회귀 방지를 위한 테스트 커버리지를 추가하는 것을 고려해보세요.원하시면 React Testing Library 기반 테스트 코드를 작성해 드릴 수 있습니다.
🤖 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/widgets/common/header/Header.tsx` around lines 44 - 64, The scroll blur behavior in Header.tsx is missing unit test coverage, so add tests around the Header component’s useEffect and shouldBlur logic: verify blurThreshold flips the blurred state based on window.scrollY, and verify that when isBackgroundBlurred is provided the component does not register the scroll listener and relies on the external value instead. Use the existing Header, hasScrolled, and handleScroll behavior as the primary targets for the tests.
🤖 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.
Nitpick comments:
In `@src/widgets/common/header/Header.stories.tsx`:
- Around line 47-64: The LoggedIn and LoggedInScrolled story args duplicate the
same user object literal, so extract that shared user value into a reusable
constant in Header.stories.tsx and reference it from both Story definitions.
Keep the existing Story objects the same otherwise, and use the shared symbol to
avoid having to update the name and profileImageUrl in two places.
In `@src/widgets/common/header/Header.tsx`:
- Around line 44-64: The scroll blur behavior in Header.tsx is missing unit test
coverage, so add tests around the Header component’s useEffect and shouldBlur
logic: verify blurThreshold flips the blurred state based on window.scrollY, and
verify that when isBackgroundBlurred is provided the component does not register
the scroll listener and relies on the external value instead. Use the existing
Header, hasScrolled, and handleScroll behavior as the primary targets for the
tests.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 6154e621-ba7a-483e-97b2-99c399f79cc5
📒 Files selected for processing (6)
src/shared/constants/routes.tssrc/shared/styles/base/colors.csssrc/shared/styles/base/z-index.csssrc/widgets/common/header/Header.stories.tsxsrc/widgets/common/header/Header.tsxsrc/widgets/common/header/index.ts
#️⃣연관된 이슈
체크 사항
📝작업 내용
Header 공통 컴포넌트 구현
widgets/common/header에 공통 Header 컴포넌트를 추가했습니다.디자인 토큰 정리
--z-index-header토큰으로 관리하도록 추가했습니다.colors.css의 shadow token으로 분리했습니다.ROUTES.LOGIN상수로 추가했습니다.Storybook 문서화
스크린샷 (선택)
추가한 라이브러리
💬리뷰 요구사항(선택)
Summary by CodeRabbit