From 44fa791c09a56cee965ce497e2902a1d60c171cb Mon Sep 17 00:00:00 2001 From: LukeGus Date: Thu, 29 Oct 2026 13:56:08 -0500 Subject: [PATCH] fix: show plugins that could not be downloaded as failed (#1714) --- CHANGELOG.md | 1 + src/backend/plugins/manage.ts | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1568cddd..4f985e72d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - A change pushed from one linked desktop or phone now reaches your other linked devices right away, instead of on their next check a few minutes later - The macOS menu bar icon shows the Termix logo instead of an empty square - Cmd+1 (Alt+1 on Windows and Linux) and the other number shortcuts pick the open tabs as numbered in the tab bar, not the home tab +- A plugin the app no longer ships and could not download (for example on a locked down network) shows as failed with the reason on the Plugins tab, instead of as installed ## 26.10.5 diff --git a/src/backend/plugins/manage.ts b/src/backend/plugins/manage.ts index f5ad10c13..1a779d611 100644 --- a/src/backend/plugins/manage.ts +++ b/src/backend/plugins/manage.ts @@ -1048,7 +1048,15 @@ export function restoreMissingPlugins(): Promise { await readUninstalled(), ); const restored: LoadedPlugin[] = []; - for (const id of ids) { + // Shown on the Plugins tab, so a plugin that could not be fetched is not + // listed as working. It stays on and is tried again on the next start. + const markMissing = (id: string, message: string) => + recordState( + id, + "failed", + `Not in this image and could not be downloaded: ${message}`, + ).catch(() => {}); + for (const [index, id] of ids.entries()) { try { const record = await repository.findById(id); const { source, release } = await requireRelease( @@ -1075,11 +1083,14 @@ export function restoreMissingPlugins(): Promise { pluginLogger.warn(`Could not restore ${id}: ${message}`, { operation: "plugin_restore_missing", }); + await markMissing(id, message); // The registry is down or offline, so the rest would fail the same way. if ( error instanceof PluginManageError && error.code === "REGISTRY_UNREACHABLE" ) { + for (const rest of ids.slice(index + 1)) + await markMissing(rest, message); break; } }