Skip to content

[PERF] WTH-419: 랜딩페이지 LCP 개선#132

Open
woneeeee wants to merge 4 commits into
developfrom
fix/WTH-419-랜딩페이지-LCP-개선

Hidden character warning

The head ref may contain hidden characters: "fix/WTH-419-\ub79c\ub529\ud398\uc774\uc9c0-LCP-\uac1c\uc120"
Open

[PERF] WTH-419: 랜딩페이지 LCP 개선#132
woneeeee wants to merge 4 commits into
developfrom
fix/WTH-419-랜딩페이지-LCP-개선

Conversation

@woneeeee

@woneeeee woneeeee commented Jun 23, 2026

Copy link
Copy Markdown
Member

✅ PR 유형

어떤 변경 사항이 있었나요?

  • 새로운 기능 추가
  • 버그 수정
  • 코드에 영향을 주지 않는 변경사항(오타 수정, 탭 사이즈 변경, 변수명 변경)
  • 코드 리팩토링
  • 주석 추가 및 수정
  • 문서 수정
  • 빌드 부분 혹은 패키지 매니저 수정
  • 파일 혹은 폴더명 수정
  • 파일 혹은 폴더 삭제

📌 관련 이슈번호

  • Closed #419

✅ Key Changes

  • HeroSectionMobile, HeroSectionDesktop — LCP 이미지에 priority 및 뷰포트별 sizes 추가로 브라우저 사전 로드 활성화
  • ServiceSectionDesktop, ServiceSectionTablet, ServiceSectionMobile — 비디오 preload="auto""none" 전환으로 초기 페이로드 ~12MB 제거
  • 비디오 컨테이너에 aspect-[3840/1888] 고정 + Skeleton absolute inset-0 전환으로 CLS 제거

결과: Lighthouse Performance 63 → 93점 (DevTools Simulated throttling, Desktop)

📸 스크린샷 or 실행영상

image

image


🎸 기타 사항 or 추가 코멘트

Summary by CodeRabbit

릴리스 노트

  • 성능 개선
    • 메인 영역 이미지의 로딩 우선순위를 최적화하여 페이지 초기 렌더링 속도 개선
    • 동영상의 초기 로딩 방식을 개선하고 로딩 상태 표시를 더욱 명확하게 개선
    • 다양한 디바이스(모바일, 태블릿, 데스크톱)에서 미디어 리소스 최적화

@woneeeee woneeeee requested review from JIN921, dalzzy and nabbang6 June 23, 2026 13:02
@woneeeee woneeeee self-assigned this Jun 23, 2026
@woneeeee woneeeee added the 🔨 Refactor 코드 리팩토링 label Jun 23, 2026
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

히어로 섹션(데스크탑·모바일)의 next/imageprioritysizes 속성을 추가하고, 서비스 섹션(데스크탑·태블릿·모바일)의 비디오 컨테이너를 aspect-ratio 고정 래퍼로 변경하며 스켈레톤 오버레이를 absolute inset-0으로 분리하고 preload="none"으로 전환하였습니다.

Changes

랜딩 미디어 로딩 최적화

Layer / File(s) Summary
히어로 이미지 priority/sizes 속성 추가
src/components/landing/HeroSectionDesktop.tsx, src/components/landing/HeroSectionMobile.tsx
데스크탑·모바일 히어로 이미지에 prioritysizes 속성을 추가하여 LCP 이미지 로딩 우선순위 및 뷰포트별 리소스 힌트를 지정.
서비스 섹션 비디오 컨테이너 레이아웃 및 preload 변경
src/components/landing/ServiceSectionDesktop.tsx, src/components/landing/ServiceSectionTablet.tsx, src/components/landing/ServiceSectionMobile.tsx
비디오 래퍼를 aspect-[3840/1888] 고정 컨테이너로 교체하고 스켈레톤을 absolute inset-0 오버레이로 분리. preloadauto에서 none으로 변경하고, 미준비 상태의 비디오 클래스에서 absolute 제거.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Team-Weeth/weeth-client#41: ServiceSection* 컴포넌트의 비디오 래퍼·스켈레톤 오버레이 및 <video> 가시성 처리 방식이 이번 PR과 동일한 파일을 대상으로 함.

Suggested reviewers

  • nabbang6
  • dalzzy
  • JIN921

Poem

