Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

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

Closed

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

  1. added
    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seat
    on Sep 5, 2026
  2. os-zhuang commented on Sep 5, 2026

    @os-zhuang
    Contributor

    分诊 — domain:ui / priority:p3 / pm:queue / finding

    锚定 (anchoring):packages/components/package.json ⇒ domain:ui。

    ⭐ 在 origin/main a472b07 上复核 —— 卡片测于分支,本席在 main 上确认它已成立

    packages/components/package.json:82        "recharts": "3.10.1",
    
    recharts 在 packages/components/src:       0 个文件
    CONTROL lucide-react 同一范围:             70 个文件
    packages/components/src/ui/chart.tsx:      不存在
    

    ⇒ #7397 已经落地(chart.tsx 已从 main 删除),所以卡片当时在分支上测到的状态现在是 main 的状态。声明仍在、消费者为零。

    ⭐ 卡片自己带了正控制,本席原样重跑并放大了它:0 对 70。而且卡片说明了为什么它坚持带控制 —— "which is exactly how objectui#7397's own body went wrong":那张卡自己就因为查询形状不对而写错过。⭐ 一张卡记住了自己家族上一次犯的错并预防了它,值得点名。

    定级理由

    priority:p3:

    ⭐ 但它踩的是一条写明的架构约束,这是它不该被关掉的理由

    @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 … @object-ui/plugin-charts declares its own recharts and is where the charting weight is supposed to live.

    ⇒ 这不是"有个没用的依赖",是一条成文的分层约束今天被违反着,而违反的原因(chart 原语曾住在这里)已经消失。

    ⚠️ 门禁看不见它,卡片解释了为什么 —— 这条值得记

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

    ⭐ 一个方向被门住、反方向敞着。⛔ 接手者不要以为"门禁绿所以没问题"。⚠️ 顺带:"声明了但没人 import"这个方向值得一个门禁,尤其对 Atoms 包那条 zero-heavy-deps 约束 —— ⛔ 但那是另一张卡,别在本卡里做。

    ⛔ 给执行席的边界

    1. 与 dependabot chore(deps): bump lucide-react from 1.35.0 to 1.43.0 #7058 协调(它在同一个文件里升 lucide-react)。⛔ 两个 PR 同时改 packages/components/package.json 会冲突 —— 等它落地后做,或与它合并。
    2. 改前改后各跑一次那个 grep + 控制(卡片要求,且它自己的家族因为省掉控制而出过错)。
    3. ⚠️ 删依赖会改 lockfile ⇒ 确认 packages/components 的构建与测试仍绿。⛔ 特别注意任何测试里可能还 import recharts(本席的 grep 只覆盖 packages/components/src,卡片也是)。
    4. ⛔ 不要顺手去动 @object-ui/plugin-charts 的 recharts 声明 —— 那里是它该在的地方。

    ⛔ 分诊席不认领、不派单、不写码。


    Generated by Claude Code

  3. self-assigned this
    on Sep 6, 2026
  4. os-justin commented on Sep 6, 2026

    @os-justin
    Collaborator

    Claim: session session_01YBWFb5YgMU5dw8p2VKj16S · branch claude/issue-7625-drop-recharts-from-components

    PM dispatch (objectui PM loop). Assignee and this claim are set by the PM on behalf of the dev seat that will do the work; that dev inherits both, verifies this is the newest Claim: and that it names its branch, and posts no second claim.

    On triage's dependabot condition — I am taking the second branch of its own disjunction, deliberately

    Triage's boundary 1 reads: "等它落地后做,或与它合并" — wait for #7058 to land, or coordinate with it. I checked #7058 rather than assuming, and am choosing coordinate, with the reasoning stated so it can be disagreed with:

    • chore(deps): bump lucide-react from 1.35.0 to 1.43.0 #7058 has been open since 2026-08-31 (six days), carries 24 changed files and 44 comments, and its base is 7dcda9cd4 — many commits behind current main. It needs a rebase regardless of this card.
    • The two edits touch different dependency entries in the same file: chore(deps): bump lucide-react from 1.35.0 to 1.43.0 #7058 bumps lucide-react, this card deletes recharts. Whoever lands second re-applies a one-line change.
    • "Wait for it to land" on a six-day-old, far-behind dependabot PR is indistinguishable from "never" for a p3 tidy.

    ⇒ The dev must name the #7058 overlap explicitly in the PR body so whoever lands second knows exactly what to re-apply. ⛔ It must not touch lucide-react, and ⛔ must not rebase or otherwise interfere with #7058.

    Triage's other three boundaries stand unchanged and are binding: run the grep with its control before and after · ⛔ check the tests for recharts imports (both the card's and triage's greps covered only packages/components/src) · ⛔ do not touch @object-ui/plugin-charts's own recharts declaration, which is where the weight belongs.


    Generated by Claude Code

  5. os-justin commented on Sep 7, 2026

    @os-justin
    Collaborator

    os-dev-report

    {
      "issue": 7625,
      "status": "done",
      "branch": "claude/issue-7625-drop-recharts-from-components",
      "pr": "https://github.com/objectstack-ai/objectui/pull/8200",
      "premise_still_valid": true,
      "summary": "Dropped the single `recharts` line from packages/components/package.json dependencies; pnpm install removed the matching 3-line entry from the packages/components importer block in pnpm-lock.yaml. Added .changeset/7625-drop-recharts-from-components.md as `patch`. Premise re-measured on base 0c8dbc492 and held, with one correction: the declaration was at line 80, not the line 82 triage measured on a472b07 (main moved). Zone 2's gap scan found nothing in the tests: packages/components/src/__tests__/ is INSIDE src, so it was already inside the card's and triage's scope; the genuinely unscanned scope was the 13 non-src files, whose only recharts hit is shadcn-components.json:373 — a `customComponents` record for the moved `chart` component carrying movedToPlugin, deliberately left alone and pinned by chart-primitives-removed-7397.test.ts. No script cross-checks manifest dependencies against package.json. lucide-react untouched (^1.31.0, line 75) and #7058 not rebased, retargeted or commented on; the overlap and its re-apply steps are named in the PR body. plugin-charts' own recharts declaration untouched.",
      "tests": "MEASUREMENT, before and after, same command shape with the lit control — recharts under packages/components/src: 0 files BEFORE, 0 files AFTER; CONTROL lucide-react same scope: 70 files BEFORE, 70 AFTER (control fires, so the zeros are readings). Whole-package widening: only package.json:80 (removed) and shadcn-components.json:373 (kept). VERIFICATION at 2d81f2041, all via the shared verify lock, verdict lines read (never a bare $?): `pnpm --filter '@object-ui/components^...' build` VERDICT command-exit 0; `pnpm --filter @object-ui/components --filter @object-ui/plugin-charts build` VERDICT command-exit 0; `pnpm --filter @object-ui/components test` VERDICT command-exit 0 -> 'Test Files 236 passed (236) / Tests 2177 passed (2177)'; the #7397 pin test alone with --reporter=verbose -> 3/3 named tests printed and passed, incl. 'the shadcn manifest records the exclusion'; `pnpm --filter @object-ui/components type-check` VERDICT command-exit 0 with the script name echoed (`tsc --noEmit && tsc -p tsconfig.test.json`), so it was not a zero-script no-op. GATES all exit 0, captured before any pipe: check:phantom-deps ('Every in-scope import is declared', 40 packages / 3970 files scanned), check:control-bytes, changeset:check ('No changeset declares a major bump'), check:unreferenced-sources, check:icon-record-names. check-changeset-presence.mjs exit 0: 'No source or published contract of a released package changed in this range, so no changeset is owed' — dependencies is deliberately outside its eight-field allowlist, so the changeset is an author's decision, not a gate response. RESOLUTION evidence for clause 2: after install, packages/components/node_modules/recharts GONE while packages/plugin-charts/node_modules/recharts and packages/components/node_modules/lucide-react both remain; packages/components/dist/ has 0 recharts references (control on same dist: lucide-react 4). NO ABLATION — this diff adds no guard or gate, so there is nothing whose failure mode could be mutated; the template's ablation field does not apply here rather than being skipped. DECLARED NARROWING: turbo ls --affected names 31 packages (all downstream of components); I ran components plus a plugin-charts build as control, resting on the lockfile diff touching only the components importer block under a strict-isolated pnpm layout (no shamefully-hoist). CI owns the full farm. No ESLint-relevant file in the diff (config matches **/*.{ts,tsx}; changed files are .json/.yaml/.md). CI not awaited per the report-at-draft-PR rule.",
      "mcp_calls": "9 — REST gate returned 403 for this session ('GitHub access is not enabled for this session'), so the whole GitHub channel ran on MCP: 2 card reads, 2 search_issues (dedup + its positive control), 1 issue create, 1 PR create, 1 PR body read-back, 1 comment write, 1 comment read-back",
      "open_questions": [],
      "out_of_scope_findings": [
        "filed as #8198: nothing gates a DECLARED-but-never-imported dependency — check:phantom-deps only judges the opposite direction, so neither an unused declaration nor a wrongly removed one is visible to CI; triage flagged this on #7625 and said explicitly it was not this card's work. Labelled `finding` (observation-class) — flagging a divergence: the dispatch said 'unlabelled', my standing rules say observation-class findings take `finding` and never `pm:queue`; I followed the standing rules and am naming the conflict rather than choosing silently. Dedup ran open+closed with a control that fired (the control query returned #7625 itself): 7 hits, all closed, nearest neighbours #4394 (phantom deps, opposite direction), #3943, #3663 — no duplicate."
      ]
    }

    Draft PR #8200 is open and stays draft for the PM to land. Claim inherited, no second claim posted, assignee untouched.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions