diff --git a/apps/desktop/src/components/layout/UpdateDialog.spec.ts b/apps/desktop/src/components/layout/UpdateDialog.spec.ts index 79b060b0c2..aa97c51e59 100644 --- a/apps/desktop/src/components/layout/UpdateDialog.spec.ts +++ b/apps/desktop/src/components/layout/UpdateDialog.spec.ts @@ -380,6 +380,26 @@ describe("UpdateDialog release notes safety", () => { }); describe("UpdateDialog aggregate update center", () => { + it("hides the tab bar when no updates are available", async () => { + await mountDialog(0, {}, undefined, { + updateInfo: { + current_version: "0.5.60", + latest_version: "0.5.60", + update_available: false, + portable_mode: false, + manual_update_only: false, + release_name: "", + release_url: "", + release_notes: "", + }, + updateCheckMessage: "DBX is up to date (0.5.60).", + }); + + expect(document.body.querySelector('[role="tablist"]')).toBeNull(); + expect(document.body.querySelector('[data-update-tab="app"]')).toBeNull(); + expect(document.body.textContent).toContain("DBX is up to date (0.5.60)."); + }); + it("keeps the client restart gated while update all is still updating components", async () => { await mountDialog(0, { updateDownloaded: true, downloadProgress: 100 }, undefined, { isUpdatingAll: true }); diff --git a/apps/desktop/src/components/layout/UpdateDialog.vue b/apps/desktop/src/components/layout/UpdateDialog.vue index 346c175e00..2e9c12bb2c 100644 --- a/apps/desktop/src/components/layout/UpdateDialog.vue +++ b/apps/desktop/src/components/layout/UpdateDialog.vue @@ -83,7 +83,7 @@ const tabs = computed(() => { if (props.jdbcUpdate?.update_available) available.push({ id: "jdbc", label: t("settings.updateJdbc"), count: 1 }); if (mcpAvailable.value) available.push({ id: "mcp", label: t("settings.updateMcp"), count: 1 }); if (props.pluginUpdates.length) available.push({ id: "plugins", label: t("settings.updatePlugins"), count: props.pluginUpdates.length }); - return available.length ? available : [{ id: "app" as const, label: t("settings.updateClient"), count: 0 }]; + return available; }); const totalUpdateCount = computed(() => tabs.value.reduce((total, tab) => total + tab.count, 0)); const hasComponentUpdates = computed(() => props.driverUpdates.length > 0 || props.jdbcUpdate?.update_available === true || mcpAvailable.value || props.pluginUpdates.length > 0); @@ -193,7 +193,7 @@ watch(