Сохранение индикации переподключения Quick Connect

This commit is contained in:
DCCONSTRUCTIONS
2026-08-23 15:33:11 +03:00
parent 03830cd15e
commit 99eafaf02d
2 changed files with 44 additions and 6 deletions
@@ -6788,6 +6788,38 @@ test("read-only reconnect keeps its card and loader across a transient projectio
)),
]);
const runningVerificationState = structuredClone(initialState);
runningVerificationState.connection_attempt = {
schema_version: "missioncore.xgrids-k1-connection-attempt/v1",
attempt_id: "verify-saved-k1-running",
connection_mode: "bridge",
status: "running",
phase: "network_applied",
control_state: "unknown",
stage: "host-route-and-control-endpoint",
public_error_code: null,
side_effect_status: "network-applied",
safe_next_action: "wait-for-current-attempt",
automatic_retry: false,
accepted_at: OBSERVED_AT,
completed_at: null,
timeline: [],
};
currentState = runningVerificationState;
tree = harness.render(props());
const runningMarkup = renderToStaticMarkup(tree);
const runningReconnect = buttonMarkupWithText(
runningMarkup,
"Переподключение…",
);
assert.equal(runningReconnect.length, 1);
assert.match(runningReconnect[0], /disabled/);
assert.match(runningReconnect[0], /aria-busy="true"/);
assert.match(runningReconnect[0], /nodedc-activity-indicator/);
assert.match(runningMarkup, /Сохранённое подключение/);
assert.doesNotMatch(runningMarkup, /Команда настройки завершена/);
assert.doesNotMatch(runningMarkup, /Подтверждение управления/);
const transientState = structuredClone(initialState);
transientState.connection_policy.allowed_actions =
transientState.connection_policy.allowed_actions.filter(
@@ -7461,7 +7493,11 @@ test("applied-network recovery spends the old intent and admits only explicit se
assert.match(source, /BLE-команда не повторяется/);
assert.match(
source,
/status=\{\s*searchActive[\s\S]*?: presentedPhysicalRecoveryRequired[\s\S]*?: networkRecoveryRequired[\s\S]*?>\s*\{searchActive \? \([\s\S]*?Поиск Bluetooth · \{scanSecondsRemaining \?\? 6\} с[\s\S]*?: networkRecoveryRequired && !connectionAttemptSettling \? \(/,
/status=\{\s*searchActive[\s\S]*?: presentedPhysicalRecoveryRequired[\s\S]*?: presentedConnectionRecoveryRequired[\s\S]*?: networkRecoveryRequired/,
);
assert.match(
source,
/networkRecoveryRequired\s*&& !connectionAttemptSettling\s*&& !connectionRecoveryVerificationPending \? \(/,
);
assert.match(
@@ -3265,16 +3265,16 @@ export function K1ProvisioningPipeline({
: savedBridgeNetworkSetupRequired
? "Нужна настройка сети"
: "Нужно выбрать действие"
: networkRecoveryRequired
? appliedControlSettlementPending
? "Подтверждение управления"
: "Управление не подтверждено · выбор заблокирован"
: presentedConnectionRecoveryRequired
? connectionReconnectPending
? "Переподключение…"
: connectionRecoveryTarget
? "Можно переподключиться"
: "Подключить заново"
: networkRecoveryRequired
? appliedControlSettlementPending
? "Подтверждение управления"
: "Управление не подтверждено · выбор заблокирован"
: connectionEstablished
? "Подключение установлено"
: explicitProvisioningDraftStale
@@ -3319,7 +3319,9 @@ export function K1ProvisioningPipeline({
Поиск Bluetooth · {scanSecondsRemaining ?? 6} с
</strong>
</div>
) : networkRecoveryRequired && !connectionAttemptSettling ? (
) : networkRecoveryRequired
&& !connectionAttemptSettling
&& !connectionRecoveryVerificationPending ? (
<div className="connection-summary" role="status">
<span>
{appliedControlSettlementPending