File tree Expand file tree Collapse file tree
main/java/ai/openclaw/app/ui
test/java/ai/openclaw/app/ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1221,8 +1221,6 @@ internal fun recoveryGatewayDetail(
12211221 nodeCapabilityApprovalState == GatewayNodeApprovalState .Unapproved
12221222 ) {
12231223 " Gateway paired. Waiting for node capability approval."
1224- } else if (nodeCapabilityApprovalState == GatewayNodeApprovalState .Loading ) {
1225- " Gateway paired. Checking node capability approval."
12261224 } else if (gatewayConnectionProblem?.isPairingRequired == true && ! gatewayConnectionProblem.canAutoRetry) {
12271225 recoveryGatewayApprovalCommand(gatewayConnectionProblem)
12281226 ?.let { " Gateway approval is pending. Run this on the gateway host:" }
@@ -1231,6 +1229,8 @@ internal fun recoveryGatewayDetail(
12311229 " Gateway approval is in progress. OpenClaw will retry automatically."
12321230 } else if (gatewayConnectionProblem != null ) {
12331231 recoveryGatewayAuthDetail(gatewayConnectionProblem)
1232+ } else if (nodeCapabilityApprovalState == GatewayNodeApprovalState .Loading ) {
1233+ " Gateway paired. Checking node capability approval."
12341234 } else if (statusText.contains(" operator offline" , ignoreCase = true )) {
12351235 " Gateway paired. Waiting for operator access."
12361236 } else if (gatewayStatusLooksLikePairing(statusText)) {
Original file line number Diff line number Diff line change @@ -248,6 +248,29 @@ class OnboardingFlowLogicTest {
248248 )
249249 }
250250
251+ @Test
252+ fun recoveryGatewayDetailPrefersAuthProblemWhileNodeApprovalIsLoading () {
253+ assertEquals(
254+ " Saved authentication is invalid. Re-authenticate or reset this gateway connection." ,
255+ recoveryGatewayDetail(
256+ ready = false ,
257+ remoteAddress = " wss://gateway.example.test" ,
258+ statusText = " Connected (node offline)" ,
259+ nodeCapabilityApprovalState = GatewayNodeApprovalState .Loading ,
260+ gatewayConnectionProblem =
261+ GatewayConnectionProblem (
262+ code = " AUTH_DEVICE_TOKEN_MISMATCH" ,
263+ message = " authentication needed" ,
264+ reason = null ,
265+ requestId = null ,
266+ recommendedNextStep = " update_auth_credentials" ,
267+ pauseReconnect = true ,
268+ retryable = false ,
269+ ),
270+ ),
271+ )
272+ }
273+
251274 @Test
252275 fun recoveryGatewayAuthDetailShowsSpecificAuthRecoveryActions () {
253276 val cases =
You can’t perform that action at this time.
0 commit comments