Fixes production error "Cannot read properties of undefined (reading 'carryBoxes')"
that occurred when users tried to adjust difficulty settings.
Root cause: displayRules was undefined for new users or users with old V1 config
in database. Difficulty adjustment buttons accessed displayRules.carryBoxes without
checking if displayRules existed first.
Changes:
- AdditionWorksheetClient: Initialize displayRules with defaults when missing
- ConfigPanel: Use null-coalescing operators instead of non-null assertions
- ConfigPanel: Add error logging when required fields are missing
- NEW: WorksheetErrorBoundary component to catch all errors in worksheet page
- page.tsx: Wrap client component with error boundary
This ensures users see helpful error messages instead of blank pages,
and never need to open the browser console to understand what went wrong.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add StandaloneBead.stories.tsx with 11 stories covering all use cases
(icons, decorations, progress indicators, size/color variations)
- Add AbacusDisplayProvider.stories.tsx with 9 stories demonstrating
context features, localStorage persistence, and configuration
- Add MIGRATION_GUIDE.md for useAbacusState → useAbacusPlaceStates
with code examples, API comparison, and BigInt documentation
- Consolidate all test files to src/__tests__/ directory for consistency
- Fix vitest configuration ESM module issue (rename to .mts)
This improves discoverability, documentation, and developer experience
for the abacus-react component library.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>