Skip to content

[Deploy] AWS S3·CloudFront main 배포 파이프라인 동작 검증 - #218

Merged
Seojegyeong merged 13 commits into
mainfrom
develop
May 16, 2026
Merged

[Deploy] AWS S3·CloudFront main 배포 파이프라인 동작 검증#218
Seojegyeong merged 13 commits into
mainfrom
develop

Conversation

@Seojegyeong

@Seojegyeong Seojegyeong commented May 16, 2026

Copy link
Copy Markdown
Collaborator

🚨 관련 이슈

N/A

✨ 변경사항

  • 🐞 BugFix Something isn't working
  • 💻 CrossBrowsing Browser compatibility
  • 🌏 Deploy Deploy
  • 🎨 Design Markup & styling
  • 📃 Docs Documentation writing and editing (README.md, etc.)
  • ✨ Feature Feature
  • 🔨 Refactor Code refactoring
  • ⚙️ Setting Development environment setup
  • ✅ Test Test related (storybook, jest, etc.)

✏️ 작업 내용

Vercel 제거 후 AWS(S3 + CloudFront) 기준으로 main 브랜치 배포가 정상 동작하는지 확인하기 위한 머지 PR입니다.

기능

  • 상단 KPI 지표 API 연동, KPI 카드 순서 변경
  • 플랫폼별 예산 소진 현황 API 연동

수정

리팩터

  • Kakao → Meta 플랫폼 카드·대시보드 훅 반영
  • SinglePlatformView KPI trend any 제거

😅 미완성 작업

N/A (배포 검증 목적 PR)

📢 논의 사항 및 참고 사항

배포 트리거는 main merge/push만 동작합니다. develop merge만으로는 프로덕션 배포되지 않습니다!

💬 리뷰어 가이드 (P-Rules)
P1: 필수 반영 (Critical) - 버그 가능성, 컨벤션 위반. 해결 전 머지 불가.
P2: 적극 권장 (Recommended) - 더 나은 대안 제시. 가급적 반영 권장.
P3: 제안 (Suggestion) - 아이디어 공유. 반영 여부는 드라이버 자율.
P4: 단순 확인/칭찬 (Nit) - 사소한 오타, 칭찬 등 피드백.

Summary by CodeRabbit

릴리스 노트

  • New Features

    • Meta 플랫폼에 대한 지원 추가
    • 단일 플랫폼 대시보드가 실시간 데이터 기반으로 변경되어 더 정확한 성과 지표 및 예산 현황 제공
  • Improvements

    • 플랫폼 지원 범위 업데이트: Kakao에서 Meta로 변경
    • 대시보드에서 데이터 로딩 및 오류 상태 표시 개선
  • Style

    • 캠페인 제목의 텍스트 줄 바꿈 개선

Review Change Stack

@Seojegyeong
Seojegyeong requested review from YermIm and jjjsun May 16, 2026 11:14
@Seojegyeong Seojegyeong self-assigned this May 16, 2026
@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

PR 218은 광고 플랫폼 지원을 Kakao에서 Meta로 전환하면서, SinglePlatformView의 모의 데이터 기반 렌더링을 실데이터 기반 훅으로 리팩토링했습니다. 새로운 usePlatformMetrics와 usePlatformBudget 훅을 추가하고, 기존 훅들의 일관성을 유지했으며, 타입 시스템을 정리했습니다.

Changes

Provider 마이그레이션 및 대시보드 훅 통합

