feat(webui): notify when a newer release is available

Advisory, read-only update check: the core polls GitHub's latest stable release, compares it against the running build, and surfaces a notice in the sidebar footer plus a detailed card (changelog + download link + platform-matched asset hint) in Settings → About.

SnowLuma never downloads or applies anything itself — cross-platform self-update is a minefield (Windows locks loaded .node/.dll, Docker bakes the app into image layers, bare installs have no supervisor), so the user downloads and applies manually.

The backend caches results for 6h to stay under GitHub's unauthenticated rate limit, degrades silently on failure, and can be disabled via SNOWLUMA_UPDATE_CHECK=0.
This commit is contained in:
DrSmoothl committed 2026-06-05 16:08:38 +08:00
1 parent 28db1d1079
commit 56dc934106
9 files changed
+362 -5

No files matched your search

@@ -1,5 +1,5 @@
import { createContext, useContext, type ReactNode } from 'react';
import type { AccountConnections, HookProcessInfo, QQInfo, SystemInfo } from '@/types';
import type { AccountConnections, HookProcessInfo, QQInfo, SystemInfo, UpdateInfo } from '@/types';
import type { HookProcessOps } from '@/hooks/use-hook-process-ops';
/**
@@ -13,12 +13,16 @@ export interface AppStateValue {
processList: HookProcessInfo[];
systemInfo: SystemInfo | null;
connections: AccountConnections[];
/** Advisory update-availability info; null until the first check resolves. */
updateInfo: UpdateInfo | null;
selectedUin: string | null;
setSelectedUin: (uin: string | null) => void;
processOps: HookProcessOps;
refreshProcesses: () => void;
refreshSystem: () => void;
refreshConnections: () => void;
/** Re-run the update check; `force` bypasses the server-side cache. */
refreshUpdate: (force?: boolean) => Promise<void>;
/** Triggered from the topbar logout button. */
onLogout: () => void;
}