🐰 토끼가 뛰어다니며 페이지를 빠르게 칠했네,
이미지엔 priority, sizes를 달아주고,
비디오엔 preload none으로 가볍게 하고,
aspect 틀 안에 skeleton을 얹어두니,
랜딩 페이지가 씽씽 날아간다네! 🚀

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 랜딩페이지의 LCP 개선이라는 주요 변경사항을 명확하게 요약하고 있으며, 이슈번호 WTH-419도 포함되어 있습니다.
Description check ✅ Passed PR 설명이 템플릿의 모든 주요 섹션을 포함하고 있습니다. PR 유형, 관련 이슈번호, 상세한 Key Changes, 그리고 성능 개선을 보여주는 Before/After 스크린샷이 포함되어 있습니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/WTH-419-랜딩페이지-LCP-개선

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

PR 테스트 결과

Jest: 통과

🎉 모든 테스트를 통과했습니다!

@woneeeee woneeeee changed the title [PERF] WTH-419: 랜딩페이지 lcp 개선 [PERF] WTH-419: 랜딩페이지 LCP 개선 Jun 23, 2026
@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Build: 통과

🎉 모든 검증을 통과했습니다!

@github-actions

Copy link
Copy Markdown

구현한 기능 Preview: https://weeth-13hcgvbnn-weethsite-4975s-projects.vercel.app

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/components/landing/ServiceSectionTablet.tsx (1)

235-238: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

스켈레톤 배경색에 디자인 토큰 클래스를 사용하세요.

