From add918ff4c9b033a6a7dd70e7c51ee4cd4f05c97 Mon Sep 17 00:00:00 2001 From: liangxu Date: Thu, 30 Apr 2026 19:32:20 +0800 Subject: [PATCH] feat(desktop-client): clear auth failure on active probe and trigger probe when opening console Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/desktop-client/src/main/account-health.ts | 1 + apps/desktop-client/src/main/bootstrap.ts | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/apps/desktop-client/src/main/account-health.ts b/apps/desktop-client/src/main/account-health.ts index a0fb819..5b53edd 100644 --- a/apps/desktop-client/src/main/account-health.ts +++ b/apps/desktop-client/src/main/account-health.ts @@ -282,6 +282,7 @@ function applyActiveResult( record.lastVerifiedAt = now; record.lastProbeAt = now; record.nextProbeAt = nextRegularProbeAt(now); + record.lastAuthFailureAt = null; record.profile = result.profile ?? record.profile; record.sessionFingerprint = result.sessionFingerprint ?? record.sessionFingerprint; record.suspectedExpiredAt = null; diff --git a/apps/desktop-client/src/main/bootstrap.ts b/apps/desktop-client/src/main/bootstrap.ts index abe43e7..1f1c628 100644 --- a/apps/desktop-client/src/main/bootstrap.ts +++ b/apps/desktop-client/src/main/bootstrap.ts @@ -347,6 +347,16 @@ function registerBridgeHandlers(): void { account: { id: string; platform: string; platformUid: string; displayName: string }, ) => { await openPublishAccountConsole(account); + void requestRuntimeAccountProbe(account.id, { + account, + force: true, + }).catch((error) => { + console.warn("[desktop-console] background account probe failed", { + accountId: account.id, + platform: account.platform, + message: error instanceof Error ? error.message : String(error), + }); + }); return null; }, );