Skip to content

finding(components): recharts stays declared in @object-ui/components after the chart primitives moved to plugin-charts #7625

Description

@claude

Found while executing objectui#7397 (removing the duplicate chart primitives from @object-ui/components). Filed rather than fixed there: packages/components/package.json is outside that card's declared file surface, and it is held by an open PR (dependabot #7058 bumps lucide-react in the same file).

What

packages/components/src/ui/chart.tsx was the only consumer of recharts inside @object-ui/components. With that file gone, the dependency is declared but unused:

"recharts": "3.10.1"   # packages/components/package.json

Measured on branch claude/issue-7397-remove-duplicate-chart-primitives after the deletion:

  • git grep -n recharts -- packages/components/src returns zero source references
  • positive control, same command shape: lucide-react fires across many files, so the zero is a reading and not a wrong-query-shape artefact (which is exactly how objectui#7397's own body went wrong)

Why it is worth a card

@object-ui/components is the Atoms package, which AGENTS.md section 3 constrains to "Shadcn primitives, zero heavy 3rd-party deps". recharts is a heavy charting library, and while it is declared here every consumer of @object-ui/components resolves and installs it for nothing. @object-ui/plugin-charts declares its own recharts and is where the charting weight is supposed to live.

Note this is an install-graph cost, not a bundle-size regression: the console's eager closure was measured after the objectui#7397 deletion and vendor-charts (155.2 KB gzipped) is still eagerly reachable through the plugins, so check:eager-closure is unaffected either way (it passed at 3180.1 KB against its 3191.4 KB ceiling).

Not a gate failure today

check:phantom-deps passes — it judges the opposite direction (imports that are not declared), so nothing in CI currently sees an unused declaration.

Suggested fix

Drop recharts from packages/components/package.json dependencies, once dependabot #7058 has landed or in coordination with it. Confirm with the same grep plus its control before and after.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatfindingpm:queuepriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions