Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.
fix(desktop): an announced server release whose files aren't up yet isn't offered
Salman Qureshi8786237b26eb
diff --git a/apps/desktop/src/updates/UpdatesPanel.tsx b/apps/desktop/src/updates/UpdatesPanel.tsxindex 769cc91a..0e262056 100644--- a/apps/desktop/src/updates/UpdatesPanel.tsx+++ b/apps/desktop/src/updates/UpdatesPanel.tsx@@ -307,6 +307,7 @@ export function ServerRow({ item, compact = false }: { item: UpdateItem; compact{blocked && a.phase === "idle" && (<p className="mt-2 text-xs text-ink3">Updating to {blocked.version} failed {blocked.failures} times{blocked.lastError ? ` (${blocked.lastError})` : ""}, so Mercury stopped trying on its own. On {local ? "this computer" : "that computer"}, run <code className="font-mono">mercury upgrade</code> to see what's wrong, or try once more.</p>)}+ {item.release?.downloadable === false && a.phase === "idle" && <p className="mt-2 text-xs text-ink3">{item.next} was announced but its files aren't published yet. Nothing was changed; Mercury checks again later.</p>}{cannot && item.next && <p className="mt-2 text-xs text-ink3">{info?.cannotReason ?? "This Mercury can't update itself."} {local ? "Run" : "On that computer, run"} <code className="font-mono">mercury upgrade</code>.</p>}{!info && item.next && <p className="mt-2 text-xs text-ink3">This Mercury is too old to update from here. {local ? "Run" : "On that computer, run"} <code className="font-mono">mercury upgrade</code> once; after that it updates from this app.</p>}{confirm && <p className="mt-2 text-xs text-amber">Mercury is answering right now. The update waits until running work is done (up to 10 minutes), or can start right away and stop it.</p>}@@ -317,7 +318,7 @@ export function ServerRow({ item, compact = false }: { item: UpdateItem; compact{a.phase === "finished" && <Button size="sm" variant="ghost" onClick={() => clearServerAction(conn)}>Dismiss</Button>}{!item.required && a.phase === "idle" && item.next && <Button size="sm" variant="ghost" onClick={() => later(item.key)}>Later</Button>}{confirm && <Button size="sm" variant="outline" onClick={() => start(true)}>Update now</Button>}- {item.next && info?.canSelfUpdate && (a.phase === "idle" || a.phase === "error" || (a.phase === "finished" && a.job.state !== "done")) && (+ {item.next && info?.canSelfUpdate && item.release?.downloadable !== false && (a.phase === "idle" || a.phase === "error" || (a.phase === "finished" && a.job.state !== "done")) && (<Button size="sm" variant="primary" onClick={() => { if (confirm) { setConfirm(false); void updateServer(conn); } else start(); }}>{confirm ? "Wait, then update" : a.phase === "idle" ? (blocked ? "Try again" : "Update server") : <><RotateCcw size={12} /> Try again</>}</Button>diff --git a/apps/desktop/src/updates/selectors.ts b/apps/desktop/src/updates/selectors.tsindex c614bc91..4e14f753 100644--- a/apps/desktop/src/updates/selectors.ts+++ b/apps/desktop/src/updates/selectors.ts@@ -98,6 +98,7 @@ export function updatableOf(items: UpdateItem[], s: Snapshot): UpdateItem[] {return items.filter((i) => {if (!i.next) return false;if (i.kind === "desktop") return s.desktop.phase !== "installing";+ if (i.release?.downloadable === false) return false;const e = s.servers[i.connection!.id];const a = e?.action;return !!e?.info?.canSelfUpdate && !!a && (a.phase === "idle" || a.phase === "error" || (a.phase === "finished" && a.job.state !== "done"));diff --git a/apps/desktop/src/updates/types.ts b/apps/desktop/src/updates/types.tsindex 3d0eb5aa..5d8c6527 100644--- a/apps/desktop/src/updates/types.ts+++ b/apps/desktop/src/updates/types.ts@@ -5,6 +5,8 @@ export interface ChannelRelease {date?: string;notes?: string;notesUrl?: string;+ /** Server only: false for an hour after its files turned out not to be published yet. */+ downloadable?: boolean;}export interface Minimum {