Fix null-session prompt, stale ready state, spectator UI, and admin cancel

- init_screen.gd: handle null sessionId from game.get_active_session.ack
  properly — str(null)="<null>" which passed the is_empty() check causing
  every player to see "active game in progress (null phase)" on login
- CustomLobby.gd: call clear_state() at the start of create() and join() so
  that i_am_ready/partner_ready are reset between lobbies — fixes players
  appearing instantly ready when entering a new lobby after a previous game
- game_screen.gd: in _setup_spectator_ui(), hide _settings_btn (prevents
  accessing the Concede button) and add a programmatic "Leave" button that
  calls Game.stop_spectating() and navigates back to FreePlayScreen
- CustomLobbiesPage.razor: add Cancel button (admin) for Open/Full lobbies;
  directly sets Status=Cancelled and refreshes the list

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-03-19 10:49:46 -04:00
co-authored by Claude Happy
parent e104330da4
commit efcd693d60
4 changed files with 47 additions and 7 deletions
@@ -76,6 +76,7 @@ func clear_state() -> void:
func create(lobby_name: String, deck_id: String, password: String,
rules_override: Dictionary, on_success: Callable = Callable(),
on_error: Callable = Callable()) -> void:
clear_state()
my_deck_id = deck_id
var payload := {
"lobbyName": lobby_name,
@@ -101,6 +102,7 @@ func create(lobby_name: String, deck_id: String, password: String,
func join(lid: String, deck_id: String, password: String,
on_success: Callable = Callable(),
on_error: Callable = Callable()) -> void:
clear_state()
my_deck_id = deck_id
var payload := { "lobbyId": lid, "deckId": deck_id }
if password != "":