## Tile height variation (fix)
Tile tops now visibly vary (0.8–1.0) from a fixed bottom at world Y=0.
Previously the top was fixed and the variation was only visible underneath.
Heights are seeded by tile coordinate so they're deterministic per board.
Unit y_offsets and highlight positions update to match per-tile height.
## Stalagmite tile bottoms
Server: new TileBottomModel entity + migration (catalog.tile_bottom_models),
content.tile_bottoms handler returns all active CDN URLs.
Admin: "Tile Bottom Models" section in the Tile Model Manager page —
add/toggle active/delete entries with CDN picker.
Client: ContentCache fetches + disk-caches the URL pool; _try_load_tile_model
picks a random URL and attaches it flipped below the tile model as a
stalagmite using the existing _fit_model_to_tile scale logic.
## Live content refresh
ContentCache schedules start_sync() every 5 minutes after sync_complete so
card definitions, tile models, and bottom models are refreshed in the
background without restarting the client.
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>
Model facing: GLB models exported from Blender arrive in Godot facing +Z,
not -Z. Changed _facing_to_base_angle default case from 0 (north/-Z) to
PI (south/+Z). Explicit "north" case added. Updated admin dropdown label
from "Default (north)" to "Default (south / Blender GLB)" to match.
Stale game state: when matchmaking.match_found is received, clear Game.state
so the new GameScreen always calls send_ready() rather than rendering the
previous (ended) game's state. Fixes same-players-re-match ending up in
the already-completed session.
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:
- CardAnimationBinding.AnimationTrackName: nullable override for GLB track name
(blank = case-insensitive convention match; Idle/Attack/Damaged/Moving/Dying)
- CardAnimationBindingDto: includes AnimationTrackName in content sync
- CardEditor: GLB Track Name column in animation bindings table
- CdnBrowser: model-viewer animation list + playback (JS interop on load event)
- Migration: AddAnimationTrackName applied to production
Client:
- ContentCache.get_anim_track(): resolves GLB track name from binding override
or falls back to convention with case-insensitive aliases
- game_screen.gd:
- _find_animation_player(): recursive search in loaded GLB scene tree
- _resolve_anim_track(): case-insensitive + alias resolution
- _play_unit_anim(): plays track, returns to Idle when one-shot finishes
- _play_damage_animations(): detects HP drops and unit deaths before rebuild
- Model facing: P1 units rotated 180deg Y to face opponent across board
- Idle loop starts automatically after real model loads
- Attack animation fires immediately on attack input (before ACK)
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 game.over was received, Game.state was not cleared. If both players
re-queued and matched again, the new GameScreen saw non-empty state and
called _on_state_updated instead of send_ready(), leaving the new session
stuck in Initializing. Clearing state = {} before emitting game_over fixes this.
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>
- Status label: connect Network.connected so "Connecting…" clears once the
WebSocket opens (previously the label stuck forever with no session)
- Remember Me: apply font_color override so the checkbox text is visible
- Register errors: map ASP.NET Identity password-policy error codes
(PasswordTooShort, PasswordRequiresUpper/Lower/NonAlphanumeric/Digit) to
user-friendly strings; old WEAK_PASSWORD kept as alias
- Chat poll: guard _on_message_poll_tick with Auth.user_id check so the timer
cannot send chat.get_messages as the first message on a fresh connection
when the user is not yet authenticated (caused by logout not stopping the
timer, leaving it running into the next reconnect cycle)
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>
- AbilitySystem: implement WithinRangeFilter (Manhattan distance min/max) and
IsAdjacentToSourceFilter in FilterMatches — both were falling through to
_ => true, so range constraints on targeting were silently ignored
- Program.cs: add GET /cdn/{**path} proxy endpoint with
Access-Control-Allow-Origin: * so browser web clients can fetch GLB models
(Ceph RadosGW / cdn.aeternalisgames.com has no CORS headers)
- ModelCache.gd: on web export, rewrite cdn.aeternalisgames.com URLs to go
through hub.aeternalisgames.com/cdn proxy; disk/memory cache still keyed
on the original CDN URL for consistency across platforms
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>
- Ability panel now starts a per-action targeting flow instead of
immediately firing the ability
- Board abilities: blue tile highlights for unit/tile targets; click
to collect AbilityTarget and advance to the next action
- Player/zone abilities: left-side player panel with player name
buttons; zone (Hand/Deck/Discard) sub-buttons appear for zone-scoped
abilities
- Re-clicking a selected spirit toggles the ability panel open/closed
- Auto-skips actions whose ownership is Self/ExactSelf/Random or whose
count.all = true (server resolves those without player input)
- Game.send_activate_ability now accepts an optional targets array
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>
For WaitingForOpponent/Started, state always arrives via game.state_update push
not via the ack payload — calling _apply_state_from_payload on the ack was
producing a confusing warning with no real effect. Replace with a match that
only fetches state for AlreadyStarted.
Also add game.session_abandoned push handler: emits Game.session_abandoned
signal (new) and game_screen connects to it to navigate back to MainScreen,
so clients stuck on the loading screen after a server restart recover cleanly.
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>
- ModelCache._download: log result enum, HTTP code, body size,
Content-Type header, and first 16 bytes for every download — enough
to diagnose why Godot receives non-GLB data despite CDN serving valid GLB
- Moved disk-cache write to AFTER a successful parse so corrupt bytes
are never written; disk cache read now deletes + re-downloads on bad parse
- game_screen: replace raw `body` lambda captures with weakref to
eliminate "Lambda capture freed" noise (behavior unchanged)
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>
- 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>
Client:
- Added ModelCache autoload (autoloads/ModelCache.gd)
- Downloads .glb files from CDN via HTTPRequest
- Disk cache: user://remote_model_cache/<sha256>.glb
- Memory cache: PackedScene per URL for instant re-instantiation
- Concurrent requests for same URL queue and share one download
- Loads via GLTFDocument.append_from_file + generate_scene
- game_screen.gd: _add_unit_mesh now looks up cardDefinitionId
→ ContentCache.get_definition() → finds Model3D asset URL
→ calls ModelCache.load_model() to async replace placeholder geometry
- Placeholder (sphere/cylinder/box) shown immediately
- Real model swaps in on download completion
- Guards against body being freed before model arrives
- Added _unit_bodies dict for O(1) body lookup
- project.godot: registered ModelCache autoload
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>
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>
- Block unit selection in Placement phase (prevents sending game.move_unit
when opponent hasn't placed yet)
- All accountId comparisons now case-insensitive (Guid serialization may
differ between auth response and state DTO)
- Add debug log in _on_state_updated: phase, player found, hand size
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 pushes "game.state_update" not "game.state_update.push"
- On "AlreadyStarted" ack (reconnect), explicitly fetch state via game.get_state
instead of expecting state in the ready ack (it's never there)
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>
- Game.gd: fix push type "game.over" (not "game.over.push"), store opponent_name
- game_screen.gd full rewrite:
- Unit ownership via _rebuild_ownership() + _is_enemy_unit()/_is_friendly_unit()
(CardInstanceDto has no ownerAccountId; build sets from PlayerStateDto instead)
- Hand card hover y-reset fixed to 0.0 (was incorrectly using container position)
- Opponent name from Game.opponent_name
- Terramorpha multi-tile sequential selection with adjacency validation
- Sacrifice: click ArchSpirit → PopupMenu → select spirit → ConfirmationDialog
- Ascend/Transition: detected by card tier vs current arch tier, confirmation dialogs
- Ability panel: parses abilitiesJson, filters Active abilities, floating HUD 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>
- 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>
- Chat bubble now hidden on all scenes; MainScreen shows/hides it via
Chat.set_bubble_visible() in _ready/_exit_tree
- send_friend_request now uses Network.request so _fetch_social() fires
on success, making the friends list update immediately after adding
- Added DM close button (✕) to each conversation row in the DMs tab;
_close_dm removes the channel from local state via Chat.close_dm()
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>
- 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>
- 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>
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>
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>
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>