Skip to content

feat: add washer power chart component - #6

Merged
donghee13 merged 3 commits into
mainfrom
PowerDataView
Jul 14, 2026
Merged

feat: add washer power chart component#6
donghee13 merged 3 commits into
mainfrom
PowerDataView

Conversation

@donghee13

@donghee13 donghee13 commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

세탁기 전력량 차트 컴포넌트 추가(features 만들기 전 테스트용으로 common에 만들었습니다)
차트 만들기 위해 recharts 설치
임시 데이터 사용, 추후 데이터 연결 필

Summary by CodeRabbit

  • 새로운 기능

    • 세탁기의 시간별 전력 사용량을 선 그래프로 확인할 수 있는 차트를 추가했습니다.
    • 차트 제목을 선택적으로 설정할 수 있으며, 기본 제목을 제공합니다.
    • 반응형 레이아웃, 축, 격자, 툴팁을 지원합니다.
  • 문서화

    • 차트 컴포넌트의 기본 Storybook 예제를 추가했습니다.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 27 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4f1589d4-2a90-445a-b4b9-f0973f09a193

📥 Commits

Reviewing files that changed from the base of the PR and between c937109 and 4ab8f64.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • package.json
  • src/common/components/index.ts
📝 Walkthrough

Walkthrough

세탁기 전력 데이터를 표시하는 WasherPowerChart 컴포넌트와 데이터 훅이 추가되었습니다. Recharts를 사용해 시간별 전력량을 렌더링하며, Storybook 스토리와 배럴 export가 함께 구성되었습니다.

Changes

세탁기 전력 차트

Layer / File(s) Summary
차트 계약과 공개 export
package.json, src/common/components/index.ts, src/common/components/washer-power-chart/index.ts, src/common/components/washer-power-chart/power-data.ts
Recharts 의존성과 PowerData 인터페이스가 추가되고, 차트 모듈이 배럴 파일을 통해 export됩니다.
전력 데이터 제공
src/common/components/washer-power-chart/use-power-data.ts
usePowerData()가 고정된 시간-전력 데이터 배열을 반환합니다.
차트 렌더링과 Storybook
src/common/components/washer-power-chart/washer-power-chart.tsx, src/common/components/washer-power-chart/washer-power-chart.stories.tsx
WasherPowerChart가 축, 그리드, 툴팁, 단일 전력 라인을 렌더링하며 기본 Storybook 스토리가 추가됩니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Storybook
  participant WasherPowerChart
  participant usePowerData
  participant Recharts
  Storybook->>WasherPowerChart: Default 스토리 렌더링
  WasherPowerChart->>usePowerData: 전력 데이터 요청
  usePowerData-->>WasherPowerChart: PowerData[] 반환
  WasherPowerChart->>Recharts: 차트 데이터와 설정 전달
  Recharts-->>Storybook: 전력 사용량 차트 표시
Loading

Poem

깡충깡충 토끼가 차트를 보네
시간 따라 전력선이 춤을 추네
W 표시 반짝반짝
새 데이터도 차곡차곡
스토리북에서 함께 놀자!

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 세탁기 전력 차트 컴포넌트 추가라는 주요 변경사항을 간결하게 잘 요약합니다.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch PowerDataView

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.

@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.

🧹 Nitpick comments (1)
src/common/components/washer-power-chart/use-power-data.ts (1)

3-4: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

향후 API 연동을 위한 TODO 주석 추가 권장

현재 임시 데이터를 하드코딩하여 반환하고 있습니다. PR 목적에 명시된 향후 실제 데이터 연동 작업을 잊지 않도록 명시적인 TODO 주석을 추가하는 것을 권장합니다.

💡 주석 추가 제안
+// TODO: 향후 실제 전력 데이터 API 연동 필요
 export function usePowerData(): PowerData[] {
   return [
🤖 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/common/components/washer-power-chart/use-power-data.ts` around lines 3 -
4, In usePowerData, add a clear TODO comment above the hardcoded PowerData[]
return indicating that it must be replaced with data from the future API
integration. Keep the current temporary data and function behavior unchanged.
🤖 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/common/components/washer-power-chart/use-power-data.ts`:
- Around line 3-4: In usePowerData, add a clear TODO comment above the hardcoded
PowerData[] return indicating that it must be replaced with data from the future
API integration. Keep the current temporary data and function behavior
unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b5033eae-58a9-4b1a-aa11-194d51044fa8

📥 Commits

Reviewing files that changed from the base of the PR and between c3e32d4 and c937109.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • package.json
  • src/common/components/index.ts
  • src/common/components/washer-power-chart/index.ts
  • src/common/components/washer-power-chart/power-data.ts
  • src/common/components/washer-power-chart/use-power-data.ts
  • src/common/components/washer-power-chart/washer-power-chart.stories.tsx
  • src/common/components/washer-power-chart/washer-power-chart.tsx

@donghee13
donghee13 merged commit 41164dc into main Jul 14, 2026
3 checks passed
@donghee13
donghee13 deleted the PowerDataView branch July 14, 2026 11:48
@coderabbitai coderabbitai Bot mentioned this pull request Jul 30, 2026
jjwopen pushed a commit that referenced this pull request Aug 10, 2026
feat: add washer power chart component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant