From a92038c303931ddfa448c877006de7f43d0dc475 Mon Sep 17 00:00:00 2001 From: xiaoyuyu6420 <93528429+xiaoyuyu6420@users.noreply.github.com> Date: Tue, 1 Sep 2026 01:22:59 +0800 Subject: [PATCH] fix(plugin): detect updates for plugins without persisted install sources Legacy plugins installed before install-source persistence (PR #9037) have no plugin_install_sources record, so the backend falls back to an implicit source record. The frontend update check skipped implicit sources entirely, so these plugins never showed available updates until the user manually re-bound or reinstalled the plugin. Include implicit sources in the update check: they resolve to the default registry, so match them against the default market by repo/name. Only matched plugins surface an update; unmatched ones stay silent, so this cannot introduce false positives. Also fix the misspelled online_vesion field name so the backend payload matches what the frontend reads. --- astrbot/dashboard/services/plugin_service.py | 2 +- dashboard/src/views/extension/useExtensionPage.js | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/astrbot/dashboard/services/plugin_service.py b/astrbot/dashboard/services/plugin_service.py index 353fca2b55..f1e9d1bb42 100644 --- a/astrbot/dashboard/services/plugin_service.py +++ b/astrbot/dashboard/services/plugin_service.py @@ -643,7 +643,7 @@ def serialize_plugin_base( "version": plugin.version, "reserved": plugin.reserved, "activated": plugin.activated, - "online_vesion": "", + "online_version": "", "display_name": plugin.display_name, "logo": logo_url, "support_platforms": plugin.support_platforms, diff --git a/dashboard/src/views/extension/useExtensionPage.js b/dashboard/src/views/extension/useExtensionPage.js index 7c313cd71d..55356c1249 100644 --- a/dashboard/src/views/extension/useExtensionPage.js +++ b/dashboard/src/views/extension/useExtensionPage.js @@ -711,7 +711,10 @@ export const useExtensionPage = (initialTab = "installed") => { const findMarketPluginForExtension = (extension) => { if (!extension) return null; const source = extension.install_source || {}; - if (source.implicit === true || source.install_method !== "market") { + // Implicit records (legacy plugins installed before source persistence) + // still carry the plugin repo, so resolve them against the default market + // instead of treating them as unmatchable. + if (source.install_method !== "market") { return null; } if (extension.update_market_plugin) { @@ -765,10 +768,12 @@ export const useExtensionPage = (initialTab = "installed") => { extension.update_market_plugin = null; const source = extension.install_source; + // Implicit records (legacy plugins with no persisted install source) + // resolve to the default registry, so keep them in the update check + // instead of skipping them entirely. if ( !extension.updates_enabled || !source || - source.implicit === true || source.install_method !== "market" ) { return;