fix(client): PR #135 review — T1/T3/H4-H7 blocking + nits
Code changes addressing PR #135 review (Tyre + Hoshe): - **T3 (blocking):** test_merge_path_flows_sprint37.gd `_load_main_menu` and `_load_char_create` now assert the scene loaded instead of silently returning. Missing .tscn → red test, not falsely green. - **T1:** sim_bridge.gd signal `handshake_complete(protocol_version: int)` was D-192 residue with no listeners. Drop the int parameter entirely and the literal-0 emit. - **H4:** test_new_game_catalog_snapshot_resolves_loading_state now asserts SimBridge.state == CONNECTED terminus, not just the loading flag — guarantees full flow completion, not merely flag-clear. - **H5:** test_protocol_bridge.gd file-level comment refreshed; drops reference to removed protocol-version check tests. - **H6:** test_p0_regressions.gd `_make_snapshot_bytes` comment refreshed and version field removed from fixture dict (D-192: not required). - **H7:** test_merge_path_flows_sprint37.gd `_make_catalog_snapshot` drops version field from fixture dict (D-192). Follow-up tickets filed for reviewer suggestions: - **T2:** #889 — revive EntityRenderer sprite constants coverage (D-044 ENTITY_WIDTH/HEIGHT, asserted by deleted test_sprite_integration). - **T4:** #890 — UI timeout fallback for bookmark catalog wait in main_menu (systemic 'catalog never arrives' class beyond #872's TCP-batch race). - **T5/T6:** #891 — scene-flow test tier docs + test-only reset helpers (SimBridge.reset_for_test, MetaStack.reset_for_test) + minimal public API on scenes so UI refactors don't break all four flow tests simultaneously. Verification: - `make lint-client` — no script errors - `gdlint client/scripts/ client/ui/` — no problems - `make test-client` — 2428/2488 passing. 60 remaining failures are pre-existing, unrelated to sprint 37 (test_dialogue_sprint20 #558 signals, test_input_roundtrip integration-sans-server, etc.). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@ extends Node
|
||||
# Signals
|
||||
signal connection_state_changed(old_state: ConnectionState, new_state: ConnectionState)
|
||||
signal snapshot_received(snapshot: Dictionary)
|
||||
signal handshake_complete(protocol_version: int)
|
||||
signal handshake_complete
|
||||
signal handshake_failed(reason: String)
|
||||
|
||||
# Connection states
|
||||
@@ -281,7 +281,7 @@ func _process(delta: float) -> void: # gdlint:disable=max-returns
|
||||
_set_state(ConnectionState.ERROR)
|
||||
return
|
||||
|
||||
handshake_complete.emit(0) # D-192: protocol_version field dropped; signal kept for API compat
|
||||
handshake_complete.emit()
|
||||
_set_state(ConnectionState.CONNECTED)
|
||||
# #646: Request full settings dump on connect — hydrates GameState.ai_enhanced_dialogue_enabled
|
||||
# from server SQLite so the client reflects the authoritative persisted state (D-138).
|
||||
|
||||
Reference in New Issue
Block a user