Added 7 TDD tests for Feature 2 (geographic efficiency / anti-backtracking):
- Route must start at specified start city
- Route must end at specified end city
- Intermediate games in wrong order rejected or reordered
- Multiple route options - least backtracking preferred
- Minor backtracking within tolerance is acceptable
- Excessive backtracking beyond destination rejected
- Correct directional classification for north-to-south route
All tests pass - existing ScenarioCPlanner implementation already
validates monotonic progress and prevents excessive backtracking.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added 5 TDD tests for Feature 1 (travel corridor game inclusion):
- Direct route with games along path includes all corridor games
- Game slightly off corridor within tolerance included
- Game far from corridor excluded
- Multiple games mixed filters correctly (excludes south/beyond-end games)
- No games along corridor returns empty route or failure
Tests validate that Scenario C planning correctly:
- Includes games within ~50-100 miles of direct travel corridor
- Excludes games in wrong direction (south when traveling north)
- Excludes games beyond the destination city
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Tests same-day games in close cities (both included - FAILING)
- Tests same-day games in distant cities (only one per route - PASSING)
- Tests same-day games on opposite coasts (only one per route - PASSING)
- Tests three same-day games (picks feasible combinations - FAILING)
2 of 4 tests failing - need to implement feasible same-day game logic.
- Tests game at range start in different timezone (included)
- Tests game before range start in different timezone (excluded)
- Tests game at range end in different timezone (included)
- Tests game after range end in different timezone (excluded)
All tests pass - DateInterval.contains() correctly handles timezone boundaries.
Added 6 diversity tests to validate multi-dimensional route variety.
All tests pass, proving selectDiverseRoutes() produces varied results.
Tests validate:
- Game count diversity (2-3 games to 5+ games)
- City count diversity (2-3 cities to 4+ cities)
- Mileage diversity (short <500mi, medium 500-1000mi, long 1000+mi)
- Duration diversity (2-3 days to 5+ days)
- Bucket coverage (≥3 different game count buckets)
- No duplicate routes (unique game combinations)
Helper generateDiverseDataset() creates 50 games across 20 stadiums
over 14 days for realistic diversity testing.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added 4 performance tests with 1K, 5K, 10K games to validate DAG
algorithm scalability. Tests currently failing (RED phase).
Tests:
- 1K games: <2s expected
- 5K games: <10s expected
- 10K games: <30s expected
- 10K games: memory stability
Helper generateLargeDataset() creates realistic test data with
distributed stadiums and games across time spans.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add 7 canTransition boundary tests:
- Same stadium same day 4 hours apart is feasible
- Different stadium 1000 miles apart same day is infeasible
- Different stadium 380 miles apart 2 days apart is feasible
- Different stadium 100 miles apart 4 hours available is feasible
- Different stadium 100 miles apart 1 hour available is infeasible
- Game end buffer (3 hour) validation
- Arrival buffer (1 hour) validation
Also removes broken DayCardTests that referenced types removed in
previous refactor (DayCard, DayConflictInfo).
Total: 17 GameDAGRouter edge case tests all passing.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add 10 TDD tests for GameDAGRouter covering:
- Empty games array returns empty routes
- Single game returns single-game route
- Single game with non-matching anchor returns empty
- Two chronological feasible games returns combined route
- Two games too far apart same day returns separate routes
- Two games reverse chronological returns separate routes
- Three games with only feasible pairs returns valid combinations
- Anchor filtering excludes routes missing anchors
- Repeat cities OFF excludes same city twice
- Repeat cities ON allows same city twice
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Stadium Progress & Achievements:
- Add StadiumVisit and Achievement SwiftData models
- Create Progress tab with interactive map view
- Implement photo-based visit import with GPS/date matching
- Add achievement badges (count-based, regional, journey)
- Create shareable progress cards for social media
- Add canonical data infrastructure (stadium identities, team aliases)
- Implement score resolution from free APIs (MLB, NBA, NHL stats)
UI Improvements:
- Add ThemedSpinner and ThemedSpinnerCompact components
- Replace all ProgressView() with themed spinners throughout app
- Fix sport selection state not persisting when navigating away
Bug Fixes:
- Fix Coast to Coast trips showing only 1 city (validation issue)
- Fix stadium progress showing 0/0 (filtering issue)
- Remove "Stadium Quest" title from progress view
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Travel segment architecture:
- Remove departureTime/arrivalTime from TravelSegment (location-based, not date-based)
- Fix travel sections appearing after destination instead of between cities
- Fix missing travel segments when revisiting same city (consecutive grouping)
- Remove unwanted rest day at end of trip
Planning engine fixes:
- All three planners now group only consecutive games at same stadium
- Visiting A → B → A creates 3 stops with proper travel between
UI simplification:
- Remove redundant sort options (mostDriving/leastDriving, mostCities/leastCities)
- Remove unused "Find Other Sports Along Route" toggle (was dead code)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace O(2^n) GeographicRouteExplorer with O(n) GameDAGRouter using DAG + beam search
- Add geographic diversity to route selection (returns routes from distinct regions)
- Add trip options selector UI (TripOptionsView, TripOptionCard) to choose between routes
- Simplify itinerary display: separate games and travel segments by date
- Remove complex ItineraryDay bundling, query games/travel directly per day
- Update ScenarioA/B/C planners to use GameDAGRouter
- Add new test suites for planners and travel estimator
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Three-scenario planning engine (A: date range, B: selected games, C: directional routes)
- GeographicRouteExplorer with anchor game support for route exploration
- Shared ItineraryBuilder for travel segment calculation
- TravelEstimator for driving time/distance estimation
- SwiftUI views for trip creation and detail display
- CloudKit integration for schedule data
- Python scraping scripts for sports schedules
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>