diff --git a/apps/desktop/src/components/layout/ContentArea.vue b/apps/desktop/src/components/layout/ContentArea.vue index c180fe73d0..36ec0a082f 100644 --- a/apps/desktop/src/components/layout/ContentArea.vue +++ b/apps/desktop/src/components/layout/ContentArea.vue @@ -208,6 +208,10 @@ type SearchableBrowserHandle = { executeCommand?: (command: string) => Promise; }; +type PluginTabHandle = { + refresh?: () => Promise | void; +}; + type ElasticsearchJsonResponsePanelHandle = { focusSearch: () => boolean; }; @@ -323,6 +327,8 @@ const consulOverviewRef = ref<{ refresh?: () => boolean }>(); const consulWorkspaceRef = ref(); const databaseBrowserRef = ref(); const objectBrowserRef = ref(); +const pluginWorkbenchRef = ref(); +const pluginFilesystemRef = ref(); const activeTableMeta = computed(() => props.activeTab.tableMeta); const activeDataTabTableMeta = computed(() => tableMetaForDataTab(props.activeTab)); const activeResultExecutionTarget = computed(() => queryStore.activeResultExecutionTarget(props.activeTab.id)); @@ -961,6 +967,12 @@ function refreshData(): boolean { if (props.activeTab.mode === "consul-overview") return consulOverviewRef.value?.refresh?.() ?? false; if (props.activeTab.mode === "consul") return consulWorkspaceRef.value?.refresh?.() ?? false; if (props.activeTab.mode === "databases") return databaseBrowserRef.value?.refresh?.() ?? false; + if (props.activeTab.mode === "plugin-workbench" || props.activeTab.mode === "plugin-filesystem") { + const pluginTab = props.activeTab.mode === "plugin-workbench" ? pluginWorkbenchRef.value : pluginFilesystemRef.value; + if (!pluginTab?.refresh) return false; + void pluginTab.refresh(); + return true; + } // Restored data tabs intentionally omit row data, so refresh must work before DataGrid mounts. if (canReloadUnavailableDataTab(props.activeTab)) { reloadUnavailableDataTab(); @@ -1186,6 +1198,7 @@ function handleModRTarget(target: Element): boolean { if (target.closest("[data-cell-detail-editor-root]")) return dataGridRef.value?.openCellDetailSearch() ?? false; if (target.closest("[data-grid-root], [data-elasticsearch-json-response-root]")) return refreshData(); if (canReloadUnavailableDataTab(props.activeTab)) return refreshData(); + if (props.activeTab.mode === "plugin-workbench" || props.activeTab.mode === "plugin-filesystem") return refreshData(); return false; } @@ -2527,13 +2540,14 @@ defineExpose({