mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-10 16:04:04 +00:00
feat(multiplayer): expose action retry in matchmaking UI
This commit is contained in:
@@ -58,6 +58,11 @@ func _on_queue_pressed() -> void:
|
||||
if retry_err != OK:
|
||||
_on_local_error("Could not retry matchmaking: %s" % error_string(retry_err))
|
||||
return
|
||||
if ControlPlaneClient.can_retry_last_mutation():
|
||||
var mutation_err := ControlPlaneClient.retry_last_mutation()
|
||||
if mutation_err != OK:
|
||||
_on_local_error("Could not retry matchmaking action: %s" % error_string(mutation_err))
|
||||
return
|
||||
if not _can_start_new_search(ControlPlaneClient.state.phase):
|
||||
return
|
||||
_elapsed_seconds = 0.0
|
||||
@@ -178,8 +183,10 @@ func _render(snapshot: Dictionary) -> void:
|
||||
cancel_button.visible = ControlPlaneClient.state.can_cancel()
|
||||
accept_button.visible = phase == MatchmakingState.PROPOSED
|
||||
decline_button.visible = phase == MatchmakingState.PROPOSED
|
||||
queue_button.disabled = ControlPlaneClient.auth_expired or not (_can_start_new_search(phase) or ControlPlaneClient.can_retry_queue_create())
|
||||
queue_button.text = "Retry Search" if ControlPlaneClient.can_retry_queue_create() else "Search"
|
||||
var retry_search := ControlPlaneClient.can_retry_queue_create()
|
||||
var retry_mutation := ControlPlaneClient.can_retry_last_mutation()
|
||||
queue_button.disabled = ControlPlaneClient.auth_expired or not (_can_start_new_search(phase) or retry_search or retry_mutation)
|
||||
queue_button.text = "Retry Search" if retry_search else ("Retry Request" if retry_mutation else "Search")
|
||||
|
||||
|
||||
static func _is_terminal(phase: String) -> bool:
|
||||
|
||||
@@ -1440,3 +1440,5 @@ Allocator-selected region, build, protocol, and transport now travel with the al
|
||||
The same allocation path now carries the matcher-selected playlist, preventing a ranked match from inheriting the Fleet’s casual default. Durable allocation claims return the playlist, the worker includes it in Fleet selection metadata, Agones copies it to the allocated GameServer, and the supervisor overrides `--playlist` before launch; the existing compatibility tests remain green.
|
||||
|
||||
The Godot control-plane client now retains the exact last idempotent mutation and exposes `retry_last_mutation()` for transport, timeout, rate-limit, and 5xx failures. Retries reuse the original idempotency key and expected revision, while 401 and 409 responses remain non-retryable; the harness covers the policy boundary. This closes the local duplicate-action recovery mechanism for heartbeat/cancel/proposal calls, with broader live UI retry verification still remaining.
|
||||
|
||||
The matchmaking UI now exposes that retained replay through its existing action button as `Retry Request` while a heartbeat, cancellation, or proposal action has a retryable failure. Terminal, authentication, and revision-conflict paths remain ineligible, so the button cannot issue a stale blind command.
|
||||
|
||||
Reference in New Issue
Block a user