Skip to content

[Feature/#287] 타임라인 성과 패널 일별 변화 추이 ApexChart 연동#293

Open
jjjsun wants to merge 8 commits into
developfrom
feature/#287
Open

[Feature/#287] 타임라인 성과 패널 일별 변화 추이 ApexChart 연동#293
jjjsun wants to merge 8 commits into
developfrom
feature/#287

Conversation

@jjjsun

@jjjsun jjjsun commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

🚨 관련 이슈

Closed #287

✨ 변경사항

  • 🐞 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.)

✏️ 작업 내용

  • ITimelineSummaryPanelDatadailyTrend/endDate/startDate 추가하여 buildTimelineSummaryPanel에서 상세 API dailyTrend를 패널 props로 전달
  • buildtimelineChartSeries util 함수로 dailyTrend를 Apex series({x, y})로 변환함
  • timelineDailyTrendChart.config.ts, TimelineDailyTrendChart 추가하여 lazy Apex과 option 분리
  • TimelinePerformancePanel에 기존에 placeholder로 구현되어있던 부분을 일별 추이 차트로 교체
  • 대표 지표는 metrics[0]으로 설정하였고, 없으면 CLICK(클릭수)로. legend는 선택 지표 라벨과 동기화
  • 예산 수정 시점은 현재 작업일정에 제외함. 해당 API에 대해서 BE와 추후 논의 필요함.
  • 스토리북과 mock데이터에 dailyTrend도 반영했습니다.

😅 미완성 작업

  • 패널 내 일/주/월 TimelinePeriodSelector와 차트 데이터 slice/집계 연동 (현재는 UI만 유지)

📢 논의 사항 및 참고 사항

  • 예산 수정 시점 부분은 BE와 논의가 필요합니다!
  • 현재는 일/주/월 선택이 아닌 일별로 연동만 했습니다.

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

Summary by CodeRabbit

  • 새로운 기능

    • 타임라인 성과 패널에 일별 추이 차트를 추가했습니다.
    • 클릭수, 전환수, 노출수, ROAS 등 선택한 지표에 맞춰 차트 라벨과 값이 표시됩니다.
    • 데이터 로딩 중 및 데이터가 없을 때 안내 화면을 제공합니다.
  • 개선 사항

    • 성과 상태가 누락된 경우에도 기본 상태로 안정적으로 표시됩니다.
    • 성과가 아직 산출되지 않은 타임라인을 지원합니다.
    • 차트 범례와 날짜·수치 형식을 지표에 맞게 표시합니다.

@jjjsun jjjsun requested review from Seojegyeong and YermIm July 11, 2026 13:29
@jjjsun jjjsun self-assigned this Jul 11, 2026
@jjjsun jjjsun added 🎨 Html&css 마크업 & 스타일링 ✨ Feature 기능 개발 📬 API 서버 API 통신 labels Jul 11, 2026
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jjjsun, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4a51bdef-767a-47ea-a28f-69cf9dac65d3

📥 Commits

Reviewing files that changed from the base of the PR and between da278fe and cf48fd0.

📒 Files selected for processing (1)
  • src/utils/timeline/buildTimelineChartSeries.ts
📝 Walkthrough

Walkthrough

타임라인 성과 상태의 null 및 비표준 값을 기본 상태로 정규화하고, 상세 API의 dailyTrend를 지표별 ApexCharts 일별 추이 차트로 변환해 성과 패널에 연결했습니다.

Changes

타임라인 성과 패널

Layer / File(s) Summary
성과 상태 정규화와 데이터 계약
src/types/timeline/api.ts, src/constants/timeline/statusStyle.ts, src/utils/timeline/buildTimelineGrid.ts, src/utils/timeline/buildTimelineSummaryPanel.ts, src/types/timeline/summary.ts, src/types/timeline/timeline.mock.ts
performanceStatusnull을 허용하도록 변경되고, null 또는 알 수 없는 상태는 ON_TRACK으로 정규화됩니다. 요약 패널 데이터와 mock에 dailyTrend, startDate, endDate가 추가됩니다.
차트 시리즈와 ApexCharts 옵션
src/utils/timeline/buildTimelineChartSeries.ts, src/components/timeline/charts/timelineDailyTrendChart.config.ts
일별 데이터에서 선택 지표의 포인트와 축 범위를 생성하고, ROAS·일반 지표별 축 및 툴팁 포맷을 포함한 area 차트 옵션을 구성합니다.
일별 추이 차트 컴포넌트
src/components/timeline/charts/TimelineDailyTrendChart.tsx
로딩 및 빈 데이터 상태를 처리하고, Suspense와 지연 로딩을 사용해 ApexCharts area 차트를 렌더링합니다.
성과 패널 차트 연결
src/components/timeline/TimelinePerformancePanel.tsx, src/components/timeline/TimelineBar.tsx
성과 패널의 placeholder를 일별 추이 차트로 교체하고 첫 번째 지표의 동적 라벨을 범례에 표시합니다. 타임라인 바와 패널의 상태 스타일도 정규화 헬퍼를 사용합니다.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant TimelinePerformancePanel
  participant TimelineDailyTrendChart
  participant buildTimelineChartSeries
  participant ReactApexChart
  TimelinePerformancePanel->>TimelineDailyTrendChart: dailyTrend와 metric 전달
  TimelineDailyTrendChart->>buildTimelineChartSeries: 차트 시리즈 계산
  buildTimelineChartSeries-->>TimelineDailyTrendChart: series와 축 범위 반환
  TimelineDailyTrendChart->>ReactApexChart: area 차트 렌더링
Loading

Possibly related PRs

Suggested reviewers: Seojegyeong, YermIm

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed #287의 핵심 요구인 dailyTrend 전달, series 변환 유틸, 차트 컴포넌트 추가, placeholder 교체가 모두 반영됐습니다.
Out of Scope Changes check ✅ Passed performanceStatus 정규화와 mock/type 보강은 차트 연동을 위한 지원 변경으로 보여, 명백한 범위 이탈은 없습니다.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Title check ✅ Passed 타임라인 성과 패널의 일별 추이 차트 Apex 연동이라는 핵심 변경을 간결하게 잘 담고 있습니다.
Description check ✅ Passed 관련 이슈, 변경사항, 작업 내용, 미완성 작업, 논의 사항이 모두 있어 템플릿 요구사항을 대부분 충족합니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/#287

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

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown

📚 Storybook 배포 완료

항목 링크
📖 Storybook https://69a147b60a56365d9e2185ef-smtjvcpwmn.chromatic.com/
🔍 Chromatic https://www.chromatic.com/build?appId=69a147b60a56365d9e2185ef&number=405

@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 (1)
src/utils/timeline/buildTimelineSummaryPanel.ts (1)

40-42: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

지표 라벨 조회 로직이 중복되어 있습니다.

buildTimelineChartSeries.ts에서 getTimelineMetricLabel으로 이미 내보낸 동일 로직이 buildTimelineSummaryPanel.ts의 인라인 라벨 조회(TIMELINE_METRIC_OPTIONS.find(...)?.label ?? metricKey)와 중복됩니다. 하나의 소스 오브 트루스를 사용하면 향후 메트릭 옵션 변경 시 누락을 방지할 수 있습니다.

  • src/utils/timeline/buildTimelineSummaryPanel.ts#L40-L42: getTimelineMetricLabel을 import하여 인라인 조회를 대체하세요.
  • src/utils/timeline/buildTimelineChartSeries.ts#L22-L27: 기존 export 그대로 유지하면 됩니다.
♻️ 제안: buildTimelineSummaryPanel.ts에서 getTimelineMetricLabel 재사용
+ import { getTimelineMetricLabel } from "`@/utils/timeline/buildTimelineChartSeries`";
 import { resolveTimelinePerformanceStatus } from "`@/constants/timeline/statusStyle`";
   const metrics = detail.metrics.map((metricKey) => {
-    const label =
-      TIMELINE_METRIC_OPTIONS.find((option) => option.value === metricKey)
-        ?.label ?? metricKey;
+    const label = getTimelineMetricLabel(metricKey);
🤖 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/utils/timeline/buildTimelineSummaryPanel.ts` around lines 40 - 42,
Replace the inline metric-label lookup in buildTimelineSummaryPanel.ts with the
exported getTimelineMetricLabel helper from buildTimelineChartSeries.ts, adding
the required import and passing metricKey to it. Keep the existing
getTimelineMetricLabel export in buildTimelineChartSeries.ts unchanged; no
direct change is required there.
🤖 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/utils/timeline/buildTimelineChartSeries.ts`:
- Around line 40-54: Update calcChartYMax so non-ROAS values use the computed
magnitude as the unit at every scale, removing the minimum-1000 behavior.
Preserve the existing 20% padding and ceiling logic so values such as 5, 50,
500, and 5000 produce appropriately scaled maxima.

---

Nitpick comments:
In `@src/utils/timeline/buildTimelineSummaryPanel.ts`:
- Around line 40-42: Replace the inline metric-label lookup in
buildTimelineSummaryPanel.ts with the exported getTimelineMetricLabel helper
from buildTimelineChartSeries.ts, adding the required import and passing
metricKey to it. Keep the existing getTimelineMetricLabel export in
buildTimelineChartSeries.ts unchanged; no direct change is required there.
🪄 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: 802cf93b-00cb-485c-8069-3098dce6d58a

📥 Commits

Reviewing files that changed from the base of the PR and between b47b1c2 and da278fe.

📒 Files selected for processing (11)
  • src/components/timeline/TimelineBar.tsx
  • src/components/timeline/TimelinePerformancePanel.tsx
  • src/components/timeline/charts/TimelineDailyTrendChart.tsx
  • src/components/timeline/charts/timelineDailyTrendChart.config.ts
  • src/constants/timeline/statusStyle.ts
  • src/types/timeline/api.ts
  • src/types/timeline/summary.ts
  • src/types/timeline/timeline.mock.ts
  • src/utils/timeline/buildTimelineChartSeries.ts
  • src/utils/timeline/buildTimelineGrid.ts
  • src/utils/timeline/buildTimelineSummaryPanel.ts

Comment thread src/utils/timeline/buildTimelineChartSeries.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📬 API 서버 API 통신 ✨ Feature 기능 개발 🎨 Html&css 마크업 & 스타일링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ [Feature] 타임라인 성과 패널 일별 변화 추이 ApexChart 연동

1 participant