- Chat.gd autoload: data layer for channels, messages, social graph,
presence, and notifications; wires to Network/Auth singletons
- ChatOverlay.tscn + chat_overlay.gd: CanvasLayer (layer=100) that
persists across all scenes; bubble toggle at bottom-right corner
- Six tabs: Friends, Presence, Global, Lobby, Game, DMs
- Message rows show [HH:MM] [source] Name: text with color-coded
source badges (global/lobby/game/private/party/system)
- Friends list: online/offline sections, right-click context menu
(Private Message, Set Nickname, Block, Remove Friend)
- Player name click: Add Friend, Invite to Party (stub), Mute/Unmute,
Hi Scores (disabled placeholder)
- Presence tab: own status selector (Online/Away/Offline) + friends
presence overview with status dots
- DMs tab: conversation sidebar + message pane, input bar shown when
a conversation is selected
- Unread notification badge on chat bubble
- Per-session nickname overrides and muting
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>
card_widget.gd uses @onready vars which are null until _ready() fires.
_ready() only fires after add_child(), so both cards_view.gd and decks_view.gd
must call add_child(widget) before widget.setup().
login_screen.gd called change_scene_to_file() synchronously from _ready(),
causing "parent busy" crash. Deferred with call_deferred().
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>
Replace placeholder Fire/Water/Earth/Air/Lightning/Dark/Light affinities
with the actual enum values: Void, Aether, Lake, Hill, Forest, Field (basics)
plus their non-basic combos (Ocean, Island, Marsh, Swamp, Mountain, Steppe,
Fort, Plains, Grove, Jungle, PerfectAether, PureVoid).
- Rename 7 wrong SVG icons → 6 correct ones (Void/Aether/Lake/Hill/Forest/Field)
- card_widget.gd: rewrite AFFINITY_BORDER, AFFINITY_BG for all 18 card affinities;
add static affinity_icon() helper that maps non-basics to their primary basic icon
- card_detail_popup.gd: use affinity_icon() instead of direct dict lookup
- cars_view.gd: affinity filter now lists all 18 card-valid affinities
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>
Remember Me (login screen):
- AES-256-CBC encrypted credential storage in user://creds.dat
- Key XOR-obfuscated across two halves; random IV stored with ciphertext
- Checkbox pre-fills email/password on next launch; unchecking clears saved creds
SVG affinity icons (web-compatible):
- Replace emoji art symbols (🔥💧⛰💨⚡✦★) with SVG TextureRect in CardWidget
- 7 new icons/affinity_*.svg — monochrome white, modulate-tinted at runtime
- ArtSymbol node changed from Label to TextureRect (stretch_mode = keep-aspect-centred)
Card detail popup (collection screen):
- Tap any card in Cards tab to see full stats + abilities overlay
- CardDetailPopup added to viewport root (avoids VBoxContainer layout conflict)
- Shows: name, affinity icon, foil badge, type/affinity/rarity, all 6 stats,
and parsed ability list with names + descriptions
- Dismiss by tapping ✕ or the dim background overlay
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>
logout() now calls Network.force_reconnect() to tear down the existing Phase-5
connection; the next auth.login / auth.register is then the very first message
on the new connection, which is the only point where ConnectionLoop handles auth.
Also adds Network.force_reconnect() public method.
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>
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>
Godot discards buffered data packets when the close frame arrives, so the
JSON error sent by RejectAsync is never received. Map known server close
reasons (auth_failed, auth_required) from the close frame's reason field
to AUTH_FAILED / AUTH_REQUIRED so Auth.gd's logout+navigate logic fires
correctly instead of treating every rejection as a transient DISCONNECTED.
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>
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>
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>
When auth.hello is rejected (session expired/revoked), Auth.gd now calls
logout() to wipe all auth state (including auth.cfg) and drives the scene
change to LoginScreen directly, instead of relying on each scene's own
auth_failed handler.
This covers all screens (main, collection, etc.) without each needing a
handler, and eliminates the race where the auth.hello reply arrived as
DISCONNECTED (STATE_CLOSING path, token kept) → reconnect → resend token.
main_screen.gd no longer subscribes to auth_failed; session expiry redirect
is fully owned by Auth.gd.
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>
Network.gd — drain packets before handling close (main bug fix):
When the server rejects auth.hello it sends an error frame then closes
the connection. Godot's WebSocketPeer.poll() can transition directly to
STATE_CLOSED while the error packet sits unread in the buffer. The old
code returned early on STATE_CLOSED without calling _poll_packets(), so
_on_ws_closed() fired DISCONNECTED for the pending auth.hello instead of
the real AUTH_FAILED. Auth kept the session token and retried forever.
Fix: drain any buffered packets before _on_ws_closed().
Network.gd — fail request() immediately when not connected:
Previously request() silently dropped the send but left a dangling
pending entry that was never resolved until the next disconnect. Now
on_error("DISCONNECTED") is called immediately, giving the caller
consistent feedback and keeping _pending clean.
main_screen.gd — stay on screen for DISCONNECTED auth errors:
A transient network drop during auth.hello was sending the user back
to the login screen unnecessarily. Only navigate to login when the
session is explicitly rejected (AUTH_FAILED, ACCOUNT_LOCKED, etc.).
The "● Reconnecting…" status label already handles the transient case.
login_screen.gd — add missing friendly error translations:
INVALID_PASSWORD / USER_NOT_FOUND → "Wrong email or password."
DISPLAY_NAME_TAKEN, ACCOUNT_LOCKED, AUTH_REQUIRED,
AUTH_SERVICE_UNAVAILABLE all now map to clear human-readable strings
instead of falling through to the raw server message or error code.
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>
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>
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>
- Add [display] section to project.godot:
- 1280x720 base viewport (was unset → Godot default tiny resolution)
- stretch/mode = canvas_items: all UI + text scales proportionally
- stretch/aspect = expand: fills window, adds space on wider screens
- Add html/head_include script that runs on page load:
- Sets canvas touch-action to 'auto' (removes Godot's default 'none'
which blocked pinch-to-zoom on mobile)
- Patches viewport meta to allow user-scalable=yes, maximum-scale=5.0
so browser zoom works on both desktop and mobile
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>
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>
-max_payload is not a valid NATS CLI flag; it must be set in a config file.
- Add deploy/k8s/configmap-nats.yaml with nats.conf (jetstream, http_port,
max_payload=8 MB).
- Update deployment-nats.yaml to mount the ConfigMap at /etc/nats and
start NATS with -c /etc/nats/nats.conf instead of individual CLI flags.
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>
Godot's WebSocketPeer.inbound_buffer_size defaults to 65535 bytes (64 KB).
content.sync.ack for a full card catalog (200 cards with assets and animation
bindings) exceeds this, causing Godot to close the connection with code 1009
"Message too big" every time content.sync is called.
- Network.gd: set inbound_buffer_size = 4 MB before connect_to_url so the
client can receive large sync responses without dropping the connection.
- deployment-nats.yaml: raise NATS max_payload from 1 MB to 8 MB (-max_payload
8388608) so the content service can reply with large card batches through NATS
without hitting a publish-too-large error as the card catalog grows.
Note: NATS pod needs a rollout restart to apply the new max_payload arg:
kubectl rollout restart deployment/nats -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>
- 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>
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>
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>
- Auth.gd: discard saved sessions older than 30 days on load (saved_at timestamp)
- Auth.gd: auto-logout and return to login screen after 30 min disconnected
- Auth.gd: cancel auto-logout timer immediately on reconnect
- Auth.gd: emit session_expired signal for any listener that needs it
- Network.gd: enable debug_log_packets for easier debugging
- export_presets.cfg: updated to full Godot 4.5 web preset (variant/thread_support,
custom_template paths, PWA options) — fixes web CI build
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>