[Deploy] AWS S3·CloudFront main 배포 파이프라인 동작 검증 - #218
Conversation
[Refactor/#208] 대시보드 - 플랫폼 변경(KAKAO -> META)
📝 WalkthroughWalkthroughPR 218은 광고 플랫폼 지원을 Kakao에서 Meta로 전환하면서, SinglePlatformView의 모의 데이터 기반 렌더링을 실데이터 기반 훅으로 리팩토링했습니다. 새로운 usePlatformMetrics와 usePlatformBudget 훅을 추가하고, 기존 훅들의 일관성을 유지했으며, 타입 시스템을 정리했습니다. ChangesProvider 마이그레이션 및 대시보드 훅 통합
Sequence DiagramsequenceDiagram
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: 로딩/에러/정상 상태별 렌더링 분기
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
totalBudget0 분모 케이스를 방어해주세요Line 96에서
budget.totalBudget가 0이면budgetPct가Infinity/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
⛔ Files ignored due to path filters (1)
vite.config.tsis excluded by none and included by none
📒 Files selected for processing (11)
src/components/dashboard/platform/PlatformRoasTable.tsxsrc/components/dashboard/platform/SinglePlatformView.tsxsrc/hooks/dashboard/useOverviewRoasRankings.tssrc/hooks/dashboard/usePlatformAdCount.tssrc/hooks/dashboard/usePlatformBudget.tssrc/hooks/dashboard/usePlatformMetrics.tssrc/hooks/dashboard/usePlatformPerformance.tssrc/hooks/dashboard/usePlatformRoasRankings.tssrc/pages/ads/list/CampaignDetail.tsxsrc/types/dashboard/overview.tssrc/types/dashboard/platform.ts
🚨 관련 이슈
N/A
✨ 변경사항
✏️ 작업 내용
Vercel 제거 후 AWS(S3 + CloudFront) 기준으로
main브랜치 배포가 정상 동작하는지 확인하기 위한 머지 PR입니다.기능
수정
cookieDomainRewrite)providerType→META리팩터
SinglePlatformViewKPI trendany제거😅 미완성 작업
N/A (배포 검증 목적 PR)
📢 논의 사항 및 참고 사항
배포 트리거는
mainmerge/push만 동작합니다.developmerge만으로는 프로덕션 배포되지 않습니다!Summary by CodeRabbit
릴리스 노트
New Features
Improvements
Style