Compare commits

...
1 Commits
Author SHA1 Message Date
Qiufeng 3ab3e5e180 fix: sync update status after checks
TallyNote release / linux-x64 (push) Successful in 6m54s
2026-09-05 16:41:18 +08:00
2 changed files with 7 additions and 10 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "tallynote",
"version": "1.2.6",
"version": "1.2.7",
"private": true,
"type": "module",
"packageManager": "pnpm@9.0.6",
+6 -9
View File
@@ -451,18 +451,15 @@ export default function UpdatePage({
setError("");
try {
const result = await api<UpdateInfo>("/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<UpdateInfo>("/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) {