Feat: game explorer, action log result capture, session purge
DB / Server:
- Added ResultJson (jsonb, nullable) to GameActionLog entity + EF migration
- Updated SaveStateAsync to accept resultJson (optional, default null)
- All 11 action handlers now serialize GameEngine.ToDto() result into the log
Admin — GameSessionsPage:
- Session IDs are now clickable links → /game/sessions/{id}
- "Abandon All Active" bulk button (previous)
- "Purge All" button (SuperAdmin only, JS confirm) — hard-deletes all sessions
and action logs via cascade
Admin — GameSessionDetailPage (/game/sessions/{id}):
- Session header: status badge, P1/P2 display names (click to copy GUID)
- Info cards: Player 1, Player 2, Created timestamp, Duration/WinCondition
- Action log table: seq#, time, actor name (click to copy GUID), action type
- Expandable Payload (JSON) and Result (JSON) per row
- Actor display names resolved from SorIdentityDbContext
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -22,6 +22,9 @@ public sealed class GameActionLog
|
||||
/// <summary>JSONB: serialized action request payload.</summary>
|
||||
public string? PayloadJson { get; set; }
|
||||
|
||||
/// <summary>JSONB: serialized server response / result state sent back to the actor.</summary>
|
||||
public string? ResultJson { get; set; }
|
||||
|
||||
/// <summary>1-based sequence number within the game session.</summary>
|
||||
public int SequenceNumber { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user