Commit Graph
82 Commits
Author SHA1 Message Date
6dda0edf17 Fix: 3D model loading for units/tiles + tile model server pipeline
- ModelCache: switch GLTFDocument.append_from_buffer (was append_from_file
  which returned ERR_BUSY/43); validate GLB magic bytes; explicit signal
  disconnect before queue_free to avoid freed-lambda errors
- ContentCache: add tile model fetch (content.tile_models), disk cache at
  user://content/tile_models.json, get_tile_model_url() API
- game_screen: _add_tile now loads tile CDN model via ModelCache when bound
- Server: ContentGetTileModelsHandler (content.tile_models msg), registered
  in ServiceRegistration; TileModelDto / GetTileModelsResponse added to
  ContentMessages

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>
2026-03-09 13:34:17 -04:00
dingo bb0f7dae91 Tile bindings added to admin portal, CDN improvements 2026-03-09 10:48:24 -04:00
4fa4c21b6e 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>
2026-03-09 09:33:40 -04:00
60697460cb Feat: scroll block over hand, camera follow, chat overlay, admin cleanup
Client (game_screen.gd):
- Scroll wheel no longer zooms camera when mouse is over the hand panel
- Clicking a friendly unit smoothly tweens camera pivot to that unit
  (EASE_OUT CUBIC, 0.4s) — respects Settings.camera_follow_unit toggle
- Chat overlay instantiated from game screen and removed on exit

Client (Settings.gd + SettingsScreen):
- Added camera_follow_unit bool (default: on) to gameplay settings section
- Persisted to user://settings.cfg under [gameplay]
- Toggle visible in Settings screen under new GAMEPLAY section

Server Admin (MatchmakingQueuePage):
- "Clear History" button deletes all non-Searching matchmaking entries

Server Admin (GameSessionsPage):
- Per-row "Abandon" button for Active/Initializing sessions
- "Abandon All Active" bulk button marks all live sessions as Abandoned
  with EndedAt=now and WinCondition="admin"

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>
2026-03-09 09:09:01 -04:00
bc65e8b9d4 Fix: add ExactSelf to TargetOwnership enum + resolve in AbilitySystem
`ExactSelf` was accepted by the admin builder dropdown but crashed on
deserialization because the TargetOwnership enum was missing the value.

