strat-gameplay-webapp/backend/app/websocket
Cal Corum 19b35f148b CLAUDE: Load play history on mid-game join via game_state_sync
Backend changes:
- Modified request_game_state handler to fetch plays from database
- Convert Play DB models to frontend-compatible PlayResult dicts
- Emit game_state_sync event with state + recent_plays array

Frontend changes:
- Added deduplication by play_number in addPlayToHistory()
- Prevents duplicate plays when game_state_sync is received

Field mapping from Play model:
- hit_type -> outcome
- result_description -> description
- batter_id -> batter_lineup_id
- batter_final -> batter_result

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 12:38:56 -06:00
..
__init__.py CLAUDE: Complete Phase 1 backend infrastructure setup 2025-10-21 19:46:16 -05:00
CLAUDE.md CLAUDE: Refactor backend CLAUDE.md files for conciseness 2025-11-19 16:10:08 -06:00
connection_manager.py CLAUDE: Enhance WebSocket handlers with comprehensive test coverage 2025-11-28 12:08:43 -06:00
handlers.py CLAUDE: Load play history on mid-game join via game_state_sync 2025-11-28 12:38:56 -06:00
MANUAL_VS_AUTO_MODE.md CLAUDE: Phase 3E-Final - Redis Caching & X-Check WebSocket Integration 2025-11-03 22:46:59 -06:00
X_CHECK_FRONTEND_GUIDE.md CLAUDE: Phase 3E-Final - Redis Caching & X-Check WebSocket Integration 2025-11-03 22:46:59 -06:00