fix(client): address PR #73 review — race conditions and defensive guards (#257)

- Defer LOAD_GAME dispatch until SimBridge reaches CONNECTED (critical)
- Guard _build_saves_list() against queue_free() race on rapid reopen
- Disable save entries with empty newest_save, guard in _on_save_selected
- Send before show_loading on F6 quickload, skip overlay on send failure
- Clear pending_load_path in _on_new_game()/_on_continue() (stale path)
- Add hide_loading(success: bool) API for future failure-state UI
- Add test_save_load_flow_sprint21.gd covering LoadingScreen + GameState

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 18:06:16 +01:00
co-authored by Claude Opus 4.6
parent c797869503
commit 64bf4ec539
4 changed files with 173 additions and 19 deletions
+2 -1
View File
@@ -39,5 +39,6 @@ func show_loading() -> void:
visible = true
func hide_loading() -> void:
## Hide the loading overlay. success=false is reserved for future failure-state UI.
func hide_loading(success: bool = true) -> void:
visible = false