Wire HexSides through custom lobby; fix boardTemplateIdOverride empty-string crash

Server:
- CustomRulesOverride: add HexSides (int?) field
- CustomLobby entity: add HexSidesOverride (int?) column
- GameUpdateLobbyRulesHandler: save HexSidesOverride, include HexSides in
  effective rules preview
- GameLobbyReadyHandler: set rules.HexSides from lobby.HexSidesOverride on
  game start
- GameSavePresetHandler: capture BoardShape + HexSides in saved presets
- Migration 20260401222603_AddCustomLobbyHexSides: adds HexSidesOverride to
  custom_lobbies; applied to pg-forge-01 via dotnet ef database update

Client:
- rules_editor_dialog: send null (not "") for boardTemplateIdOverride when no
  template selected — empty string crashed Guid? deserialisation on the server

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:
dingo
2026-04-01 18:28:08 -04:00
co-authored by Claude Happy
parent aa76ac9994
commit 97e7698000
9 changed files with 671 additions and 10 deletions
@@ -32,16 +32,14 @@ namespace SOR.Database.Migrations.Game
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("GridType")
.IsRequired()
.HasColumnType("text");
b.Property<int>("Height")
.HasColumnType("integer");
b.Property<string>("GridType")
.IsRequired()
.HasDefaultValue("Square")
.HasColumnType("text");
b.Property<int>("HexSides")
.HasDefaultValue(0)
.HasColumnType("integer");
b.Property<bool>("IsAvailableForCustom")
@@ -143,6 +141,9 @@ namespace SOR.Database.Migrations.Game
b.Property<int?>("HandSizeCapOverride")
.HasColumnType("integer");
b.Property<int?>("HexSidesOverride")
.HasColumnType("integer");
b.Property<Guid>("HostAccountId")
.HasColumnType("uuid");
@@ -292,14 +293,12 @@ namespace SOR.Database.Migrations.Game
b.Property<string>("GridType")
.IsRequired()
.HasDefaultValue("Square")
.HasColumnType("text");
b.Property<int>("HandSizeCap")
.HasColumnType("integer");
b.Property<int>("HexSides")
.HasDefaultValue(0)
.HasColumnType("integer");
b.Property<bool>("IsCustomDefault")