refactor(webui): replace real-time polling with click-to-check version updates

- Remove background PyPI polling loop and WebSocket broadcast
- Remove UpdateBanner from ThreadHeader (keep main page clean)
- Add on-demand version check endpoint (GET /api/settings/version-check)
- Add 'About' section in Settings > Overview with check-for-updates button
- Design: no auto-fetch, user initiates check explicitly via button click
This commit is contained in:
Jiajun Xie
2026-06-10 18:11:06 +08:00
committed by Xubin Ren
parent c00371c761
commit 4255656089
6 changed files with 200 additions and 0 deletions
+20
View File
@@ -229,6 +229,26 @@ export async function fetchSettingsUsage(
);
}
export interface VersionCheckResult {
updateAvailable: {
currentVersion: string;
latestVersion: string;
pypiUrl?: string;
} | null;
}
export async function checkVersion(
token: string,
base: string = "",
): Promise<VersionCheckResult> {
return request<VersionCheckResult>(
`${base}/api/settings/version-check`,
token,
undefined,
10_000,
);
}
export async function fetchWorkspaces(
token: string,
base: string = "",