Skip to content

Add player splits feature (#93)#159

Open
grovecj wants to merge 1 commit intomainfrom
feature/player-splits-93
Open

Add player splits feature (#93)#159
grovecj wants to merge 1 commit intomainfrom
feature/player-splits-93

Conversation

@grovecj
Copy link
Owner

@grovecj grovecj commented Feb 1, 2026

Summary

Display home/away, vs LHP/RHP, and situational performance splits on the player detail page.

Backend Changes

  • Add BattingSplitDto and PitchingSplitDto DTOs
  • Add /api/players/{id}/batting-splits and /api/players/{id}/pitching-splits endpoints
  • Add service methods using existing split repositories

Frontend Changes

  • Add TypeScript types for splits
  • Create PlayerSplits component with tabbed split categories
  • Add season selector for historical splits
  • Integrate into player detail page between stats and game log

Split Categories

Category Batters Pitchers
Location Home vs Away Home vs Away
Handedness vs LHP vs RHP vs LHB vs RHB
Season Half First Half vs Second Half First Half vs Second Half
Situation Runners On, RISP, Bases Empty Runners On, RISP, Bases Empty

Batting Split Table

Shows: G, PA, AB, H, HR, RBI, AVG, OBP, SLG, OPS

Pitching Split Table

Shows: G, IP, W, L, ERA, WHIP, K, BB, K/9

Test plan

  • All 119 backend tests pass
  • All 28 frontend tests pass
  • Frontend builds successfully
  • Verify splits display when data is populated

Closes #93

🤖 Generated with Claude Code

Display home/away, vs LHP/RHP, and situational performance splits
on the player detail page.

Backend:
- Add BattingSplitDto and PitchingSplitDto
- Add controller endpoints for batting and pitching splits
- Add service methods using existing split repositories

Frontend:
- Add TypeScript types for BattingSplit and PitchingSplit
- Create PlayerSplits component with tabbed categories
- Display splits for: Home/Away, vs Handedness, Season Half, Situation
- Add season selector for viewing different years
- Show appropriate splits based on player position type (pitcher vs hitter)

Split Categories:
- Location: Home vs Away
- Handedness: vs LHP/RHP (batters), vs LHB/RHB (pitchers)
- Season Half: First Half vs Second Half
- Situation: Runners On, RISP, Bases Empty

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Player Splits - Home/Away, vs LHP/RHP Performance Breakdowns

1 participant