fix(plugin): detect updates for plugins without persisted install sources - #9887
Merged
Soulter merged 1 commit intoSep 1, 2026
Merged
Conversation
…rces Legacy plugins installed before install-source persistence (PR AstrBotDevs#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.
Soulter
approved these changes
Sep 1, 2026
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9668
Problem
For plugins installed before the install-source persistence feature (PR #9037, v4.26.2), there is no persisted
plugin_install_sourcesrecord. The backend falls back to an implicit source record (implicit: true) as a display-only placeholder.The frontend update check (
checkUpdate) skipped any extension whoseinstall_source.implicit === true, so these legacy plugins never surfaced an available update — the user had to manually reinstall or re-bind the plugin source before the "update available" badge appeared.Root cause
checkUpdatebails out early onsource.implicit === true.findMarketPluginForExtensionalso returnsnullfor implicit sources, so even the update download URL could not be resolved.Fix
Include implicit sources in the update check instead of skipping them:
install_method: "market"with a nullregistry_url, which resolves to the default registry. The existing matching logic then looks the plugin up in the default market bymarket_plugin_id→repo→ name. Only a real match surfaces an update, so no false positives are introduced for unmatched plugins.buildUpdateContext), so updating remains safe and the persisted record is created on confirm — matching the previously working "reinstall/change source" path.Also fixes the misspelled
online_vesion→online_versionfield inserialize_plugin_baseso the backend payload matches what the frontend reads.Testing
node --check dashboard/src/views/extension/useExtensionPage.jspasses.Summary by Sourcery
Restore update detection for legacy market plugins while correcting the plugin version payload field.
Bug Fixes: