UME: renew token when expires_in is 0; token UI loading + toasts; sync thread status hint

- keepalive: call renew when has_token and (expires_in<=0 or below renew_before) so 0s stuck state self-heals\n- alarms/inventory auto loops: set last_error while pulling so table is not stuck at init with no hint\n- UmePage: warn pills for connected+需续期, spinners on token actions, toast ok/err from App, invalidate sync status after token ops

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-12 09:50:13 +08:00
parent def534e0a6
commit 0afc77c06b
5 changed files with 126 additions and 22 deletions

View file

@ -148,12 +148,13 @@ export type UmeAlarmItem = {
};
export type UmeTokenStatus = {
ok: boolean;
ok?: boolean;
has_token: boolean;
expires_in_s: number;
expires_at_epoch_s: number;
auth_header: string;
token_preview?: string;
changed?: boolean;
error_kind?: string;
error?: string;
};