Skip to content

Replace internal helpers with @recharts/devtools import#6766

Merged
PavelVanecek merged 2 commits into
mainfrom
devtools
Dec 12, 2025
Merged

Replace internal helpers with @recharts/devtools import#6766
PavelVanecek merged 2 commits into
mainfrom
devtools

Conversation

@PavelVanecek

@PavelVanecek PavelVanecek commented Dec 12, 2025

Copy link
Copy Markdown
Collaborator

Motivation and Context

I want to use these in website examples but I don't want to repeat them everywhere. We can't import from www because of stackblitz integration.

Summary by CodeRabbit

  • New Features

    • Integrated developer tools package for enhanced development experience
    • Developer tools now available in live code editor for real-time debugging
    • Developer tools included in generated project templates
  • Chores

    • Migrated test utilities to external devtools package
    • Updated example components to use centralized utilities

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This PR extracts internal testing utilities (random number generator, bounded value function, and mock data generator) into a separate @recharts/devtools package. Multiple test files and documentation examples are updated to import these utilities from the external package instead of local helpers. Local utility files are removed, and the package is added as a dev dependency.

Changes

Cohort / File(s) Summary
Dependency addition
package.json
Added @recharts/devtools ^0.0.2 as a devDependency
Local utility files removed
test/helper/generateMockData.ts, test/helper/random.ts, test/helper/random.spec.ts
Removed local implementations of generateMockData, random generator, and between function; also removed corresponding test suite
Test files updated
test/chart/LineChart.spec.tsx, test/polar/Pie.spec.tsx, test/state/selectors/axisSelectors.spec.tsx, test/state/selectors/selectDisplayedData.spec.tsx, storybook/stories/Examples/Tooltip.stories.tsx
Updated import sources for generateMockData from local helpers to @recharts/devtools package
Live editor integration
www/src/components/CodeEditorWithPreview.tsx, www/src/components/Shared/StackBlitzLink.tsx
Added @recharts/devtools import and injected into scope for live code execution; updated recharts version in StackBlitzLink dependencies
Example code refactored
www/src/docs/exampleComponents/ScatterChart/ScatterChartPerformance.tsx
Replaced inline random generator implementation with imports from @recharts/devtools (random, between functions)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10–15 minutes

  • Import path updates across multiple test files follow a consistent, mechanical pattern
  • Live editor scope injection in CodeEditorWithPreview should be verified for correct binding names and scope availability
  • StackBlitzLink version updates should be checked to confirm recharts and devtools versions are compatible

Possibly related PRs

Suggested reviewers

  • ckifer

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete. Only the 'Motivation and Context' section is provided; required sections like 'Description', 'Related Issue', 'How Has This Been Tested?', and 'Types of changes' are missing entirely. Complete the PR description by adding the missing required sections: a detailed 'Description' of what was changed and why, link to related issue(s), testing details, and mark the appropriate type of change (e.g., 'New feature' or 'Breaking change').
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: replacing internal helper functions with imports from the @recharts/devtools package.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devtools

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (1)
www/src/components/CodeEditorWithPreview.tsx (1)

1-52: Remove @recharts/devtools import or verify it exists as a monorepo workspace.
The package @recharts/devtools does not exist on npm. If this is an internal monorepo workspace, ensure it's properly resolved in the build configuration. If it's meant for future use, remove it until the package is published or properly available. The current code will fail at runtime when the Runner attempts to execute user code.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 164d6b9 and f2e213c.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (12)
  • package.json (1 hunks)
  • storybook/stories/Examples/Tooltip.stories.tsx (1 hunks)
  • test/chart/LineChart.spec.tsx (1 hunks)
  • test/helper/generateMockData.ts (0 hunks)
  • test/helper/random.spec.ts (0 hunks)
  • test/helper/random.ts (0 hunks)
  • test/polar/Pie.spec.tsx (1 hunks)
  • test/state/selectors/axisSelectors.spec.tsx (1 hunks)
  • test/state/selectors/selectDisplayedData.spec.tsx (1 hunks)
  • www/src/components/CodeEditorWithPreview.tsx (2 hunks)
  • www/src/components/Shared/StackBlitzLink.tsx (1 hunks)
  • www/src/docs/exampleComponents/ScatterChart/ScatterChartPerformance.tsx (1 hunks)
