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>
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>
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>
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>
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>
- 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>
- Split into godot --import then godot --export-release to avoid the
race condition where _fs_changed fires before Web export platform
is fully registered (causes empty "configuration errors" list)
- Remove --path /project (WORKDIR is already /project; matches
barichello/godot-ci example usage)
- Add diagnostic RUN that prints the export_templates directory so
CI logs reveal missing templates immediately
- Expand fallback export_presets.cfg with all required Godot 4.5
Web preset fields (custom_template, variant/extensions_support)
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 4.5 web export requires renderer/rendering_method="gl_compatibility";
"compatibility" and "mobile" are both invalid for the Web platform.
- project.godot: switch renderer from "mobile" to "gl_compatibility",
update config/features to "GL Compatibility", add mobile override
- Dockerfile.web: fix sed to replace any renderer value with
"gl_compatibility" (handles forward_plus/mobile/any future value)
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>
CardsView and DecksView were incorrectly attached via script=ExtResource()
pointing at PackedScene resources. Godot requires instance=ExtResource()
for scene embedding — this caused a fatal load error at export time.
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>
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>