fix: show plugins that could not be downloaded as failed (#1714)

This commit is contained in:
LukeGus committed 2026-10-29 13:56:08 -05:00
1 parent 034d68b163
commit 44fa791c09
2 files changed
+13 -1

No files matched your search

+1
View File
@@ -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 - 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 - 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 - 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 ## 26.10.5
+12 -1
View File
@@ -1048,7 +1048,15 @@ export function restoreMissingPlugins(): Promise<LoadedPlugin[]> {
await readUninstalled(), await readUninstalled(),
); );
const restored: LoadedPlugin[] = []; 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 { try {
const record = await repository.findById(id); const record = await repository.findById(id);
const { source, release } = await requireRelease( const { source, release } = await requireRelease(
@@ -1075,11 +1083,14 @@ export function restoreMissingPlugins(): Promise<LoadedPlugin[]> {
pluginLogger.warn(`Could not restore ${id}: ${message}`, { pluginLogger.warn(`Could not restore ${id}: ${message}`, {
operation: "plugin_restore_missing", operation: "plugin_restore_missing",
}); });
await markMissing(id, message);
// The registry is down or offline, so the rest would fail the same way. // The registry is down or offline, so the rest would fail the same way.
if ( if (
error instanceof PluginManageError && error instanceof PluginManageError &&
error.code === "REGISTRY_UNREACHABLE" error.code === "REGISTRY_UNREACHABLE"
) { ) {
for (const rest of ids.slice(index + 1))
await markMissing(rest, message);
break; break;
} }
} }