💤 Files with no reviewable changes (3)
  • test/helper/random.spec.ts
  • test/helper/random.ts
  • test/helper/generateMockData.ts
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.{ts,tsx}: Never use any type (implicit or explicit) in TypeScript code
Prefer unknown over any and refine the type in TypeScript
Type function parameters and return values explicitly in TypeScript, do not rely on implicit any or inference; exceptions are React components and trivial functions
Do not use as type assertions in TypeScript; the only exception is as const

Files:

  • www/src/components/Shared/StackBlitzLink.tsx
  • test/state/selectors/axisSelectors.spec.tsx
  • test/polar/Pie.spec.tsx
  • www/src/components/CodeEditorWithPreview.tsx
  • www/src/docs/exampleComponents/ScatterChart/ScatterChartPerformance.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
  • storybook/stories/Examples/Tooltip.stories.tsx
**/*.{js,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Ensure code lints by running npm run lint and follows Airbnb's Style Guide

Files:

  • www/src/components/Shared/StackBlitzLink.tsx
  • test/state/selectors/axisSelectors.spec.tsx
  • test/polar/Pie.spec.tsx
  • www/src/components/CodeEditorWithPreview.tsx
  • www/src/docs/exampleComponents/ScatterChart/ScatterChartPerformance.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
  • storybook/stories/Examples/Tooltip.stories.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (DEVELOPING.md)

All imports from recharts must use the public API entry point; imports from internal paths like recharts/types/* or recharts/src/* are not allowed

Files:

  • www/src/components/Shared/StackBlitzLink.tsx
  • test/state/selectors/axisSelectors.spec.tsx
  • test/polar/Pie.spec.tsx
  • www/src/components/CodeEditorWithPreview.tsx
  • www/src/docs/exampleComponents/ScatterChart/ScatterChartPerformance.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
  • storybook/stories/Examples/Tooltip.stories.tsx
test/**/*.spec.{ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Aim for 100% unit test code coverage when writing new code

Files:

  • test/state/selectors/axisSelectors.spec.tsx
  • test/polar/Pie.spec.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
test/**/*.{test,spec}.{ts,tsx}

📄 CodeRabbit inference engine (test/README.md)

test/**/*.{test,spec}.{ts,tsx}: Aim for 100% unit test code coverage when writing new code
Prefer to use the createSelectorTestCase helper function when writing or modifying tests
Use the expectLastCalledWith helper function instead of expect(spy).toHaveBeenLastCalledWith(...) for better typing and autocompletion
Verify the number of selector calls using the spy object from createSelectorTestCase to spot unnecessary re-renders and improve performance
Mock getBoundingClientRect in tests using the helper function provided in test/helper/MockGetBoundingClientRect.ts
Use vi.useFakeTimers() in all tests due to Redux autoBatchEnhancer dependency on timers and requestAnimationFrame
Call vi.runOnlyPendingTimers() to advance timers after renders when not using createSelectorTestCase helper, and avoid vi.runAllTimers() to prevent infinite loops
Use userEvent.setup({ advanceTimers: vi.runOnlyPendingTimers }) or the userEventSetup helper function from test/helper/userEventSetup.ts when creating userEvent instances
When testing tooltips on hover, use vi.runOnlyPendingTimers() after each userEvent.hover() call or use the showTooltip helper function from tooltipTestHelpers.ts to account for requestAnimationFrame delays

Files:

  • test/state/selectors/axisSelectors.spec.tsx
  • test/polar/Pie.spec.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
**/*.spec.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

When running unit tests, prefer to run a single test file using npm run test -- path/to/TestFile.spec.tsx rather than running all tests with npm test

Files:

  • test/state/selectors/axisSelectors.spec.tsx
  • test/polar/Pie.spec.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
storybook/stories/**/*.stories.tsx

📄 CodeRabbit inference engine (CONTRIBUTING.md)

storybook/stories/**/*.stories.tsx: Use Storybook for smoke tests and add play functions with assertions for actual tests
Update Storybook stories when APIs have been changed to ensure they work as expected

Files:

  • storybook/stories/Examples/Tooltip.stories.tsx
**/storybook/**/*.stories.{ts,tsx}

📄 CodeRabbit inference engine (DEVELOPING.md)

When adding new Storybook stories, prioritize high fidelity examples intended for publication on the website and in Storybook UI; use unit tests or VR tests for low fidelity tests

Files:

  • storybook/stories/Examples/Tooltip.stories.tsx
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
Repo: recharts/recharts PR: 0
File: DEVELOPING.md:0-0
Timestamp: 2025-12-06T03:36:59.377Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : All imports from `recharts` must use the public API entry point; imports from internal paths like `recharts/types/*` or `recharts/src/*` are not allowed
Learnt from: CR
Repo: recharts/recharts PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-25T01:22:59.729Z
Learning: Extract pure helper functions for data processing and write unit tests for them
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-11-25T01:23:08.250Z
Learning: Applies to test/**/*.{test,spec}.{ts,tsx} : Use `vi.useFakeTimers()` in all tests due to Redux autoBatchEnhancer dependency on timers and `requestAnimationFrame`
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-11-25T01:23:08.250Z
Learning: Applies to test/**/*.{test,spec}.{ts,tsx} : Mock `getBoundingClientRect` in tests using the helper function provided in `test/helper/MockGetBoundingClientRect.ts`
📚 Learning: 2025-12-06T03:36:59.377Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: DEVELOPING.md:0-0
Timestamp: 2025-12-06T03:36:59.377Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : All imports from `recharts` must use the public API entry point; imports from internal paths like `recharts/types/*` or `recharts/src/*` are not allowed

Applied to files:

  • www/src/components/Shared/StackBlitzLink.tsx
  • package.json
  • test/polar/Pie.spec.tsx
  • www/src/components/CodeEditorWithPreview.tsx
  • www/src/docs/exampleComponents/ScatterChart/ScatterChartPerformance.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
  • storybook/stories/Examples/Tooltip.stories.tsx
📚 Learning: 2025-11-19T14:08:01.728Z
Learnt from: PavelVanecek
Repo: recharts/recharts PR: 6659
File: www/src/components/GuideView/Performance/index.tsx:232-250
Timestamp: 2025-11-19T14:08:01.728Z
Learning: In Recharts version 3.4.2, object-as-prop optimizations were introduced to reduce unnecessary re-renders when new object references are passed as props. This affects the recommendation for the `react-perf/jsx-no-new-object-as-prop` ESLint rule.

Applied to files:

  • www/src/components/Shared/StackBlitzLink.tsx
  • package.json
  • www/src/docs/exampleComponents/ScatterChart/ScatterChartPerformance.tsx
📚 Learning: 2025-11-25T01:22:59.729Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-25T01:22:59.729Z
Learning: Applies to storybook/stories/**/*.stories.tsx : Update Storybook stories when APIs have been changed to ensure they work as expected

Applied to files:

  • www/src/components/Shared/StackBlitzLink.tsx
  • test/state/selectors/axisSelectors.spec.tsx
  • test/polar/Pie.spec.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
  • storybook/stories/Examples/Tooltip.stories.tsx
📚 Learning: 2025-11-23T13:30:10.395Z
Learnt from: PavelVanecek
Repo: recharts/recharts PR: 6669
File: www/src/docs/exampleComponents/ScatterChart/ScatterChartWithLabels.tsx:2-2
Timestamp: 2025-11-23T13:30:10.395Z
Learning: The `TooltipIndex` type from recharts is defined in `src/state/tooltipSlice.ts` but is not currently exported from the public API entry points. It should not be imported from `recharts/types/state/tooltipSlice` as this is an internal implementation path. An ESLint rule is needed to prevent regressions.

Applied to files:

  • www/src/components/Shared/StackBlitzLink.tsx
  • package.json
  • test/polar/Pie.spec.tsx
  • www/src/components/CodeEditorWithPreview.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
  • storybook/stories/Examples/Tooltip.stories.tsx
📚 Learning: 2025-11-25T01:23:08.250Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-11-25T01:23:08.250Z
Learning: Applies to test/**/*.{test,spec}.{ts,tsx} : Verify the number of selector calls using the spy object from `createSelectorTestCase` to spot unnecessary re-renders and improve performance

Applied to files:

  • test/state/selectors/axisSelectors.spec.tsx
  • test/polar/Pie.spec.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
📚 Learning: 2025-11-25T01:23:08.250Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-11-25T01:23:08.250Z
Learning: Applies to test/**/*.{test,spec}.{ts,tsx} : Prefer to use the `createSelectorTestCase` helper function when writing or modifying tests

Applied to files:

  • test/state/selectors/axisSelectors.spec.tsx
  • test/polar/Pie.spec.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
📚 Learning: 2025-11-25T01:23:08.250Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-11-25T01:23:08.250Z
Learning: Applies to test/**/*.{test,spec}.{ts,tsx} : Mock `getBoundingClientRect` in tests using the helper function provided in `test/helper/MockGetBoundingClientRect.ts`

Applied to files:

  • test/state/selectors/axisSelectors.spec.tsx
  • test/polar/Pie.spec.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
  • storybook/stories/Examples/Tooltip.stories.tsx
📚 Learning: 2025-11-25T01:23:08.250Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-11-25T01:23:08.250Z
Learning: Applies to test/**/*.{test,spec}.{ts,tsx} : Use `vi.useFakeTimers()` in all tests due to Redux autoBatchEnhancer dependency on timers and `requestAnimationFrame`

Applied to files:

  • test/state/selectors/axisSelectors.spec.tsx
  • test/polar/Pie.spec.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
📚 Learning: 2025-11-25T01:23:08.250Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-11-25T01:23:08.250Z
Learning: Applies to test/**/*.{test,spec}.{ts,tsx} : Use the `expectLastCalledWith` helper function instead of `expect(spy).toHaveBeenLastCalledWith(...)` for better typing and autocompletion

Applied to files:

  • test/state/selectors/axisSelectors.spec.tsx
  • test/polar/Pie.spec.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
📚 Learning: 2025-11-25T01:23:08.250Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-11-25T01:23:08.250Z
Learning: Applies to test/**/*.{test,spec}.{ts,tsx} : Call `vi.runOnlyPendingTimers()` to advance timers after renders when not using `createSelectorTestCase` helper, and avoid `vi.runAllTimers()` to prevent infinite loops

Applied to files:

  • test/state/selectors/axisSelectors.spec.tsx
  • test/polar/Pie.spec.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
📚 Learning: 2025-11-25T01:22:59.729Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-25T01:22:59.729Z
Learning: Applies to test/component/**/*.spec.tsx : Use React Testing Library for testing component interactions and behavior upon rendering

Applied to files:

  • test/state/selectors/axisSelectors.spec.tsx
  • test/polar/Pie.spec.tsx
  • www/src/components/CodeEditorWithPreview.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
📚 Learning: 2025-11-25T01:22:59.729Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-25T01:22:59.729Z
Learning: Applies to storybook/stories/**/*.stories.tsx : Use Storybook for smoke tests and add play functions with assertions for actual tests

Applied to files:

  • test/state/selectors/axisSelectors.spec.tsx
  • test/polar/Pie.spec.tsx
  • test/state/selectors/selectDisplayedData.spec.tsx
  • test/chart/LineChart.spec.tsx
  • storybook/stories/Examples/Tooltip.stories.tsx
📚 Learning: 2025-11-25T01:23:08.250Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-11-25T01:23:08.250Z
Learning: Applies to test/**/*.{test,spec}.{ts,tsx} : When testing tooltips on hover, use `vi.runOnlyPendingTimers()` after each `userEvent.hover()` call or use the `showTooltip` helper function from `tooltipTestHelpers.ts` to account for requestAnimationFrame delays

Applied to files:

  • test/polar/Pie.spec.tsx
  • test/chart/LineChart.spec.tsx
  • storybook/stories/Examples/Tooltip.stories.tsx
📚 Learning: 2025-12-06T03:36:59.377Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: DEVELOPING.md:0-0
Timestamp: 2025-12-06T03:36:59.377Z
Learning: Applies to **/storybook/**/*.stories.{ts,tsx} : When adding new Storybook stories, prioritize high fidelity examples intended for publication on the website and in Storybook UI; use unit tests or VR tests for low fidelity tests

Applied to files:

  • storybook/stories/Examples/Tooltip.stories.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build, Test, Pack
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (9)
test/state/selectors/axisSelectors.spec.tsx (1)

1-5: Import switch to @recharts/devtools looks safe and keeps the test deterministic.
No logic change; seed-based data stays stable.

storybook/stories/Examples/Tooltip.stories.tsx (1)

1-4: LGTM: Storybook now reuses the shared generateMockData helper.
Main thing to verify is that the Storybook build includes @recharts/devtools (see the workspace-deps check in the root package.json comment).

test/polar/Pie.spec.tsx (1)

1-5: LGTM: centralized mock data generator reduces duplicated helpers.

test/state/selectors/selectDisplayedData.spec.tsx (1)

1-5: LGTM: import-only change; seeded data keeps snapshots/assertions stable.

test/chart/LineChart.spec.tsx (1)

1-5: LGTM: tests now share the same mock-data source as other suites.

www/src/components/Shared/StackBlitzLink.tsx (1)

72-88: Pin StackBlitz dependencies to specific versions instead of 'latest'. Using 'latest' makes examples non-reproducible and risks breaking overnight when new releases deploy. Pin recharts and @recharts/devtools to known-good versions that match the project's validated releases, and include comments noting they should be kept in sync with root package.json and repository releases.

package.json (1)

99-134: Remove this review comment; @recharts/devtools does not exist in the Recharts monorepo or npm registry.

A web search confirms that @recharts/devtools is neither a published npm package nor an existing workspace package in the official Recharts monorepo. The concern about declaring this dependency in www/package.json cannot apply to a non-existent package. If a devtools package is planned as a future workspace, the hoisting concern is valid in general principle, but it does not apply to the current codebase.

Likely an incorrect or invalid review comment.

www/src/docs/exampleComponents/ScatterChart/ScatterChartPerformance.tsx (2)

4-15: LGTM! Data generation logic is clean and appropriate for documentation examples.

The seeded random number generator ensures reproducible data, which is ideal for documentation and testing. The nested array structure correctly generates 100 scatter series with 10 points each, and the usage of between for bounded random values is consistent and clear.

The code relies on type inference, which is acceptable in documentation examples. Proper typing will depend on the TypeScript definitions from @recharts/devtools verified above.


2-2: Verify that @recharts/devtools is properly configured with TypeScript definitions.

The package must have proper TypeScript type definitions to comply with coding guidelines that prohibit implicit any types. Check that:

  1. @recharts/devtools is listed as a dev dependency in package.json
  2. The package exports TypeScript type definitions
  3. The random and between function signatures match the usage in this file

Comment thread package.json
"@eslint/compat": "^1.3.2",
"@eslint/js": "^9.35.0",
"@playwright/experimental-ct-react": "1.57.0",
"@recharts/devtools": "^0.0.2",

@coderabbitai coderabbitai Bot Dec 12, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Verify npm metadata for 0.0.2 + inspect package exports & browser-safety.
PKG='@recharts/devtools'
VER='0.0.2'

META="$(mktemp)"
curl -fsSL "https://registry.npmjs.org/${PKG}" > "$META"

# Ensure version exists
jq -e --arg v "$VER" '.versions[$v]' "$META" >/dev/null && echo "✓ Version $VER exists" || echo "✗ Version $VER not found"

# Download tarball for 0.0.2 and inspect package.json (exports, dependencies)
TARBALL="$(jq -r --arg v "$VER" '.versions[$v].dist.tarball' "$META")"
WORK="$(mktemp -d)"
curl -fsSL "$TARBALL" -o "$WORK/pkg.tgz"
tar -xzf "$WORK/pkg.tgz" -C "$WORK"

echo "== package/package.json =="
cat "$WORK/package/package.json"

Repository: recharts/recharts

Length of output: 281


🌐 Web query:

@recharts/devtools npm package version 0.0.2

💡 Result:

I couldn't find any record of a scoped package named @recharts/devtools or a version 0.0.2 on the public npm registry. Searches of the Recharts package listings and registry mirrors show the main recharts packages but not @recharts/devtools. [1][2]

If you want to double-check locally, run:

  • npm view @recharts/devtools versions

References:

  • Recharts package info on npm. [1]
  • Recharts package.json on unpkg (registry mirror). [2]

Remove @recharts/devtools dependency — package does not exist on npm registry.

The package @recharts/devtools version 0.0.2 is not published on npm. Installing this dependency will fail during npm install. Either remove this line or publish the package to a registry.

🤖 Prompt for AI Agents
In package.json around line 112, the dependency entry "@recharts/devtools":
"^0.0.2" references a package that isn't published to the npm registry and will
break npm install; remove this dependency line from package.json (or replace it
with a valid published package/version or an internal registry URL if you intend
to keep it), then run npm install and update any code/imports that reference
@recharts/devtools to avoid unresolved module errors.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

@codecov

codecov Bot commented Dec 12, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.70%. Comparing base (164d6b9) to head (f2e213c).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
www/src/components/CodeEditorWithPreview.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6766   +/-   ##
=======================================
  Coverage   93.70%   93.70%           
=======================================
  Files         515      515           
  Lines       43011    42995   -16     
  Branches     5018     5012    -6     
=======================================
- Hits        40302    40289   -13     
+ Misses       2703     2700    -3     
  Partials        6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown
Contributor

Staging Deployment Details

These deployments will remain available for 30 days.

To update snapshots: Comment /update-snapshots on this PR to automatically update the baseline screenshots.

@codecov

codecov Bot commented Dec 12, 2025

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@PavelVanecek
PavelVanecek merged commit b7637b6 into main Dec 12, 2025
38 of 40 checks passed
@PavelVanecek
PavelVanecek deleted the devtools branch December 12, 2025 10:15
This was referenced Jan 19, 2026
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