Files
soroban-abacus-flashcards/apps/web/scripts
Thomas Hallock 41a3707841 fix: replace regex HTML parsing with deterministic bead position calculations in icon generation
- Replace fragile regex parsing in generateDayIcon.tsx with proper bead
  position calculations using numberToAbacusState(), calculateStandardDimensions(),
  and calculateBeadPosition() from @soroban/abacus-react
- Add query parameter support to /icon route for testing different days (e.g. /icon?day=15)
- Fix icon cropping to properly show only active beads with dynamic viewBox
- Validate day parameter (1-31) and return 400 for invalid values
- Different cache duration for production (1 hour) vs testing (1 minute)

Results:
- Day 1: 48.88px height (minimal)
- Day 5: 48.88px height (single heaven bead)
- Day 25: 100.18px height (many active beads)
- Day 31: 93.88px height

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 09:10:17 -06:00
..