- Extend Game entity with GameType, Status, StartedAt, CompletedAt, RowVersion
- Add GameConfiguration with RowVersion for optimistic concurrency
- Create IGamePersistenceService interface
- Implement GamePersistenceService with CRUD operations
- Create GameStateSerializationDto for JSON serialization
- Extend GameEffects with full persistence lifecycle:
- HandleStartGame: Creates game in DB
- HandleEndGame: Updates status to Completed/Aborted
- HandleLoadActiveGame: Recovery from page reload
- HandleRecordThrow: Debounced save (500ms)
- HandleSaveGameState: Explicit save with concurrency check
- Add migration ExtendGameEntity
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Scoped services can't be resolved from singleton (GameDefinitionRegistry).
Logic services are stateless, so transient is appropriate.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- TrainingGameDefinition with game type metadata
- TrainingGameModel + TrainingPlayerStats for stats tracking
- TrainingGameLogicService implementing game logic
- TrainingSetup.razor for config (ThrowMode, ThrowsPerRound, ParticipantsMode)
- TrainingBoard.razor showing player stats table with totals/averages
- Game type registration in Program.cs
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- IGameDefinition interface in Domain
- GameProgress.cs with throw state records
- IGameLogicService interface
- GameDefinitionRegistry for polymorphic game types
- GameModelFactory for JSON serialization
- DI registration extensions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ITriggerRepository interface + TriggerRepository implementation
- ITriggerService interface + TriggerService implementation
- TriggerDto, ExpenseTriggerLinkDto, FireTriggerDto
- FireTriggerAsync creates PersonExpenses with multiplier
- DI registration for both services
- Fix test mock for IClubRepository
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- DashboardDto, IDashboardService, DashboardService
- Summary cards: members, guests, days, open expenses
- Recent days list with navigation
- Top penalty recipients list
- Home redirects to /dashboard
- Updated HomePageTests
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary of all fixes
3 files changed:
1. src/Koogle.Application/Services/UserService.cs:140-171
- GetByIdentityUserIdAsync now includes .Include(p => p.Clubs) and maps ClubMemberships
2. src/Koogle.Web/Store/AuthState/AuthEffects.cs:53-73
- Merges club-specific roles from ClubMemberships into AuthState roles
3. src/Koogle.Infrastructure/Security/ClubRoleRequirement.cs:17-114
- Changed ClubRoleHandler to extend AuthorizationHandler<ClubRoleRequirement> (no resource)
- Reads current_club_id from claims to determine club context
- Added ClubRoleResourceHandler for resource-based auth (explicit clubId)
4. src/Koogle.Infrastructure/DependencyInjection.cs:72
- Registered ClubRoleResourceHandler
The [Authorize(Policy = "ClubViewer")] attribute now uses current_club_id claim set during login to check club roles.