diff --git a/docs/decisions/ADR-001-recharts3-upgrade.md b/docs/decisions/ADR-001-recharts3-upgrade.md deleted file mode 100644 index 82f4f57d..00000000 --- a/docs/decisions/ADR-001-recharts3-upgrade.md +++ /dev/null @@ -1,51 +0,0 @@ -# ADR-001: Recharts 2 → 3 Upgrade - -**Status:** Accepted - -**Date:** 2026-07-04 - -## Context - -The project used recharts 2.15.4. PR #78 (2026-04-22) upgraded to recharts ^3.8.1 to unblock Tailwind CSS v4 (recharts 3 requires React 19 / Tailwind v4 compatible peer deps). The breaking change was already absorbed in the codebase. - -### Breaking change absorbed - -Recharts 3 removed `payload`, `label`, and coordinate props from the `ComponentProps` type (used by `Tooltip`, `Legend`, and `Customized` components). The types were moved to named exports `DefaultLegendContentProps` and `TooltipContentProps`. - -## Decision - -Upgrade `recharts` from 2.15.4 to ^3.8.1 with the import type pivot: - -```typescript -// Before (recharts 2) -import type { ContentType } from 'recharts/types/component/DefaultLegendContent'; - -// After (recharts 3) -import type { DefaultLegendContentProps, TooltipContentProps } from 'recharts'; -``` - -The import path change is the only migration cost. No runtime API changes affected the project's chart usage. - -## Consequences - -### Positive - -- React 19 / Tailwind v4 compatibility via recharts 3 peer deps -- `types/component/` deep path removed from sensitive type imports -- TypeScript strict mode compatible (no `@ts-ignore` needed) - -### Negative - -- None. The breaking type change was fully absorbed in `src/components/ui/chart.tsx:5`. - -## Files Changed - -- `src/components/ui/chart.tsx` — recharts import type pivot -- `package.json` — `recharts` dep bumped from 2.15.4 to ^3.8.1 - -## Testing - -- `npm run typecheck` — 0 errors -- `npm run test` — 1103/1103 -- `npm run e2e` — 21/21 (dashboard smoke + chart render) -- `/dashboard` — manual smoke: charts render with correct axis labels, tooltip on hover, legend visible diff --git a/package-lock.json b/package-lock.json index f728f321..81286965 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7221,7 +7221,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.3.tgz", "integrity": "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@radix-ui/react-accordion": { @@ -10945,7 +10945,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.2.tgz", "integrity": "sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@radix-ui/react-use-effect-event": "0.0.2", @@ -10965,7 +10965,7 @@ "version": "0.0.2", "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.2.tgz", "integrity": "sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@radix-ui/react-use-layout-effect": "1.1.1"