25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
fix(desktop): respect table tab reuse policy on editor table click
rihkddd04580355d032
diff --git a/apps/desktop/src/App.vue b/apps/desktop/src/App.vueindex 057bfb3f82..a9ef3af5e3 100644--- a/apps/desktop/src/App.vue+++ b/apps/desktop/src/App.vue@@ -1709,7 +1709,7 @@ async function onClickTable(table: SqlObjectNavigationTarget) {return;}try {- await openTableTarget(target, { tableInfoTab: "ddl" });+ await openObjectBrowserTableTarget(target);} catch (e: any) {toast(t("connection.connectFailed", { message: translateBackendError(t, e) }), 5000);}@@ -1719,7 +1719,7 @@ async function onViewTableData(table: SqlObjectNavigationTarget) {const target = tableTargetFromActiveTab(table);if (!target) return;try {- await openTableTarget(target);+ await openObjectBrowserTableTarget(target);} catch (e: any) {toast(t("connection.connectFailed", { message: translateBackendError(t, e) }), 5000);}diff --git a/apps/desktop/src/composables/__tests__/useNavigationTargets.store.spec.ts b/apps/desktop/src/composables/__tests__/useNavigationTargets.store.spec.tsindex ead9fb769d..d6ed1ff13a 100644--- a/apps/desktop/src/composables/__tests__/useNavigationTargets.store.spec.ts+++ b/apps/desktop/src/composables/__tests__/useNavigationTargets.store.spec.ts@@ -217,6 +217,20 @@ describe("useNavigationTargets with the real query store", () => {expect(queryStore.activeTabId).toBe(sidebarTabId);});+ it("reuses existing table tab when navigating via object browser target in same-table mode", async () => {+ mocks.settingsStore.editorSettings.dataTabReuseMode = "same-table";+ const { navigation, queryStore } = await setupNavigation();+ const target = { connectionId: "connection-1", database: "app", schema: "public", tableName: "users", tableType: "TABLE" };++ await navigation.openObjectBrowserTableTarget(target);+ const firstTabId = queryStore.activeTabId;++ await navigation.openObjectBrowserTableTarget(target);++ expect(queryStore.tabs).toHaveLength(1);+ expect(queryStore.activeTabId).toBe(firstTabId);+ });+it("reuses a restored legacy MySQL tab when the same table is opened from the sidebar", async () => {mocks.connectionStore.getConfig.mockImplementation((connectionId: string) => ({ id: connectionId, db_type: "mysql" }));mocks.loadOpenTabsState.mockResolvedValue({