Add Stadium Progress system and themed loading spinners

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>
This commit is contained in:
Trey t
2026-01-08 20:20:03 -06:00
parent 2281440bf8
commit 92d808caf5
55 changed files with 14348 additions and 61 deletions

View File

@@ -21,7 +21,8 @@ struct ScenarioAPlannerSwiftTests {
id: UUID = UUID(),
city: String,
latitude: Double,
longitude: Double
longitude: Double,
sport: Sport = .mlb
) -> Stadium {
Stadium(
id: id,
@@ -30,7 +31,8 @@ struct ScenarioAPlannerSwiftTests {
state: "ST",
latitude: latitude,
longitude: longitude,
capacity: 40000
capacity: 40000,
sport: sport
)
}

View File

@@ -22,7 +22,8 @@ struct ScenarioBPlannerTests {
city: String,
state: String,
latitude: Double,
longitude: Double
longitude: Double,
sport: Sport = .mlb
) -> Stadium {
Stadium(
id: id,
@@ -31,7 +32,8 @@ struct ScenarioBPlannerTests {
state: state,
latitude: latitude,
longitude: longitude,
capacity: 40000
capacity: 40000,
sport: sport
)
}

View File

@@ -23,7 +23,8 @@ struct ScenarioCPlannerTests {
city: String,
state: String,
latitude: Double,
longitude: Double
longitude: Double,
sport: Sport = .mlb
) -> Stadium {
Stadium(
id: id,
@@ -32,7 +33,8 @@ struct ScenarioCPlannerTests {
state: state,
latitude: latitude,
longitude: longitude,
capacity: 40000
capacity: 40000,
sport: sport
)
}

View File

@@ -53,7 +53,8 @@ struct DayCardTests {
state: "ST",
latitude: 40.0,
longitude: -100.0,
capacity: 40000
capacity: 40000,
sport: game.sport
)
return RichGame(game: game, homeTeam: homeTeam, awayTeam: awayTeam, stadium: stadium)
}
@@ -350,7 +351,7 @@ struct DayCardTests {
/// Tests for handling duplicate game IDs without crashing (regression test for fatal error)
struct DuplicateGameIdTests {
private func makeStadium() -> Stadium {
private func makeStadium(sport: Sport = .mlb) -> Stadium {
Stadium(
id: UUID(),
name: "Test Stadium",
@@ -358,7 +359,8 @@ struct DuplicateGameIdTests {
state: "TS",
latitude: 40.0,
longitude: -100.0,
capacity: 40000
capacity: 40000,
sport: sport
)
}