Layer / File(s) Summary
Provider 타입 정의 업데이트
src/types/dashboard/overview.ts, src/types/dashboard/platform.ts
TProviderType에서 KAKAO를 제거하고 META를 추가했으며, TPlatformProviderTProviderType으로 단순화하여 타입 안정성을 강화했습니다.
새로운 플랫폼 메트릭 및 예산 훅
src/hooks/dashboard/usePlatformMetrics.ts, src/hooks/dashboard/usePlatformBudget.ts
단일 플랫폼의 지표(usePlatformMetrics)와 예산(usePlatformBudget)을 조회하는 훅을 신규 추가했습니다. 두 훅 모두 selectedOrgId와 provider를 기반으로 useCoreQuery를 구성하며, enabled 옵션으로 입력값 유효성을 제어합니다.
기존 훅들의 Provider 마이그레이션
src/hooks/dashboard/useOverviewRoasRankings.ts, src/hooks/dashboard/usePlatformPerformance.ts, src/hooks/dashboard/usePlatformRoasRankings.ts, src/hooks/dashboard/usePlatformAdCount.ts
PROVIDERS 배열을 KAKAO에서 META로 업데이트하고, 불필요한 normalizeProvider 정규화 로직을 제거했습니다. 쿼리 키 생성과 데이터 변환 로직은 유지되며, provider 값을 직접 사용하도록 단순화했습니다.
UI 컴포넌트 및 SinglePlatformView 통합
src/components/dashboard/platform/PlatformRoasTable.tsx, src/components/dashboard/platform/SinglePlatformView.tsx
PlatformRoasTable의 로고/표시명 매핑을 Meta로 업데이트했습니다. SinglePlatformView는 모의 데이터 기반 렌더링에서 usePlatformMetrics와 usePlatformBudget 훅 기반으로 완전히 리팩토링했으며, 로딩/에러 상태 처리와 ITrend 타입 통일을 추가했습니다.
사소한 스타일 업데이트
src/pages/ads/list/CampaignDetail.tsx
캠페인 제목 <h1>의 Tailwind 클래스를 break-words에서 wrap-break-word로 변경했습니다.

Sequence Diagram

sequenceDiagram
  participant SinglePlatformView
  participant usePlatformMetrics
  participant usePlatformBudget
  participant useCoreQuery
  participant API
  SinglePlatformView->>usePlatformMetrics: provider 전달
  usePlatformMetrics->>useCoreQuery: enabled 조건 확인
  useCoreQuery->>API: getOverview(orgId, provider)
  API-->>useCoreQuery: 지표 데이터 반환
  useCoreQuery-->>usePlatformMetrics: metrics
  usePlatformMetrics-->>SinglePlatformView: isLoading, isError, data
  SinglePlatformView->>usePlatformBudget: provider 전달
  usePlatformBudget->>useCoreQuery: enabled 조건 확인
  useCoreQuery->>API: getBudget(orgId, provider)
  API-->>useCoreQuery: 예산 데이터 반환
  useCoreQuery-->>usePlatformBudget: budget 데이터
  usePlatformBudget-->>SinglePlatformView: isBudgetLoading, isBudgetError, budget
  SinglePlatformView->>SinglePlatformView: 로딩/에러/정상 상태별 렌더링 분기
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • WhereYouAd/WhereYouAd-Frontend#217: PlatformRoasTable과 useOverviewRoasRankings의 Kakao→Meta 플랫폼 변경 및 TProviderType 타입 업데이트가 동일하게 적용됩니다.
  • WhereYouAd/WhereYouAd-Frontend#215: SinglePlatformView를 usePlatformMetrics와 usePlatformBudget 훅 기반의 실데이터 렌더링으로 리팩토링하는 작업이 직접 관련됩니다.
  • WhereYouAd/WhereYouAd-Frontend#204: 플랫폼 대시보드 훅들(usePlatformAdCount, usePlatformRoasRankings)의 provider 처리 방식 일관성이 관련됩니다.

Suggested labels

🔨 Refactor, ✨ Feature

Suggested reviewers

  • jjjsun
  • YermIm
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning PR 제목은 배포 검증이라고 했지만, 실제 변경사항은 KAKAO → META 플랫폼 지원 변경이 핵심입니다. 제목을 실제 변경사항을 반영하도록 수정하세요. 예: '[Refactor] KAKAO에서 META로 플랫폼 변경' 또는 '[Feature] META 플랫폼 지원 추가'
Docstring Coverage ⚠️ Warning Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Description check ✅ Passed PR 설명이 배포 목적, 변경사항(API 연동, 플랫폼 변경), 수정 및 리팩터링 내용을 구조적으로 잘 작성했습니다.

✏️ 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 develop

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 and usage tips.

@WhereYouAd WhereYouAd deleted a comment from vercel Bot May 16, 2026
@Seojegyeong Seojegyeong added the 🌏 Deploy 배포 관련 label May 16, 2026

@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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/dashboard/platform/SinglePlatformView.tsx (1)

89-97: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

