` and before the items-grouped-by-category `
`, within the `{itemCount > 0 && (...)}` block.
4. **Verify**: Run `bun run build` to ensure no TypeScript errors and Recharts imports resolve correctly.
bun run build
- WeightSummaryCard renders below sticky bar when setup has items
- Shows 4 columns: Base | Worn | Consumable | Total with correct weight values in selected unit
- Donut chart renders with colored segments for weight distribution
- Pill toggle switches between category view and classification view
- Hovering chart segments shows tooltip with name, weight, and percentage
- Total weight displayed in center of donut hole
- Empty/zero-weight items handled gracefully
- Build succeeds with no TypeScript errors
Task 2: Visual verification of complete weight classification and visualization
N/A
Present the user with verification steps for the complete Phase 9 feature set.
This checkpoint covers both Plan 01 (classification badges) and Plan 02 (summary card + chart) together.
Complete weight classification and visualization system:
1. Classification badges on every item card in setup view (click to cycle: base weight / worn / consumable)
2. Weight summary card with Base | Worn | Consumable | Total subtotals
3. Donut chart with category/classification toggle and hover tooltips
4. Total weight in the center of the donut hole
1. Start dev servers: `bun run dev:server` and `bun run dev:client`
2. Open http://localhost:5173 and navigate to a setup with items (or create one and add items)
3. **Classification badges**: Verify each item card shows a gray pill badge. Click it and confirm it cycles: "Base Weight" -> "Worn" -> "Consumable" -> "Base Weight". Confirm clicking the badge does NOT open the item edit panel.
4. **Classification persistence**: Refresh the page. Confirm classifications are preserved.
5. **Weight subtotals**: With items classified differently, verify the summary card shows correct subtotals for Base, Worn, Consumable, and Total columns.
6. **Donut chart (Category view)**: Verify the donut chart shows colored segments grouped by category. Hover segments to see tooltip with category name, weight, and percentage.
7. **Donut chart (Classification view)**: Click the "Classification" pill toggle. Verify chart segments change to show base/worn/consumable breakdown with different colors. Hover to verify tooltips.
8. **Donut center**: Confirm total weight is displayed in the center of the donut hole in the selected weight unit.
9. **Weight unit**: Toggle the weight unit in the top bar (if available). Confirm all subtotals, chart center, and tooltips update to the new unit.
10. **Add/remove items**: Add another item to the setup. Verify it appears with default "Base Weight" badge and the chart updates. Remove an item and verify classifications for remaining items are preserved.
Visual verification by user following steps above
User confirms all classification badges, weight subtotals, donut chart, toggle, and tooltips work correctly
Type "approved" to complete Phase 9, or describe any issues to address
```bash
# Full test suite passes
bun test
# Build succeeds
bun run build
# Lint passes
bun run lint
```
- WeightSummaryCard visible below sticky bar on setup detail page (only when items exist)
- Four weight columns (Base, Worn, Consumable, Total) show correct values in selected unit
- Donut chart renders with colored segments proportional to weight distribution
- Pill toggle switches between category and classification chart views
- Tooltip on hover shows segment name, formatted weight, and percentage
- Total weight displayed in center of donut hole
- Chart handles edge cases (no weight data, single category, etc.)
- User confirms visual appearance matches expectations