Distinguish a plugin that was never loaded from one that failed

The plugin list reported "Error loading module" for anything without a
loaded package, which includes plugins the controller has picked up since
the page was opened. Nothing had been tried for those, so reporting a
failure was both wrong and unhelpful: the fix is to reload, not to
investigate.

Report those as needing a reload instead. Plugins the controller cannot
serve at all are excluded during startup before they reach the loaded
plugin map, so those are checked for first and still count as an error.

Fixes #729

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 4.8 committed 2026-08-10 10:01:38 +00:00
1 parent e3c18db7b8
commit 1e4b586fa3
1 file changed
+8
@@ -88,6 +88,14 @@ export default function PluginsPage() {
if (!plugin.meta.enabled) {
return <><InfoCircleFilled style={{ color: "#1668dc" }} /> Disabled on controller</>;
}
// Plugins are loaded once when the page starts, so one the
// controller has picked up since then was never attempted
// rather than attempted and failed. A plugin the controller
// cannot serve at all is excluded before it gets that far,
// and is a real error.
if (!plugin.meta.web.error && !control.pluginInfos.has(plugin.meta.name)) {
return <><InfoCircleFilled style={{ color: "#1668dc" }} /> Reload page to load</>;
}
if (!plugin.package) {
return <><CloseCircleFilled style={{ color: "#dc4446" }} /> Error loading module</>;
}