totalBudget 0 분모 케이스를 방어해주세요

Line 96에서 budget.totalBudget가 0이면 budgetPctInfinity/NaN이 되어 상태 계산/표시가 깨질 수 있습니다. 실데이터 기준으로는 0 예산 케이스를 먼저 차단하는 게 안전합니다.

수정 예시
-  const budgetPct = budget
-    ? Math.round((budget.spent / budget.totalBudget) * 100)
-    : 0;
+  const budgetPct =
+    budget && budget.totalBudget > 0
+      ? Math.round((budget.spent / budget.totalBudget) * 100)
+      : 0;
🤖 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/dashboard/platform/SinglePlatformView.tsx` around lines 89 -
97, budgetPct calculation can produce Infinity/NaN when budget.totalBudget is 0;
update the logic in SinglePlatformView (where usePlatformBudget is used and
budgetPct is computed) to guard against a zero or falsy totalBudget (e.g., check
budget.totalBudget === 0) and return a safe value (0 or clamp to 100) instead of
performing the division; ensure the check covers undefined/null budget and
preserve types so components consuming budgetPct receive a valid number.
🤖 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/dashboard/platform/SinglePlatformView.tsx`:
- Around line 151-156: The two grid-empty/error state divs in SinglePlatformView
(the elements using class "col-span-4") are causing unintended column expansion
in the tablet breakpoint; replace the "col-span-4" class on both the error
message div and the empty-data message div with "col-span-full" so those states
span the full grid width responsively (locate the elements in
SinglePlatformView.tsx that contain the text "지표 데이터를 불러오지 못했습니다." and "표시할 지표
데이터가 없습니다." and update their className accordingly).

In `@src/hooks/dashboard/useOverviewRoasRankings.ts`:
- Around line 19-25: The hard-coded date range in useOverviewRoasRankings (the
getRoasRankings call using "2026-01-22" to "2026-03-22") causes stale results;
change this to compute a dynamic range (e.g., last 60 days) or accept a range
parameter from the hook caller and pass that into getRoasRankings so the query
reflects the current date. Update useOverviewRoasRankings to either (A) compute
startDate/endDate at runtime (new Date now minus 60 days -> format) before
calling getRoasRankings, or (B) add an input parameter (e.g., dateRange) to the
hook and forward it to getRoasRankings; then factor this logic into a shared
util used by other ROAS hooks so all hooks use the same dynamic range behavior.

---

Outside diff comments:
In `@src/components/dashboard/platform/SinglePlatformView.tsx`:
- Around line 89-97: budgetPct calculation can produce Infinity/NaN when
budget.totalBudget is 0; update the logic in SinglePlatformView (where
usePlatformBudget is used and budgetPct is computed) to guard against a zero or
falsy totalBudget (e.g., check budget.totalBudget === 0) and return a safe value
(0 or clamp to 100) instead of performing the division; ensure the check covers
undefined/null budget and preserve types so components consuming budgetPct
receive a valid number.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2c1a6ecd-47e7-428b-9ec4-c2fc804f5c48

📥 Commits

Reviewing files that changed from the base of the PR and between 771e13f and 8117b58.

⛔ Files ignored due to path filters (1)
  • vite.config.ts is excluded by none and included by none
📒 Files selected for processing (11)
  • src/components/dashboard/platform/PlatformRoasTable.tsx
  • src/components/dashboard/platform/SinglePlatformView.tsx
  • src/hooks/dashboard/useOverviewRoasRankings.ts
  • src/hooks/dashboard/usePlatformAdCount.ts
  • src/hooks/dashboard/usePlatformBudget.ts
  • src/hooks/dashboard/usePlatformMetrics.ts
  • src/hooks/dashboard/usePlatformPerformance.ts
  • src/hooks/dashboard/usePlatformRoasRankings.ts
  • src/pages/ads/list/CampaignDetail.tsx
  • src/types/dashboard/overview.ts
  • src/types/dashboard/platform.ts

Comment thread src/components/dashboard/platform/SinglePlatformView.tsx
Comment thread src/hooks/dashboard/useOverviewRoasRankings.ts
@Seojegyeong
Seojegyeong merged commit f04029a into main May 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🌏 Deploy 배포 관련

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants