feat(desktop/account-health): treat active/expiring_soon probes as live and dedupe in-flight checks
Why: avoid showing accounts as not-live during stale-window probes; keep publish gating consistent with runtime view. - collapse FIRST_PROBE window so initial probe runs immediately - skip due-probe selection when a probe is already queued/in-flight - mirror auth-state→health projection on both client report and tenant ingest paths Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
import type { DesktopAccountInfo } from "@geo/shared-types";
|
||||
|
||||
export function resolveAccountHealth(account: DesktopAccountInfo): DesktopAccountInfo["health"] {
|
||||
if (
|
||||
account.runtime_auth_state === "active" ||
|
||||
(account.runtime_auth_state === "expiring_soon" && account.runtime_probe_state !== "network_error")
|
||||
) {
|
||||
return "live";
|
||||
}
|
||||
return account.runtime_health ?? account.health;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user