Корректное ожидание подтверждения Bridge
This commit is contained in:
@@ -466,6 +466,26 @@ export function sourceStatusLabel(state: XgridsK1State | null | undefined): stri
|
||||
return "Ожидание";
|
||||
}
|
||||
|
||||
/**
|
||||
* The network write has already crossed its single mutation boundary and the
|
||||
* service is now proving control authority without another BLE command. This
|
||||
* current connection intent must remain visibly pending even when an older
|
||||
* physical-command checkpoint is being reconciled by the same bootstrap.
|
||||
*/
|
||||
export function isConnectionControlBootstrapSettling(
|
||||
state: XgridsK1State | null | undefined,
|
||||
): boolean {
|
||||
const attempt = state?.connection_attempt;
|
||||
if (
|
||||
!attempt
|
||||
|| attempt.phase !== "network_applied"
|
||||
|| attempt.control_state !== "unknown"
|
||||
) return false;
|
||||
if (["accepted", "running"].includes(attempt.status)) return true;
|
||||
return attempt.status === "succeeded"
|
||||
&& attempt.safe_next_action === "verify-control-read-only";
|
||||
}
|
||||
|
||||
export function operationByIdempotencyKey(
|
||||
state: XgridsK1State | null | undefined,
|
||||
action: string,
|
||||
|
||||
Reference in New Issue
Block a user