bg-[#E6EAED]는 하드코딩된 색상 값입니다. Desktop 컴포넌트와 동일하게 디자인 토큰 클래스로 교체해야 합니다.

"Never hardcode design token values; always use token classes from design tokens" 가이드라인을 기반으로 함.

🤖 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/landing/ServiceSectionTablet.tsx` around lines 235 - 238,
Replace the hardcoded background color class bg-[`#E6EAED`] in the Skeleton
component with the appropriate design token class. Instead of using the hex
color value directly, reference the same design token class that is used in the
Desktop component's ServiceSectionDesktop to maintain consistency and follow the
guideline of using design tokens for all color values.

Source: Coding guidelines

src/components/landing/ServiceSectionMobile.tsx (1)

234-237: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

스켈레톤 배경색에 디자인 토큰 클래스를 사용하세요.

bg-[#E6EAED]는 하드코딩된 색상 값입니다. Desktop, Tablet 컴포넌트와 동일하게 디자인 토큰 클래스로 교체해야 합니다.

"Never hardcode design token values; always use token classes from design tokens" 가이드라인을 기반으로 함.

🤖 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/landing/ServiceSectionMobile.tsx` around lines 234 - 237,
Replace the hardcoded background color value bg-[`#E6EAED`] in the Skeleton
component (located in the videoReady check within the aspect-[3840/1888] div)
with the appropriate design token class name. Check the Desktop and Tablet
component versions of this same Skeleton component to identify which design
token class they use for the background color, then apply that same token class
to the ServiceSectionMobile Skeleton component to maintain consistency across
all component variants.

Source: Coding guidelines

🤖 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/landing/ServiceSectionDesktop.tsx`:
- Around line 212-215: The Skeleton component uses a hardcoded background color
value bg-[`#E6EAED`] which should be replaced with the design system token.
Replace the hardcoded color bg-[`#E6EAED`] with the design token
bg-[var(--neutral-400)] in the Skeleton className in ServiceSectionDesktop.tsx,
and apply the same fix to the identical Skeleton components in
ServiceSectionMobile.tsx and ServiceSectionTablet.tsx files to maintain
consistency with the design system guidelines.

---

Nitpick comments:
In `@src/components/landing/ServiceSectionMobile.tsx`:
- Around line 234-237: Replace the hardcoded background color value bg-[`#E6EAED`]
in the Skeleton component (located in the videoReady check within the
aspect-[3840/1888] div) with the appropriate design token class name. Check the
Desktop and Tablet component versions of this same Skeleton component to
identify which design token class they use for the background color, then apply
that same token class to the ServiceSectionMobile Skeleton component to maintain
consistency across all component variants.

In `@src/components/landing/ServiceSectionTablet.tsx`:
- Around line 235-238: Replace the hardcoded background color class bg-[`#E6EAED`]
in the Skeleton component with the appropriate design token class. Instead of
using the hex color value directly, reference the same design token class that
is used in the Desktop component's ServiceSectionDesktop to maintain consistency
and follow the guideline of using design tokens for all color values.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9d27c3aa-2446-455a-8464-8c470a2dfb39

📥 Commits

Reviewing files that changed from the base of the PR and between bc0dbec and 13cae0a.

📒 Files selected for processing (5)
  • src/components/landing/HeroSectionDesktop.tsx
  • src/components/landing/HeroSectionMobile.tsx
  • src/components/landing/ServiceSectionDesktop.tsx
  • src/components/landing/ServiceSectionMobile.tsx
  • src/components/landing/ServiceSectionTablet.tsx

Comment on lines +212 to +215
<div className="relative aspect-[3840/1888] w-full overflow-hidden rounded-[30px]">
{!videoReady.has(activeIndex) && (
<Skeleton className="absolute inset-0 animate-pulse rounded-[30px] bg-[#E6EAED]" />
)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Find skeleton/loading background color tokens in the design system

# Check globals.css for skeleton or loading related color tokens
rg -n -A2 -B2 '(skeleton|loading|placeholder).*color|--.*(?:skeleton|loading|neutral-[0-9]+)' src/app/globals.css

# Also check for the current hardcoded value to see if there's a token for it
rg -n 'E6EAED|`#E6EAED`' src/app/globals.css

Repository: Team-Weeth/weeth-client

Length of output: 3098


🏁 Script executed:

# Find Tailwind configuration
fd -t f 'tailwind.config' . -x cat {} \;

Repository: Team-Weeth/weeth-client

Length of output: 161


🏁 Script executed:

# Also check for any CSS class definitions for neutral-400
rg -n 'neutral-400|bg-neutral' src/app/globals.css -A2 -B2

Repository: Team-Weeth/weeth-client

Length of output: 1701


🏁 Script executed:

# Search for actual usage of neutral or color tokens in className
rg -t tsx 'className.*(?:bg-|text-)(?:neutral|color)' src/ -o -m 1 | head -20

Repository: Team-Weeth/weeth-client

Length of output: 189


🏁 Script executed:

# Check if tailwind.config.js exists and cat it
find . -name 'tailwind.config.*' -type f -exec cat {} \;

Repository: Team-Weeth/weeth-client

Length of output: 161


🏁 Script executed:

# Also search for how color tokens are used in existing code
rg -t tsx 'bg-\[.*\].*neutral|skeleton' src/components --context=2 | head -30

Repository: Team-Weeth/weeth-client

Length of output: 189


🏁 Script executed:

# Try searching for tailwind config with different pattern
find . -name 'tailwind.config*' -o -name 'next.config*' | xargs cat 2>/dev/null

Repository: Team-Weeth/weeth-client

Length of output: 1942


🏁 Script executed:

# Look at the actual component file to understand context
cat -n src/components/landing/ServiceSectionDesktop.tsx | sed -n '210,235p'

Repository: Team-Weeth/weeth-client

Length of output: 1562


🏁 Script executed:

# Search for existing bg-color or bg-neutral usage in tsx files without rg -t
grep -r "bg-\[" src/components/ --include="*.tsx" | grep -E "(neutral|gray|slate)" | head -10

Repository: Team-Weeth/weeth-client

Length of output: 339


🏁 Script executed:

# Search for existing skeleton or loading related patterns in the codebase
grep -r "Skeleton\|skeleton\|loading.*bg" src/components --include="*.tsx" -B2 -A2

Repository: Team-Weeth/weeth-client

Length of output: 50379


🏁 Script executed:

# Check if there's a semantic token specifically for loading/skeleton state
grep -n "skeleton\|loading" src/app/globals.css -i

Repository: Team-Weeth/weeth-client

Length of output: 161


🏁 Script executed:

# Look for how other components use neutral-400 or similar tokens
grep -r "var(--neutral\|bg-\[var(" src/components --include="*.tsx" | head -15

Repository: Team-Weeth/weeth-client

Length of output: 488


스켈레톤 배경색에 디자인 토큰을 사용하세요.

bg-[#E6EAED]는 하드코딩된 색상 값입니다. 이 색상은 디자인 시스템에 --neutral-400으로 정의되어 있습니다.

코딩 가이드라인에 따라 bg-[var(--neutral-400)]으로 변경하세요. 이 문제는 ServiceSectionDesktop, ServiceSectionMobile, ServiceSectionTablet의 세 파일에서 동일하게 나타납니다.

🤖 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/landing/ServiceSectionDesktop.tsx` around lines 212 - 215, The
Skeleton component uses a hardcoded background color value bg-[`#E6EAED`] which
should be replaced with the design system token. Replace the hardcoded color
bg-[`#E6EAED`] with the design token bg-[var(--neutral-400)] in the Skeleton
className in ServiceSectionDesktop.tsx, and apply the same fix to the identical
Skeleton components in ServiceSectionMobile.tsx and ServiceSectionTablet.tsx
files to maintain consistency with the design system guidelines.

Source: Coding guidelines

@dalzzy dalzzy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

우왓 최고~!!! ⭐️ 수고하셨습니당

@nabbang6 nabbang6 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인햇습니다~!!! 고생하셧어용 👍

@JIN921 JIN921 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

야무진 점수가 되엇네요 수고하셧어용!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants