feat(admin-web): prefer runtime account health when ranking and gating accounts

Surface the new runtime_health/runtime_checked_at fields through a tiny
desktop-account-runtime helper so PublishArticleModal, MediaView, and
TrackingView fall back to the desktop client's last live signal instead of
the slower DB column. This keeps the publishable card and tracking
breakdown in sync with the desktop probe loop.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-27 21:34:05 +08:00
parent c3feb7477a
commit 412befef53
4 changed files with 105 additions and 20 deletions
@@ -0,0 +1,9 @@
import type { DesktopAccountInfo } from "@geo/shared-types";
export function resolveAccountHealth(account: DesktopAccountInfo): DesktopAccountInfo["health"] {
return account.runtime_health ?? account.health;
}
export function resolveAccountCheckedAt(account: DesktopAccountInfo): string | null {
return account.runtime_checked_at ?? account.runtime_verified_at ?? account.verified_at;
}