fix(web): the installed-plugins list never waits on the registry download (#766)

GET /plugins/installed called get_registry_info() per plugin. Despite the
"no network call" comment, a cold or expired cache made that download
plugins.json (10 s timeout, three attempts), and with no cached copy each
plugin's lookup repeated it -- offline, every load waited out the timeouts.

The route now reads the registry copy already in memory, however old, via
get_cached_registry_info(). A missing or expired copy starts a single
background refresh (backing off after an offline failure), so a later load
gets update and verified badges. Store, install and update paths still fetch.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Chuck
2026-10-04 20:56:00 -04:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 80048fe78e
commit 294bd522bd
12 changed files with 278 additions and 13 deletions
+7 -2
View File
@@ -106,8 +106,13 @@ def get_installed_plugins():
plugin_config = {}
enabled = bool(plugin_config.get('enabled', False))
# Verified + latest published version from registry (no network call)
store_info = api_v3.plugin_store_manager.get_registry_info(plugin_id)
# Verified + latest published version from the registry copy already
# in memory. Never a fetch: on a cold cache get_registry_info would
# download plugins.json, and offline wait out its timeout and retries
# for every plugin. With no copy yet these are absent (no update or
# verified badge) and a background refresh fills them in for a
# later load.
store_info = api_v3.plugin_store_manager.get_cached_registry_info(plugin_id)
verified = store_info.get('verified', False) if store_info else False
latest_version = store_info.get('latest_version', '') if store_info else ''
installed_version = plugin_info.get('version', '')