strat-gameplay-webapp/backend/app
Cal Corum dc9f98ad88 CLAUDE: Fix batting order recovery after inning changes
When recovering game state after reconnect/refresh, the old code:
1. Only looked at the last play overall (regardless of team)
2. Used that play's batting order for the currently batting team
3. Reset the non-batting team's index to 0

This caused the wrong batter to appear after inning changes - e.g.,
batter #1 showing instead of #5 in top of 2nd after bottom of 1st ended.

Fix: Now recovers each team's batter index separately by filtering
plays by half ("top" = away team, "bottom" = home team) and finding
each team's last at-bat independently.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 23:38:54 -06:00
..
api CLAUDE: Fix Safari/iPad auth failure on game detail page 2025-11-28 21:53:20 -06:00
config CLAUDE: Replace black and flake8 with ruff for formatting and linting 2025-11-20 15:33:21 -06:00
core CLAUDE: Fix batting order recovery after inning changes 2025-11-28 23:38:54 -06:00
data CLAUDE: Refactor ManualOutcomeSubmission to use PlayOutcome enum + comprehensive documentation 2025-10-31 16:03:54 -05:00
database CLAUDE: Update documentation across codebase 2025-11-28 12:10:10 -06:00
middleware CLAUDE: Add rate limiting, pool monitoring, and exception infrastructure 2025-11-28 12:06:10 -06:00
models CLAUDE: Replace black and flake8 with ruff for formatting and linting 2025-11-20 15:33:21 -06:00
monitoring CLAUDE: Add rate limiting, pool monitoring, and exception infrastructure 2025-11-28 12:06:10 -06:00
services CLAUDE: Implement server-side OAuth flow with HttpOnly cookies 2025-11-26 22:16:30 -06:00
utils CLAUDE: Fix Safari/iPad auth failure on game detail page 2025-11-28 21:53:20 -06:00
websocket CLAUDE: Fix batter not advancing after plays 2025-11-28 22:38:10 -06:00
__init__.py CLAUDE: Complete Phase 1 backend infrastructure setup 2025-10-21 19:46:16 -05:00
config.py CLAUDE: Add rate limiting, pool monitoring, and exception infrastructure 2025-11-28 12:06:10 -06:00
main.py CLAUDE: Add Alembic migrations and database session injection 2025-11-28 12:09:09 -06:00