From e1937c86b62190342ff5413b08b54136d185baec Mon Sep 17 00:00:00 2001 From: Jason Thomas Date: Thu, 1 Oct 2026 17:03:12 -0600 Subject: [PATCH] fix(admin): wait for version history info before modified plugin dialog ModifiedPluginDialog picks its upgrade flow once at creation, so opening it before /openc3-api/info returned could skip versioning and report no conflicts. Co-Authored-By: Claude Opus 5.5 --- .../src/tools/admin/tabs/PluginsTab.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/tools/admin/tabs/PluginsTab.vue b/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/tools/admin/tabs/PluginsTab.vue index 54d718928b..ea7fa69cf7 100644 --- a/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/tools/admin/tabs/PluginsTab.vue +++ b/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/tools/admin/tabs/PluginsTab.vue @@ -282,8 +282,9 @@ export default { // Detect whether the Enterprise Version History backend is enabled // (OPENC3_VERSION_HISTORY_DIR set) so per-plugin Export/Import History - // actions can be shown. - Api.get('/openc3-api/info') + // actions can be shown. The promise is kept so the upgrade flow can wait + // for it before opening ModifiedPluginDialog, which picks its flow once. + this.infoLoaded = Api.get('/openc3-api/info') .then((response) => { this.scriptVersionsEnabled = !!response.data?.script_versions }) @@ -413,13 +414,15 @@ export default { this.file = undefined }) }, - pluginCallback: function (pluginHash) { + pluginCallback: async function (pluginHash) { this.showPluginDialog = false if (this.currentPlugin !== null) { pluginHash['name'] = this.currentPlugin } this.pluginHashTmp = pluginHash if (this.isModified(this.currentPlugin)) { + // The upgrade flow depends on scriptVersionsEnabled + await this.infoLoaded this.pluginDelete = false this.showModifiedPluginDialog = true } else {