post-app-website-new/.claude
Shawn Anderson 97a4eee6f0 feat: implement Phase 1 - live arrows with propagators
Major features:
- Functional arrows that propagate values between shapes
- Arrow drawing with snap-to-shape centers
- Arrow selection with visual highlighting (cyan, 4px)
- Propagator system (inline FolkJS-inspired implementation)
- Shape value editor and arrow expression editor
- Test Propagation button to trigger data flow

Critical bug fixes:
- EventTarget storage in separate Map to survive React state updates
- Stale closure fix using functional setState pattern
- Negative dimension normalization for rectangles
- Arrow hit detection using point-to-line distance algorithm
- Propagator cleanup on arrow deletion

Code quality improvements:
- Extracted isPointInShape() helper (removed ~30 lines duplication)
- Added HIT_TOLERANCE constant (no magic numbers)
- Removed debug logging after troubleshooting
- Proper resource cleanup (dispose propagators)

Documentation:
- Created CANVAS_DEVELOPMENT_GUIDE.md (comprehensive technical reference)
- Created SESSION_2025-11-07.md (session journal with lessons learned)
- Updated README.md (project overview with 6-phase roadmap)
- Updated CLAUDE.md (added Development Journal section)
- All docs moved to .claude/journal/

Technical discoveries documented:
1. React state immutability & EventTarget storage pattern
2. Stale closure pattern in event handlers
3. Negative dimensions bug in canvas drawing
4. Point-to-line distance algorithm for hit detection
5. Code organization best practices

Files modified:
- app/italism/page.tsx: 769 lines (+150 net)
- README.md: Complete rewrite with practical info
- package.json: TypeScript config updates
- tsconfig.json: Next.js auto-updates

Status: Phase 1 Complete 
Next: Phase 2 (expression parser, arrow auto-update, flow animation)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 17:00:39 -08:00
..
commands feat: implement Phase 1 - live arrows with propagators 2025-11-07 17:00:39 -08:00
journal feat: implement Phase 1 - live arrows with propagators 2025-11-07 17:00:39 -08:00