diff --git a/package.json b/package.json index 55b4fd2..8aa031c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tallynote", - "version": "1.2.6", + "version": "1.2.7", "private": true, "type": "module", "packageManager": "pnpm@9.0.6", diff --git a/web-next/src/pages/update/UpdatePage.tsx b/web-next/src/pages/update/UpdatePage.tsx index 6651ee4..8eb60e9 100644 --- a/web-next/src/pages/update/UpdatePage.tsx +++ b/web-next/src/pages/update/UpdatePage.tsx @@ -451,18 +451,15 @@ export default function UpdatePage({ setError(""); try { const result = await api("/api/update/check", { method: "POST" }); - // A check response is authoritative for release availability. It does - // not include a job field, so retain a task only while it is still - // actionable; the status endpoint has already reconciled expired - // staged tasks before this check runs. + // The check endpoint returns release metadata but not task state. Read + // the status endpoint once more so reconciliation performed before the + // check is authoritative: an expired staged task must disappear from + // this page immediately instead of surviving until a full refresh. + const status = await api("/api/update/status"); setLiveInfo((current) => ({ ...(current ?? result), ...result, - job: current?.job && ( - current.job.status === "completed" || - (current.job.status !== "staged" || current.job.operation !== "download") || - (result.latest?.isNewer === true && result.latest.version === current.job.version) - ) ? current.job : null, + job: status.job, })); notify?.("版本检查完成", "info"); } catch (e) {