- Added `ExactSelf` to `TargetOwnership` enum in Action.cs
- BuildCandidates treats ExactSelf like Self/Owner (actor's player pool)
- ResolveTargets post-filters to ctx.Source.InstanceId when ExactSelf

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>
2026-03-08 17:47:59 -04:00
3c16fcfce5 Fix: admin ability builder — ExactSelf ownership + target filter dropdown
TargetOwnerships: add "ExactSelf" so action target selectors can restrict to
the specific unit instance that owns the ability (rather than any allied unit).

Target Filter dropdown (new): exposes the TargetSelector.Filters[] field that
previously had no UI. Supports no-param filter types:
  • (none)
  • IsSelf            — any unit with the same card definition
  • IsExactSelf       — only this specific instance (InstanceId match)
  • IsAdjacentToSource

Filter compiles to Target.Filters[0] in the JSON and round-trips correctly
when loading existing ability JSON back into the builder.

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>
2026-03-08 17:05:46 -04:00
11ebdc40d7 Fix: abilitiesJson null crash, battlefield popup, ExactSelf ability filter
Client (game_screen.gd):
- Fix crash when clicking a unit with null abilitiesJson: server sends the key
  with a null value, so dict.get(key,default) returns null — guard both uses
  (_show_ability_panel and _on_hold_timer_fired) with explicit null check.
- Add double-click on battlefield units to open a full CardDetailPopup showing
  name, affinity, stats, and ability descriptions. Popup is instantiated once
  in _ready() and reused; aliases movementPoints/abilities keys as expected.

Server (Filters.cs / AbilitySystem.cs):
- IsSelf filter now matches by CardDefinitionId (definition-level: any copy of
  the same card). This is the appropriate semantic for "self" as a type scope.
- IsExactSelf filter added: matches by InstanceId (instance-level: only this
  specific unit on the battlefield). Use this to prevent duplicate-instance
  trigger bleed where two copies of a card both fire when only one acted.
- TriggerMatches now accepts the evaluating FieldCard and forwards its
  InstanceId to Own() for all ownership checks.
- Own() gains "ExactSelf" scope: fires only when occ.Data.SourceId matches the
  evaluating unit's InstanceId — eliminating the definition-level bleed bug.

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>
2026-03-08 16:28:06 -04:00
c82682f77e Fix: card play input bug, populate CardInstanceDto fields, genus/SP/ST/MP display
- Input bug: CardWidget only consumed mouse PRESS via accept_event(), not RELEASE.
  This caused _unhandled_input to fire _handle_board_click on release of a card
  click, hitting the tile physically behind the hand area in 3D — accidentally
  sending play_card to the wrong tile (Spirit/Ruin) or picking the first tile for
  Terramorpha. Fixed by tracking _press_was_on_board: board clicks only fire when
  the originating PRESS also reached _unhandled_input (i.e., was not consumed by
  a UI card widget).

- Server: added SpCost, StCost, Genus, MinChannelRange, MaxChannelRange,
  MinAttackRange, MaxAttackRange, CanMove, CanAttack, ExtraAttacksRemaining,
  CanBeAttacked, AbilitiesJson to CardInstanceDto and ToCardDto mapping.
  All fields were already on CardInstance; they were simply not exposed to clients.

- Client: build def dict in _make_hand_card with maxMp → movementPoints alias
  so CardWidget displays movement points correctly.

- Client: show MetaRow (genus + type) in compact hand card; only StatsGrid is
  hidden. HandArea / RightPanel height raised 190 → 220px for better visibility.

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>
2026-03-08 09:10:24 -04:00
0af6b61999 Fix action_log duplicate key: increment NextActionSequence before serializing
SaveStateAsync was serializing GameState BEFORE incrementing NextActionSequence,
so the written StateJson always had the pre-increment value. Every subsequent
request read the same NextActionSequence and computed the same SequenceNumber,
causing duplicate key violations on IX_action_logs_GameSessionId_SequenceNumber
even in purely sequential scenarios (e.g. P2 places then P1 places).

Fix: increment NextActionSequence first, then serialize, so the persisted JSON
always reflects the sequence number that was just consumed.

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>
2026-03-07 18:30:26 -05:00
ece3eaa3be Fix NATS serialization: use System.Text.Json for custom event types
NatsUtf8PrimitivesSerializer (the default) can only handle primitives and
strings, causing "Can't serialize GameStartedEvent" at runtime.

Add NatsJsonSerializer<T> implementing INatsSerialize<T>/INatsDeserialize<T>
using System.Text.Json, and pass it explicitly to PublishAsync/SubscribeAsync
in NatsEventBus so all custom NATS event payloads serialize as JSON.

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>
2026-03-07 14:15:45 -05:00
dc9b64dc6f Serialize concurrent session mutations with SELECT FOR UPDATE; board 9x9
- LoadActiveSessionAsync: begin explicit transaction + lock session row
  with SELECT FOR UPDATE so concurrent handlers for the same session
  queue up instead of racing
- SaveStateAsync: commit (and release) the transaction after EF SaveChanges
  fixes duplicate key on IX_action_logs_GameSessionId_SequenceNumber
  when both players act simultaneously (e.g. both placing ArchSpirits)
- GameRules: default board size 9x9 (was 8x8)

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>
2026-03-07 13:12:28 -05:00
30c7bef445 Add PlayerOneAccountId to GameStateDto; fix placement row detection
Client had no way to know if it was P1 or P2, so _valid_placement_tiles
always chose row bh-1. Now the DTO exposes playerOneAccountId so the
client can correctly pick row 0 (P1) or row bh-1 (P2).

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>
2026-03-07 11:26:56 -05:00
2c107e3851 DM shows player name; add party rename
- ChatGetChannelsHandler: for Direct channels, look up the other
  member's display name from identity DB and return it as the channel
  name (per-caller, no DB schema change)
- ChatDmOpenHandler: same — returns recipient display name in the DTO
  for both new and existing DM channels
- New ChatPartyRenameHandler (chat.party.rename): updates the party
  channel name, returns updated DTO
- Chat.gd: rename_party() calls the new handler and upserts locally
- chat_overlay.gd: "Rename" button in party action bar opens a dialog
  to set a new party name

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>
2026-03-06 22:36:58 -05:00
a482cc5319 Add Settings, Account, Bug Reports, and Leaderboard
Server:
- New SOR.Support project: SubmitBugReport, GetLeaderboard, GetAccountProfile handlers
- New SOR.Database support schema: BugReport + BugReportResponse entities + SupportDbContext
- EF migration: Migrations/Support/AddSupport
- Admin panel: Bug Reports list + detail pages with reply-to-submitter flow
- Admin NavMenu: Support section with Bug Reports link
- Reply creates chat.Notification (type "admin_response") for in-game mailbox

Client:
- Settings autoload (Settings.gd): music/sfx volume+mute, persisted to user://settings.cfg
- SettingsScreen: sliders + mute CheckButtons wired to Settings autoload
- AccountScreen: profile (display name, OP, rank score) + mailbox (admin_response notifications)
- LeaderboardScreen: paginated ranked player list, caller highlighted in blue
- BugReportDialog: category/title/description/steps form, submits via support.submit_bug_report
- MainScreen: new Leaderboard, Account, Settings, Report a Bug navigation buttons

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>
2026-03-06 20:14:12 -05:00
9dadeda7c1 Add friends, DMs, presence, block, and party chat
- Fix social response key mismatch (incomingRequests, blocked)
- Fix DmOpenResponse to return full ChatChannelDto so client can
  add the channel without a separate fetch
- Add Party channel type to ChatChannelType enum
- Add PartyInviteHandler, PartyInviteRespondHandler, PartyLeaveHandler
  with IClientPush invite notification to the invitee
- Add party tab to chat overlay (action bar, messages, Leave button)
- Wire Invite to Party in both player and friend context menus
- Show accept/decline popup dialog on incoming party invite push

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>
2026-03-06 16:12:51 -05:00
dingo aa0c17490b Fix serializer changes and ignore local .dotnet cache 2026-03-05 22:47:08 -05:00
dingo 2cfcaf6853 Add global/lobby auto-join and match chat lifecycle 2026-03-05 21:30:43 -05:00
dingo 62763859a3 CDN 2026-03-03 18:39:20 -05:00
dingo ba04911acc CDN flag change 2026-03-03 17:05:27 -05:00
dingo 551610a8ee CDN Browser changes 2026-03-03 11:49:45 -05:00
dingo 8bf7da1092 CDN browser in Admin Portal 2026-03-03 11:26:59 -05:00
dingo d3411e54b5 Remove Starter Deck 2026-03-03 07:18:00 -05:00
dingo a3bcc71082 Client changes, admin portal, collection fixes. 2026-03-02 10:49:49 -05:00
dingo ffe1ec5094 Fixing Deck rules on server.... 2026-03-02 08:45:25 -05:00
dingo d3e39f9511 minor admin portal changes 2026-03-02 08:37:51 -05:00
cec6773a12 fix: NatsMessageRpcResponder SerializePayload must use CamelCase JSON options
SerializePayload was using default JsonSerializerOptions, so record properties
like GetStarterDecksResponse.Decks were serialized as "Decks" (PascalCase).
That JsonElement travels through the NATS reply back to the gateway, which
forwards it verbatim. The client reads p.get("decks", []) and finds nothing
→ "No starter decks available."

Fix: use the same PropertyNamingPolicy=CamelCase that SystemTextJsonSerializer
uses, so all payload field names arrive at the client in camelCase.

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>
2026-03-01 22:28:33 -05:00
5d4f0c3745 admin: fix CardEditor AddAsset/AddAnimation + Remove EF bugs
Same two classes of bug as PrebuiltDeckEditor:

1. AddAsset / AddAnimation — ValueGeneratedOnAdd sentinel mismatch:
   New entities with Id = Guid.NewGuid() added to a tracked ObservableHashSet
   are classified as Modified by EF, causing a 0-rows-affected UPDATE.
   Fix: Db.Entry(entry).State = EntityState.Added when !_isNew.

2. RemoveAsset / RemoveAnimation — redundant Db.Remove on detached entity:
   Id != Guid.Empty is always true (Guid.NewGuid() default). Removing an
   Added entity from the collection detaches it; calling Db.Remove re-attaches
   it as Deleted → DELETE on a non-existent row → DbUpdateConcurrencyException.
   Fix: removed the explicit Db.Remove calls; EF handles orphan deletion.

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>
2026-03-01 11:14:06 -05:00
9c4a1db8b1 admin: fix AddCard inserting 0 rows (EF ValueGeneratedOnAdd sentinel mismatch)
PrebuiltDeckCard.Id is configured as ValueGeneratedOnAdd; EF's sentinel for
Guid is Guid.Empty. When a new entity with Id = Guid.NewGuid() is added to
the tracked ObservableHashSet (_deck.Cards), EF interprets the non-empty Guid
as an existing row and tracks the entity as Modified instead of Added.
SaveChangesAsync then issues an UPDATE that finds 0 rows →
DbUpdateConcurrencyException.

Fix: call Db.Entry(entry).State = EntityState.Added immediately after adding
to the collection for existing (tracked) decks. For new decks the plain
List<> is not yet tracked so graph traversal in SaveAsync handles it.

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>
2026-03-01 11:11:27 -05:00
0607f02e93 admin: fix RemoveCard DbUpdateConcurrencyException on save
PrebuiltDeckCard.Id is always a NewGuid() (never Guid.Empty), so the
old `if (entry.Id != Guid.Empty) Db.PrebuiltDeckCards.Remove(entry)`
guard was always true. When a user added a card then removed it before
saving, EF detached the Added entity from the collection, then the
explicit Db.Remove re-attached it as Deleted. SaveChangesAsync then
tried to DELETE a row that was never inserted → DbUpdateConcurrencyException.

Drop the explicit remove call entirely. EF Core automatically marks
Unchanged orphans as Deleted when removed from a required relationship
collection, and simply detaches Added orphans — both are the correct
outcomes without any extra Db.Remove.

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>
2026-03-01 09:22:38 -05:00
dingo 59af920479 admin fixes 2026-03-01 08:09:49 -05:00
773fc6a349 admin/client: fix deck editor concurrency, live search, iOS autofill
PrebuiltDeckEditor.razor:
- Add Db.ChangeTracker.Clear() at OnInitializedAsync start to prevent
  stale Deleted/Modified entities from prior circuit pages causing
  DbUpdateConcurrencyException on save
- Replace @bind + button-only search with @oninput + 300ms debounce for
  both card and arch-spirit search inputs (results appear as you type;
  search button retained as manual fallback)
- Clearing the input immediately clears previous results

LoginScreen.tscn:
- Set virtual_keyboard_type = 5 (EMAIL_ADDRESS) on EmailInput and
  RegEmailInput so Godot's experimental virtual keyboard creates
  <input type="email"> instead of type="text" on mobile/web

export_presets.cfg:
- Extend head_include with a MutationObserver that watches for virtual
  keyboard INPUT elements and sets autocomplete="username" on email
  inputs and autocomplete="current-password" on password inputs,
  enabling iOS Face ID / Touch ID password vault autofill

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>
2026-02-28 23:00:13 -05:00
10c0593120 Single-session login policy + fix deck editor card search
Auth (single-session policy):
- AuthGrpcHandler.Login now calls RevokeAllSessionsForUserAsync before
  CreateSessionAsync. When a user logs in on a new device, all existing
  sessions are revoked in Redis (token keys deleted) and marked RevokedAt
  in Postgres. The old device will fail auth.hello on its next reconnect
  and return to the login screen automatically.

Admin (PrebuiltDeckEditor):
- SearchCardsAsync and SearchArchSpiritsAsync were using .Contains() which
  compiles to a case-sensitive PostgreSQL LIKE. Changed to EF.Functions.ILike
  so card names can be found regardless of capitalisation.

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>
2026-02-28 21:52:36 -05:00
502f1c16f6 Fix content.sync cartesian explosion and gateway timeout
- Add .AsSplitQuery() to ContentSyncHandler to prevent the cartesian
  product join caused by two collection .Include()s (Assets + AnimationBindings).
  EF was executing a single JOIN that multiplied result rows per card,
  causing replies to arrive 10+ seconds late and gateway timeouts.
- Bump Gateway__RemoteDispatchTimeoutMs from 10000 → 15000ms in configmap
  to give worker pods headroom on cold starts (EF model compilation +
  first DB query can take 3-5 seconds on a fresh pod).

NOTE: restart gateway pods after deploying to pick up the new timeout value:
  kubectl rollout restart deployment/sor-gateway -n stone-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>
2026-02-28 19:05:32 -05:00
dingo 76e50b5be9 NATS 2026-02-28 17:02:43 -05:00
dingo d1a555cce7 Changing packet dispatch, packets dying on gateway and not being relayed, missed a nullable 2026-02-28 15:14:36 -05:00
dingo 285d67374e Changing packet dispatch, packets dying on gateway and not being relayed 2026-02-28 15:10:49 -05:00
fd8fe950f8 Add Grant Card section to AccountDetail admin page
Search card definitions by name (ILike, top 20), click a row to select,
set quantity (1–99), toggle Tradeable + Foil, then Grant.
Creates PlayerCard rows directly in CollectionDbContext.
Injects CatalogDbContext + CollectionDbContext (both already registered).

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>
2026-02-28 13:45:37 -05:00
a24e3ea17c Add Account Properties card to AccountDetail admin page
Shows all key-value properties for an account in a table with
inline editing (pencil → edit field → save/cancel) and delete per row.
Add-new form below the table: key + value → Add button.
Duplicate-key guard prevents adding an existing key; existing entries
must be edited rather than added again.

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>
2026-02-28 13:24:29 -05:00
bdd6e59dfe Add starter deck flow, admin force-logout + rename, shop flag
Auth chain:
- auth.proto: add needs_starter_deck to Login/Register/ValidateToken responses
- auth.proto: add RevokeAllSessions RPC
- AuthGrpcHandler: populate NeedsStarterDeck from Account.StarterDeckSelectedAt
- AuthGrpcHandler: track tokens in UserSessions Redis SET on create/logout
- AuthGrpcHandler: implement RevokeAllSessions (Redis + Postgres)
- IGatewayAuthValidator / GatewayAuthValidator: thread NeedsStarterDeck through tuples
- ConnectionLoop: include needsStarterDeck in auth ack payload

Client:
- Auth.gd: store needs_starter_deck from auth reply; clear on logout
- login_screen.gd: route to StarterDeckScreen when needs_starter_deck = true
- scenes/starter_deck/: new StarterDeckScreen (fetch decks → pick → confirm → InitScreen)

Admin panel:
- AccountDetail.razor: Force Logout All Sessions card (Redis + Postgres revoke)
- AccountDetail.razor: Change Display Name form with uniqueness check
- SOR.Admin: add StackExchange.Redis package + DI registration
- PrebuiltDeckEditor.razor: split into IsStarterDeck + IsAvailableInShop checkboxes
- PrebuiltDeck.cs: add IsAvailableInShop field
- Migration: AddPrebuiltDeckShopFlag

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>
2026-02-28 13:08:08 -05:00
dingo 4be98fd8a0 Register auth data protection services 2026-02-28 11:01:31 -05:00
dingo aed40398b8 Bind public gateway port explicitly 2026-02-28 10:46:48 -05:00
dingo 13402c8551 Split auth gRPC onto internal listener 2026-02-28 10:38:18 -05:00
dingo 9a3eef7d20 gRPC TSing, reverting 2026-02-28 10:14:17 -05:00
dingo d2398af01c gRPC Additional Logging 2026-02-28 09:13:14 -05:00
dingo 62c52dd589 Revert 2026-02-28 09:03:30 -05:00
dingo ec0dcf338a Working on gRPC issue 2026-02-28 08:46:47 -05:00
dingo 0945208e48 gRPC Error 2026-02-28 08:40:05 -05:00
3aaabe75e3 Godot client networking + auth + login/main screens; fix admin hamburger
Server:
- ConnectionLoop: accept auth.login and auth.register as valid first messages
  (not just auth.hello); all ack payloads now include sessionToken for client
  persistence
- IGatewayAuthValidator: add LoginAsync and RegisterAsync
- GatewayAuthValidator: implement both via auth gRPC; fetch displayName from
  ValidateAsync after login/register succeeds
- Admin hamburger: custom .sor-admin-hamburger CSS (hardcoded white, no Bootstrap
  btn-link theme fighting); topbar z-index 1050 with position:sticky

Client (Godot 4.5, GDScript):
- autoloads/Network.gd: WebSocketPeer state machine (CONNECTING / CONNECTED /
  RECONNECTING), exponential backoff (1→30s), app-level keepalive ping every
  30s of idle, 30s ping timeout → reconnect, request/reply correlation by
  sequence number, debug_log_packets export flag for full packet dumps
- autoloads/Auth.gd: drives auth.hello / auth.login / auth.register as first
  WS message; persists sessionToken + userId + displayName to user://auth.cfg;
  auto-resumes saved session on reconnect; auth_success / auth_failed signals
- scenes/login/LoginScreen.tscn + login_screen.gd: Login + Register tabs,
  touch-friendly inputs (44px height), status label, Enter key submits, handles
  reconnect/resume states
- scenes/main/MainScreen.tscn + main_screen.gd: top bar with live connection
  dot, welcome label, placeholder nav buttons, sign-out, redirects to login on
  session expiry
- project.godot: Network and Auth autoloads registered; LoginScreen as main scene

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>
2026-02-27 20:48:53 -05:00
fb889ae8d7 Admin portal: mobile-friendly layout + nav drawer
app.css:
- New .sor-admin-outer wrapper (flex column, 100vh) so topbar + shell stack vertically
- .sor-admin-shell changed from height:100vh to flex:1 (fills remaining space)
- .sor-admin-topbar: hidden on desktop (display:none), shown at <992px as a 56px
  dark strip hosting the hamburger button and brand
- .sor-admin-sidebar: at <992px becomes a fixed overlay drawer (position:fixed,
  translateX(-100%)), slides in with .open class (0.25s ease-in-out transition)
- .sor-admin-backdrop: full-screen dim overlay (z-index 1040), hidden on desktop
- Minor: tighter container-fluid padding on small screens

MainLayout.razor:
- Wrapped authorized shell in .sor-admin-outer
- Added mobile topbar with hamburger (<i class="bi bi-list">) + brand
- Added backdrop div rendered conditionally when _drawerOpen
- Drawer state (_drawerOpen bool) managed here; toggled by hamburger, closed
  by backdrop click and automatically on any NavigationManager.LocationChanged
- Implements IDisposable to unsubscribe LocationChanged event handler
- Passes IsOpen parameter to NavMenu

NavMenu.razor:
- Added [Parameter] public bool IsOpen { get; set; }
- Applies "open" CSS class to <nav> when IsOpen is true

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>
2026-02-27 19:04:25 -05:00
32fc0b80ed Extend booster pack slot system — 4 slot kinds + handler support
BoosterPackEditor.razor:
- New SlotKind enum: Rarity, Specific, RandomFromSet, Random
- Pack-level default CardSet picker (maps to BoosterPack.CardSetId)
- Per-slot UI: Rarity (rarity + set override), Specific (card GUID + name resolve),
  RandomFromSet (set dropdown), Random (any published card)
- Backwards-compatible SlotsJson parse (detects legacy lowercase format)
- Slot legend card explaining all 4 types

BazaarBuyBoosterPackHandler.cs:
- Replace old SlotEntry record with JsonElement-based parsing
- Rarity slots: slot-level SetId → pack.CardSetId → all sets
- Specific slots: guarantee exact CardDefinitionId (Count ≥ 1 for duplicates)
- RandomFromSet slots: random from a given set, no rarity filter
- Random slots: random from all published cards
- Refund OriginPoints on bad SlotsJson before returning error
- Extract CreateAndTrackCard helper to deduplicate PlayerCard creation

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>
2026-02-27 13:56:24 -05:00