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
refactor(sidebar): remove auto-expand-on-connect setting (#13614)
zipg556c8899b862
diff --git a/apps/desktop/src/components/editor/EditorSettingsDialog.vue b/apps/desktop/src/components/editor/EditorSettingsDialog.vueindex dc89718e02..6666aa8539 100644--- a/apps/desktop/src/components/editor/EditorSettingsDialog.vue+++ b/apps/desktop/src/components/editor/EditorSettingsDialog.vue@@ -986,7 +986,6 @@ const editSidebarSearchOpenedDatabasesOnly = ref(settingsStore.editorSettings.siconst editAutoSelectActiveSidebarNode = ref(settingsStore.editorSettings.autoSelectActiveSidebarNode);const editSidebarPinDefaultDatabase = ref(settingsStore.editorSettings.sidebarPinDefaultDatabase);const editSidebarBrowseObjectsOnDatabaseActivation = ref(settingsStore.editorSettings.sidebarBrowseObjectsOnDatabaseActivation);-const editSidebarExpandTreeOnConnect = ref(settingsStore.editorSettings.sidebarExpandTreeOnConnect);const editOpenTabsRestoreMode = ref<OpenTabsRestoreMode>(settingsStore.editorSettings.openTabsRestoreMode);const editAutoReloadRestoredDataTabsOnOpen = ref(settingsStore.editorSettings.autoReloadRestoredDataTabsOnOpen);const editDisconnectTabHandlingMode = ref<DisconnectTabHandlingMode>(settingsStore.editorSettings.disconnectTabHandlingMode);@@ -1321,7 +1320,6 @@ function currentEditorSettingsDraft(): EditorSettingsDraft {autoSelectActiveSidebarNode: editAutoSelectActiveSidebarNode.value,sidebarPinDefaultDatabase: editSidebarPinDefaultDatabase.value,sidebarBrowseObjectsOnDatabaseActivation: editSidebarBrowseObjectsOnDatabaseActivation.value,- sidebarExpandTreeOnConnect: editSidebarExpandTreeOnConnect.value,openTabsRestoreMode: editOpenTabsRestoreMode.value,autoReloadRestoredDataTabsOnOpen: editAutoReloadRestoredDataTabsOnOpen.value,disconnectTabHandlingMode: editDisconnectTabHandlingMode.value,@@ -2030,7 +2028,6 @@ function syncEditorSettingsDraftFromStore() {editAutoSelectActiveSidebarNode.value = settingsStore.editorSettings.autoSelectActiveSidebarNode;editSidebarPinDefaultDatabase.value = settingsStore.editorSettings.sidebarPinDefaultDatabase;editSidebarBrowseObjectsOnDatabaseActivation.value = settingsStore.editorSettings.sidebarBrowseObjectsOnDatabaseActivation;- editSidebarExpandTreeOnConnect.value = settingsStore.editorSettings.sidebarExpandTreeOnConnect;editOpenTabsRestoreMode.value = settingsStore.editorSettings.openTabsRestoreMode;editAutoReloadRestoredDataTabsOnOpen.value = settingsStore.editorSettings.autoReloadRestoredDataTabsOnOpen;editDisconnectTabHandlingMode.value = settingsStore.editorSettings.disconnectTabHandlingMode;@@ -2207,7 +2204,6 @@ const editorSettingsDraftRefs: EditorSettingsDraftRefMap = {autoSelectActiveSidebarNode: editAutoSelectActiveSidebarNode,sidebarPinDefaultDatabase: editSidebarPinDefaultDatabase,sidebarBrowseObjectsOnDatabaseActivation: editSidebarBrowseObjectsOnDatabaseActivation,- sidebarExpandTreeOnConnect: editSidebarExpandTreeOnConnect,openTabsRestoreMode: editOpenTabsRestoreMode,autoReloadRestoredDataTabsOnOpen: editAutoReloadRestoredDataTabsOnOpen,disconnectTabHandlingMode: editDisconnectTabHandlingMode,@@ -2804,7 +2800,6 @@ function resetDefaultsForTab(tab: SettingsCategory) {editAutoSelectActiveSidebarNode.value = DEFAULT_EDITOR_SETTINGS.autoSelectActiveSidebarNode;editSidebarPinDefaultDatabase.value = DEFAULT_EDITOR_SETTINGS.sidebarPinDefaultDatabase;editSidebarBrowseObjectsOnDatabaseActivation.value = DEFAULT_EDITOR_SETTINGS.sidebarBrowseObjectsOnDatabaseActivation;- editSidebarExpandTreeOnConnect.value = DEFAULT_EDITOR_SETTINGS.sidebarExpandTreeOnConnect;editOpenTabsRestoreMode.value = DEFAULT_EDITOR_SETTINGS.openTabsRestoreMode;editAutoReloadRestoredDataTabsOnOpen.value = DEFAULT_EDITOR_SETTINGS.autoReloadRestoredDataTabsOnOpen;editDisconnectTabHandlingMode.value = DEFAULT_EDITOR_SETTINGS.disconnectTabHandlingMode;@@ -3033,7 +3028,6 @@ function resetAllDefaults() {editAutoSelectActiveSidebarNode.value = DEFAULT_EDITOR_SETTINGS.autoSelectActiveSidebarNode;editSidebarPinDefaultDatabase.value = DEFAULT_EDITOR_SETTINGS.sidebarPinDefaultDatabase;editSidebarBrowseObjectsOnDatabaseActivation.value = DEFAULT_EDITOR_SETTINGS.sidebarBrowseObjectsOnDatabaseActivation;- editSidebarExpandTreeOnConnect.value = DEFAULT_EDITOR_SETTINGS.sidebarExpandTreeOnConnect;editOpenTabsRestoreMode.value = DEFAULT_EDITOR_SETTINGS.openTabsRestoreMode;editAutoReloadRestoredDataTabsOnOpen.value = DEFAULT_EDITOR_SETTINGS.autoReloadRestoredDataTabsOnOpen;editDisconnectTabHandlingMode.value = DEFAULT_EDITOR_SETTINGS.disconnectTabHandlingMode;@@ -9378,15 +9372,6 @@ onUnmounted(() => {</div><Switch id="sidebar-pin-default-database" v-model="editSidebarPinDefaultDatabase" /></div>- <div class="settings-item flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">- <div class="flex items-center gap-2">- <Label for="sidebar-expand-tree-on-connect">{{ t("settings.sidebarExpandTreeOnConnect") }}</Label>- <HelpTooltip :label="t('settings.sidebarExpandTreeOnConnect')">- {{ t("settings.sidebarExpandTreeOnConnectDescription") }}- </HelpTooltip>- </div>- <Switch id="sidebar-expand-tree-on-connect" v-model="editSidebarExpandTreeOnConnect" />- </div><div class="settings-item space-y-2 rounded-md border bg-muted/20 px-3 py-2"><div class="flex items-center gap-2"><Label for="open-tabs-restore-mode">{{ t("settings.openTabsRestoreMode") }}</Label>diff --git a/apps/desktop/src/components/sidebar/__tests__/SidebarTreeRuntimeHost.expansion.spec.ts b/apps/desktop/src/components/sidebar/__tests__/SidebarTreeRuntimeHost.expansion.spec.tsindex a9c22813bd..005cbe5126 100644--- a/apps/desktop/src/components/sidebar/__tests__/SidebarTreeRuntimeHost.expansion.spec.ts+++ b/apps/desktop/src/components/sidebar/__tests__/SidebarTreeRuntimeHost.expansion.spec.ts@@ -1379,7 +1379,7 @@ describe("SidebarTreeRuntimeHost expansion", () => {connectionStore.treeNodes = [connectionNode];connectionStore.loadDatabases = vi.fn(async () => {- // Loader attaches children but does not auto-expand the node in this harness.+ // This harness stubs the loader, so it only attaches children; the shared toggle path must still set expansion.connectionNode.children = [databaseNode];});@@ -1475,9 +1475,9 @@ describe("SidebarTreeRuntimeHost expansion", () => {});// #13579: the manual-expansion regression hit every connection type, not just- // SQL engines. Each loader below attaches children without auto-expanding the- // node (the switch is off for this harness), so the shared toggle path must- // expand the connection node itself.+ // SQL engines. The store loaders now always expand after loading, but this+ // harness stubs each loader, so children arrive without pre-set isExpanded and+ // the shared toggle path must still expand the connection node itself.it.each([{ dbType: "redis", loader: "loadRedisDatabases" as const, childType: "redis-db" as const },{ dbType: "mongodb", loader: "loadMongoDatabases" as const, childType: "mongo-db" as const },diff --git a/apps/desktop/src/i18n/locales/az.ts b/apps/desktop/src/i18n/locales/az.tsindex 62b659bb3a..2de375656b 100644--- a/apps/desktop/src/i18n/locales/az.ts+++ b/apps/desktop/src/i18n/locales/az.ts@@ -7947,8 +7947,6 @@ export default withEnglishFallback({sidebarPinDefaultDatabaseDescription: "Aktiv olduqda, varsayılan verilənlər bazası siyahının yuxarısında göstərilir. Deaktiv olduqda, əlifba sırası ilə düzülür.",sidebarBrowseObjectsOnDatabaseActivation: "Verilənlər bazası aktivləşdirildikdə obyektlərə bax",sidebarBrowseObjectsOnDatabaseActivationDescription: 'Aktiv olduqda, seçilmiş tək və ya ikiqat klik rejimi ilə verilənlər bazası və ya sxem düyününün aktivləşdirilməsi "Obyektlərə bax" vərəqini də açır.',- sidebarExpandTreeOnConnect: "Qoşulmadan sonra obyekt ağacını aç",- sidebarExpandTreeOnConnectDescription: "Aktiv olanda uğurlu qoşulma yan paneldə qoşulma və standart verilənlər bazası düyünlərini avtomatik açır; deaktiv olanda düyünləri əl ilə açırsınız. Çoxsaylı sxemli bazalar üçün söndürün.",openTabsRestoreMode: "Başladıqda vərəqləri bərpa et",openTabsRestoreModeDescription: "DBX-in sonuncu dəfə açıq olan vərəqləri necə bərpa edəcəyini seçin.",openTabsRestoreModeAll: "Bütün vərəqləri saxla",diff --git a/apps/desktop/src/i18n/locales/en.ts b/apps/desktop/src/i18n/locales/en.tsindex 56c4562e4e..b7291dd37b 100644--- a/apps/desktop/src/i18n/locales/en.ts+++ b/apps/desktop/src/i18n/locales/en.ts@@ -10379,8 +10379,6 @@ export default {sidebarPinDefaultDatabaseDescription: "When enabled, the default database appears at the top of the database list. When disabled, it is sorted alphabetically.",sidebarBrowseObjectsOnDatabaseActivation: "Browse objects when activating a database",sidebarBrowseObjectsOnDatabaseActivationDescription: 'When enabled, activating a database or schema node using the selected single- or double-click mode also opens the "Browse Objects" tab.',- sidebarExpandTreeOnConnect: "Expand object tree after connecting",- sidebarExpandTreeOnConnectDescription: "When enabled, a successful connection automatically expands the connection and its default database in the sidebar; when disabled, expand nodes manually. Turn off for databases with many schemas to avoid the cost of expanding everything at once.",openTabsRestoreMode: "Restore tabs on launch",openTabsRestoreModeDescription: "Choose how DBX restores tabs that were open last time.",openTabsRestoreModeAll: "Keep all tabs",diff --git a/apps/desktop/src/i18n/locales/es.ts b/apps/desktop/src/i18n/locales/es.tsindex 003d6936bb..a4d665a01b 100644--- a/apps/desktop/src/i18n/locales/es.ts+++ b/apps/desktop/src/i18n/locales/es.ts@@ -9166,8 +9166,6 @@ export default withEnglishFallback({sidebarPinDefaultDatabaseDescription: "Cuando está habilitado, la base de datos predeterminada se muestra en la parte superior de la lista. Cuando está deshabilitado, se ordena alfabéticamente.",sidebarBrowseObjectsOnDatabaseActivation: "Explorar objetos al activar una base de datos",sidebarBrowseObjectsOnDatabaseActivationDescription: 'Si está activado, al activar un nodo de base de datos o esquema con el modo seleccionado de uno o dos clics también se abre la pestaña "Explorar objetos".',- sidebarExpandTreeOnConnect: "Expandir el árbol de objetos al conectar",- sidebarExpandTreeOnConnectDescription: "Si está activado, una conexión correcta expande automáticamente la conexión y su base de datos predeterminada en la barra lateral; si está desactivado, expanda los nodos manualmente. Desactívelo en bases de datos con muchos esquemas.",openTabsRestoreMode: "Restaurar pestañas al iniciar",openTabsRestoreModeDescription: "Elige cómo DBX restaura las pestañas que estaban abiertas la última vez.",openTabsRestoreModeAll: "Conservar todas las pestañas",diff --git a/apps/desktop/src/i18n/locales/id.ts b/apps/desktop/src/i18n/locales/id.tsindex a952923347..f288894127 100644--- a/apps/desktop/src/i18n/locales/id.ts+++ b/apps/desktop/src/i18n/locales/id.ts@@ -8700,8 +8700,6 @@ export default withEnglishFallback({sidebarPinDefaultDatabaseDescription: "Saat diaktifkan, database default akan muncul di bagian atas daftar database. Saat dinonaktifkan, akan diurutkan berdasarkan abjad.",sidebarBrowseObjectsOnDatabaseActivation: "Jelajahi objek saat mengaktifkan database",sidebarBrowseObjectsOnDatabaseActivationDescription: 'Jika diaktifkan, mengaktifkan node database atau skema menggunakan mode klik tunggal atau ganda yang dipilih juga membuka tab "Jelajahi Objek".',- sidebarExpandTreeOnConnect: "Perluas pohon objek setelah terhubung",- sidebarExpandTreeOnConnectDescription: "Saat diaktifkan, koneksi yang berhasil otomatis memperluas node koneksi dan database bawaan di bilah samping; saat dinonaktifkan, perluas node secara manual. Matikan untuk database dengan banyak skema.",openTabsRestoreMode: "Pulihkan tab saat peluncuran",openTabsRestoreModeDescription: "Pilih bagaimana DBX memulihkan tab yang terbuka terakhir kali.",openTabsRestoreModeAll: "Simpan semua tab",diff --git a/apps/desktop/src/i18n/locales/it.ts b/apps/desktop/src/i18n/locales/it.tsindex 665ba8050f..f071247810 100644--- a/apps/desktop/src/i18n/locales/it.ts+++ b/apps/desktop/src/i18n/locales/it.ts@@ -8944,8 +8944,6 @@ export default withEnglishFallback({sidebarPinDefaultDatabaseDescription: "Se abilitato, il database predefinito viene mostrato in cima all'elenco dei database. Se disabilitato, viene ordinato alfabeticamente.",sidebarBrowseObjectsOnDatabaseActivation: "Esplora oggetti all'attivazione di un database",sidebarBrowseObjectsOnDatabaseActivationDescription: "Se abilitato, l'attivazione di un nodo database o schema con la modalità a clic singolo o doppio selezionata apre anche la scheda «Esplora oggetti».",- sidebarExpandTreeOnConnect: "Espandi l'albero degli oggetti dopo la connessione",- sidebarExpandTreeOnConnectDescription: "Se abilitato, una connessione riuscita espande automaticamente la connessione e il database predefinito nella barra laterale; se disabilitato, espandi i nodi manualmente. Disattivare per database con molti schemi.",openTabsRestoreMode: "Ripristina schede all'avvio",openTabsRestoreModeDescription: "Scegli come DBX ripristina le schede aperte l'ultima volta.",openTabsRestoreModeAll: "Mantieni tutte le schede",diff --git a/apps/desktop/src/i18n/locales/ja.ts b/apps/desktop/src/i18n/locales/ja.tsindex c9e1aa1b98..a60dec64e5 100644--- a/apps/desktop/src/i18n/locales/ja.ts+++ b/apps/desktop/src/i18n/locales/ja.ts@@ -8948,8 +8948,6 @@ export default withEnglishFallback({sidebarPinDefaultDatabaseDescription: "有効にすると、デフォルトデータベースがデータベース一覧の先頭に固定されます。無効にすると、アルファベット順に並べ替えられます。",sidebarBrowseObjectsOnDatabaseActivation: "データベースノードのアクティブ化時にオブジェクトを参照",sidebarBrowseObjectsOnDatabaseActivationDescription: "有効にすると、選択したシングルクリックまたはダブルクリック方式でデータベースまたはスキーマノードをアクティブ化した際に、サイドバーを展開すると同時に「オブジェクトを参照」タブを開きます。",- sidebarExpandTreeOnConnect: "接続後にオブジェクトツリーを展開",- sidebarExpandTreeOnConnectDescription: "有効にすると、接続成功後にサイドバーの接続ノードと既定のデータベースノードを自動的に展開します。無効にした場合は手動で展開します。スキーマが多いデータベースではオフを推奨します。",openTabsRestoreMode: "起動時にタブを復元",openTabsRestoreModeDescription: "DBX 起動時に前回開いていたタブをどのように復元するかを選択します。",openTabsRestoreModeAll: "すべてのタブを保持",diff --git a/apps/desktop/src/i18n/locales/ko.ts b/apps/desktop/src/i18n/locales/ko.tsindex 09b3258206..7a6408e6be 100644--- a/apps/desktop/src/i18n/locales/ko.ts+++ b/apps/desktop/src/i18n/locales/ko.ts@@ -9066,8 +9066,6 @@ export default withEnglishFallback({sidebarPinDefaultDatabaseDescription: "활성화하면 기본 데이터베이스가 데이터베이스 목록 상단에 고정 표시됩니다. 비활성화하면 알파벳순으로 정렬됩니다.",sidebarBrowseObjectsOnDatabaseActivation: "데이터베이스 노드 활성화 시 객체 탐색",sidebarBrowseObjectsOnDatabaseActivationDescription: '활성화하면 선택한 한 번 클릭 또는 두 번 클릭 방식으로 데이터베이스나 스키마 노드를 활성화할 때 사이드바를 펼치면서 "객체 탐색" 탭을 엽니다.',- sidebarExpandTreeOnConnect: "연결 후 객체 트리 펼치기",- sidebarExpandTreeOnConnectDescription: "활성화하면 연결 성공 후 사이드바에서 연결 노드와 기본 데이터베이스 노드를 자동으로 펼칩니다. 비활성화하면 수동으로 펼칩니다. 스키마가 많은 데이터베이스는 끄는 것을 권장합니다.",openTabsRestoreMode: "실행 시 탭 복원",openTabsRestoreModeDescription: "DBX가 지난번에 열려 있던 탭을 복원하는 방법을 선택하세요.",openTabsRestoreModeAll: "모든 탭 유지",diff --git a/apps/desktop/src/i18n/locales/pl.ts b/apps/desktop/src/i18n/locales/pl.tsindex c64a41c389..95b0a50daf 100644--- a/apps/desktop/src/i18n/locales/pl.ts+++ b/apps/desktop/src/i18n/locales/pl.ts@@ -8765,8 +8765,6 @@ export default withEnglishFallback({sidebarPinDefaultDatabaseDescription: "Gdy włączone, domyślna baza danych pojawia się na samej górze listy. Gdy wyłączone, jest sortowana alfabetycznie.",sidebarBrowseObjectsOnDatabaseActivation: "Przeglądaj obiekty po aktywacji bazy danych",sidebarBrowseObjectsOnDatabaseActivationDescription: "Gdy włączone, aktywacja węzła bazy danych lub schematu wybranym trybem pojedynczego/podwójnego kliknięcia otwiera również kartę „Przeglądaj obiekty”.",- sidebarExpandTreeOnConnect: "Rozwijaj drzewo obiektów po połączeniu",- sidebarExpandTreeOnConnectDescription: "Gdy włączone, udane połączenie automatycznie rozwija połączenie i jego domyślną bazę danych na pasku bocznym; gdy wyłączone, rozwijaj węzły ręcznie. Wyłącz dla baz danych z wieloma schematami.",openTabsRestoreMode: "Przywracanie kart przy uruchomieniu",openTabsRestoreModeDescription: "Wybierz, w jaki sposób DBX przywraca karty otwarte podczas poprzedniej sesji.",openTabsRestoreModeAll: "Zachowaj wszystkie karty",diff --git a/apps/desktop/src/i18n/locales/pt-BR.ts b/apps/desktop/src/i18n/locales/pt-BR.tsindex 99e907f05c..d9b4d952ce 100644--- a/apps/desktop/src/i18n/locales/pt-BR.ts+++ b/apps/desktop/src/i18n/locales/pt-BR.ts@@ -8943,8 +8943,6 @@ export default withEnglishFallback({sidebarPinDefaultDatabaseDescription: "Quando ativado, o banco de dados padrão aparece no topo da lista de bancos de dados. Quando desativado, é ordenado em ordem alfabética.",sidebarBrowseObjectsOnDatabaseActivation: "Explorar objetos ao ativar um banco de dados",sidebarBrowseObjectsOnDatabaseActivationDescription: 'Quando ativado, ativar um nó de banco de dados ou esquema com o modo selecionado de clique simples ou duplo também abre a aba "Explorar Objetos".',- sidebarExpandTreeOnConnect: "Expandir a árvore de objetos após conectar",- sidebarExpandTreeOnConnectDescription: "Quando ativado, uma conexão bem-sucedida expande automaticamente a conexão e o banco de dados padrão na barra lateral; quando desativado, expanda os nós manualmente. Desative em bancos de dados com muitos esquemas.",openTabsRestoreMode: "Restaurar abas ao iniciar",openTabsRestoreModeDescription: "Escolha como o DBX restaura as abas que estavam abertas na última vez.",openTabsRestoreModeAll: "Manter todas as abas",diff --git a/apps/desktop/src/i18n/locales/ru.ts b/apps/desktop/src/i18n/locales/ru.tsindex 5589f5db3b..d93f7bb941 100644--- a/apps/desktop/src/i18n/locales/ru.ts+++ b/apps/desktop/src/i18n/locales/ru.ts@@ -10520,8 +10520,6 @@ export default withEnglishFallback({sidebarPinDefaultDatabaseDescription: "Если включено, база данных по умолчанию отображается в начале списка. Если отключено, она сортируется по алфавиту.",sidebarBrowseObjectsOnDatabaseActivation: "Просматривать объекты при активации базы данных",sidebarBrowseObjectsOnDatabaseActivationDescription: "Если включено, активация узла базы данных или схемы выбранным режимом (один или двойной клик) также открывает вкладку «Просмотр объектов».",- sidebarExpandTreeOnConnect: "Разворачивать дерево объектов после подключения",- sidebarExpandTreeOnConnectDescription: "Если включено, после успешного подключения соединение и его база данных по умолчанию автоматически разворачиваются на боковой панели; если выключено, разворачивайте узлы вручную. Отключите для баз данных с большим числом схем.",openTabsRestoreMode: "Восстанавливать вкладки при запуске",openTabsRestoreModeDescription: "Выберите, как DBX восстанавливает вкладки, открытые в прошлый раз.",openTabsRestoreModeAll: "Сохранять все вкладки",diff --git a/apps/desktop/src/i18n/locales/th.ts b/apps/desktop/src/i18n/locales/th.tsindex aecb19b691..4d8e8d0ae4 100644--- a/apps/desktop/src/i18n/locales/th.ts+++ b/apps/desktop/src/i18n/locales/th.ts@@ -10912,8 +10912,6 @@ export default withEnglishFallback({sidebarPinDefaultDatabaseDescription: "เมื่อเปิดใช้ ฐานข้อมูลเริ่มต้นจะแสดงด้านบนสุดของรายการฐานข้อมูล เมื่อปิดจะเรียงตามตัวอักษร",sidebarBrowseObjectsOnDatabaseActivation: "เรียกดูออบเจ็กต์เมื่อเปิดใช้ฐานข้อมูล",sidebarBrowseObjectsOnDatabaseActivationDescription: "เมื่อเปิดใช้ การเปิดโหนดฐานข้อมูลหรือ Schema ด้วยโหมดคลิกเดียวหรือดับเบิลคลิกที่เลือก จะเปิดแท็บ Browse Objects ด้วย",- sidebarExpandTreeOnConnect: "ขยายแผนผังออบเจ็กต์หลังเชื่อมต่อ",- sidebarExpandTreeOnConnectDescription: "เมื่อเปิดใช้ การเชื่อมต่อสำเร็จจะขยายโหนดการเชื่อมต่อและฐานข้อมูลเริ่มต้นในแถบด้านข้างโดยอัตโนมัติ; เมื่อปิดใช้ ต้องขยายโหนดด้วยตนเอง แนะนำให้ปิดสำหรับฐานข้อมูลที่มี Schema จำนวนมาก",openTabsRestoreMode: "กู้คืนแท็บเมื่อเปิดแอป",openTabsRestoreModeDescription: "เลือกวิธีที่ DBX กู้คืนแท็บที่เปิดไว้ครั้งล่าสุด",openTabsRestoreModeAll: "เก็บแท็บทั้งหมด",diff --git a/apps/desktop/src/i18n/locales/tr.ts b/apps/desktop/src/i18n/locales/tr.tsindex 412669a842..e736ff586f 100644--- a/apps/desktop/src/i18n/locales/tr.ts+++ b/apps/desktop/src/i18n/locales/tr.ts@@ -7830,8 +7830,6 @@ export default withEnglishFallback({sidebarPinDefaultDatabaseDescription: "Etkinleştirildiğinde, varsayılan veritabanı veritabanı listesinin en üstünde görüntülenir. Devre dışı bırakıldığında alfabetik olarak sıralanır.",sidebarBrowseObjectsOnDatabaseActivation: "Veritabanı etkinleştirilirken nesnelere gözat",sidebarBrowseObjectsOnDatabaseActivationDescription: 'Etkinleştirildiğinde, seçili tek veya çift tıklama moduyla bir veritabanı ya da şema düğümünü etkinleştirmek "Nesnelere Gözat" sekmesini de açar.',- sidebarExpandTreeOnConnect: "Bağlandıktan sonra nesne ağacını genişlet",- sidebarExpandTreeOnConnectDescription: "Etkinleştirildiğinde başarılı bir bağlantı, kenar çubuğunda bağlantıyı ve varsayılan veritabanını otomatik olarak genişletir; devre dışı bırakıldığında düğümleri elle genişletirsiniz. Şeması çok olan veritabanları için kapatın.",openTabsRestoreMode: "Açılışta sekmeleri geri yükle",openTabsRestoreModeDescription: "DBX'in en son açık olan sekmeleri nasıl geri yükleyeceğini seçin.",openTabsRestoreModeAll: "Tüm sekmeleri koru",diff --git a/apps/desktop/src/i18n/locales/zh-CN.ts b/apps/desktop/src/i18n/locales/zh-CN.tsindex 9bffeebf7f..88974972de 100644--- a/apps/desktop/src/i18n/locales/zh-CN.ts+++ b/apps/desktop/src/i18n/locales/zh-CN.ts@@ -10346,8 +10346,6 @@ export default withEnglishFallback({sidebarPinDefaultDatabaseDescription: "开启后,默认数据库在数据库列表中置顶显示;关闭后按字母正常排序。",sidebarBrowseObjectsOnDatabaseActivation: "激活数据库节点时浏览对象",sidebarBrowseObjectsOnDatabaseActivationDescription: "开启后,按照所选的单击或双击激活方式操作数据库或模式节点时,会同时展开侧边栏并打开“浏览对象”标签页。",- sidebarExpandTreeOnConnect: "连接后自动展开对象树",- sidebarExpandTreeOnConnectDescription: "开启后,连接成功会自动展开侧边栏里的连接与默认数据库节点;关闭后需要手动逐层展开。模式较多的库建议关闭,避免全量展开造成卡顿。",openTabsRestoreMode: "启动时恢复标签页",openTabsRestoreModeDescription: "选择 DBX 启动时如何恢复上次打开的标签页。",openTabsRestoreModeAll: "保留所有标签",diff --git a/apps/desktop/src/i18n/locales/zh-TW.ts b/apps/desktop/src/i18n/locales/zh-TW.tsindex 7e5d57b6f3..f313e824c7 100644--- a/apps/desktop/src/i18n/locales/zh-TW.ts+++ b/apps/desktop/src/i18n/locales/zh-TW.ts@@ -8067,8 +8067,6 @@ export default withEnglishFallback({sidebarPinDefaultDatabaseDescription: "開啟後,預設資料庫在資料庫清單中置頂顯示;關閉後依字母正常排序。",sidebarBrowseObjectsOnDatabaseActivation: "啟用資料庫節點時瀏覽物件",sidebarBrowseObjectsOnDatabaseActivationDescription: "開啟後,依照所選的單擊或雙擊啟用方式操作資料庫或結構描述節點時,會同時展開側邊欄並開啟「瀏覽物件」分頁。",- sidebarExpandTreeOnConnect: "連線後自動展開物件樹",- sidebarExpandTreeOnConnectDescription: "開啟後,連線成功會自動展開側邊欄裡的連線與預設資料庫節點;關閉後需要手動逐層展開。結構描述較多的資料庫建議關閉,避免全量展開造成卡頓。",openTabsRestoreMode: "啟動時還原分頁",openTabsRestoreModeDescription: "選擇 DBX 啟動時如何還原上次開啟的分頁。",openTabsRestoreModeAll: "保留所有分頁",diff --git a/apps/desktop/src/lib/settings/editorSettingsDraft.ts b/apps/desktop/src/lib/settings/editorSettingsDraft.tsindex a3ffd9edef..11101e089c 100644--- a/apps/desktop/src/lib/settings/editorSettingsDraft.ts+++ b/apps/desktop/src/lib/settings/editorSettingsDraft.ts@@ -122,7 +122,6 @@ export const EDITOR_SETTINGS_DRAFT_KEYS = ["autoSelectActiveSidebarNode","sidebarPinDefaultDatabase","sidebarBrowseObjectsOnDatabaseActivation",- "sidebarExpandTreeOnConnect","openTabsRestoreMode","autoReloadRestoredDataTabsOnOpen","disconnectTabHandlingMode",diff --git a/apps/desktop/src/lib/settings/settingsSearch.ts b/apps/desktop/src/lib/settings/settingsSearch.tsindex 96c903b43b..909767e92a 100644--- a/apps/desktop/src/lib/settings/settingsSearch.ts+++ b/apps/desktop/src/lib/settings/settingsSearch.ts@@ -378,7 +378,6 @@ export const SETTINGS_SEARCH_DEFINITIONS: readonly SettingsSearchDefinition[] ={ id: "navigation-active-node", category: "navigation", titleKey: "settings.autoSelectActiveSidebarNode", descriptionKey: "settings.autoSelectActiveSidebarNodeDescription", targetId: "navigation" },{ id: "navigation-sidebar-pin-default-database", category: "navigation", titleKey: "settings.sidebarPinDefaultDatabase", descriptionKey: "settings.sidebarPinDefaultDatabaseDescription", targetId: "navigation" },{ id: "navigation-browse-objects-on-database-activation", category: "navigation", titleKey: "settings.sidebarBrowseObjectsOnDatabaseActivation", descriptionKey: "settings.sidebarBrowseObjectsOnDatabaseActivationDescription", targetId: "navigation" },- { id: "navigation-expand-tree-on-connect", category: "navigation", titleKey: "settings.sidebarExpandTreeOnConnect", descriptionKey: "settings.sidebarExpandTreeOnConnectDescription", targetId: "navigation" },{id: "navigation-tabs-restore",category: "navigation",diff --git a/apps/desktop/src/lib/settings/settingsTransfer.ts b/apps/desktop/src/lib/settings/settingsTransfer.tsindex 7f6d92f79c..fda2670883 100644--- a/apps/desktop/src/lib/settings/settingsTransfer.ts+++ b/apps/desktop/src/lib/settings/settingsTransfer.ts@@ -202,7 +202,6 @@ const SETTINGS_TRANSFER_CATEGORY_KEYS: Record<SettingsTransferCategoryId, readon"autoSelectActiveSidebarNode","sidebarPinDefaultDatabase","sidebarBrowseObjectsOnDatabaseActivation",- "sidebarExpandTreeOnConnect","openTabsRestoreMode","autoReloadRestoredDataTabsOnOpen","disconnectTabHandlingMode",diff --git a/apps/desktop/src/stores/__tests__/connectionStore.databaseInfo.spec.ts b/apps/desktop/src/stores/__tests__/connectionStore.databaseInfo.spec.tsindex d5edfea88b..6bcd580f48 100644--- a/apps/desktop/src/stores/__tests__/connectionStore.databaseInfo.spec.ts+++ b/apps/desktop/src/stores/__tests__/connectionStore.databaseInfo.spec.ts@@ -276,8 +276,6 @@ describe("connectionStore database info", () => {const { useConnectionStore } = await import("@/stores/connectionStore");const { useSettingsStore } = await import("@/stores/settingsStore");- // 用例依赖连接节点自动展开后的树结构;#13302 把默认改为关闭后需显式开启。- useSettingsStore().editorSettings.sidebarExpandTreeOnConnect = true;const store = useConnectionStore();useSettingsStore().editorSettings.sidebarObjectDisplay = "simple";await store.addConnection(config);@@ -333,8 +331,6 @@ describe("connectionStore database info", () => {const { useConnectionStore } = await import("@/stores/connectionStore");const { useSettingsStore } = await import("@/stores/settingsStore");- // 用例依赖连接节点自动展开后的树结构;#13302 把默认改为关闭后需显式开启。- useSettingsStore().editorSettings.sidebarExpandTreeOnConnect = true;const store = useConnectionStore();useSettingsStore().editorSettings.sidebarObjectDisplay = "simple";await store.addConnection(config);@@ -390,8 +386,6 @@ describe("connectionStore database info", () => {const { useConnectionStore } = await import("@/stores/connectionStore");const { useSettingsStore } = await import("@/stores/settingsStore");- // 用例依赖连接节点自动展开后的树结构;#13302 把默认改为关闭后需显式开启。- useSettingsStore().editorSettings.sidebarExpandTreeOnConnect = true;const store = useConnectionStore();useSettingsStore().editorSettings.sidebarObjectDisplay = "simple";await store.addConnection(config);@@ -454,8 +448,6 @@ describe("connectionStore database info", () => {const { useConnectionStore } = await import("@/stores/connectionStore");const { useSettingsStore } = await import("@/stores/settingsStore");- // 用例依赖连接节点自动展开后的树结构;#13302 把默认改为关闭后需显式开启。- useSettingsStore().editorSettings.sidebarExpandTreeOnConnect = true;const store = useConnectionStore();useSettingsStore().editorSettings.sidebarObjectDisplay = "simple";await store.addConnection(config);diff --git a/apps/desktop/src/stores/__tests__/connectionStore.metadataLoading.spec.ts b/apps/desktop/src/stores/__tests__/connectionStore.metadataLoading.spec.tsindex 724c6ff166..baad8226ba 100644--- a/apps/desktop/src/stores/__tests__/connectionStore.metadataLoading.spec.ts+++ b/apps/desktop/src/stores/__tests__/connectionStore.metadataLoading.spec.ts@@ -606,9 +606,6 @@ describe("connectionStore metadata loading", () => {}, 10_000);it("does not collapse a connection whose normal root load is already in flight", async () => {- // 用例覆盖「连接后自动展开」路径;#13302 把默认改为关闭后需显式开启。- const { useSettingsStore } = await import("@/stores/settingsStore");- useSettingsStore().editorSettings.sidebarExpandTreeOnConnect = true;let resolveDatabases!: (databases: Array<{ name: string; comment: null }>) => void;let markListStarted!: () => void;const listStarted = new Promise<void>((resolve) => {@@ -3157,9 +3154,6 @@ describe("connectionStore metadata loading", () => {});it("finishes an expanding database when the connection refresh adds siblings", async () => {- // 用例覆盖「连接后自动展开」路径;#13302 把默认改为关闭后需显式开启。- const { useSettingsStore } = await import("@/stores/settingsStore");- useSettingsStore().editorSettings.sidebarExpandTreeOnConnect = true;let resolveSchemas!: (schemas: { name: string; comment: null }[]) => void;const listSchemaInfos = vi.fn(() =>@@ -5037,9 +5031,6 @@ describe("connectionStore metadata loading", () => {});it("expands the catalogless default database on open and refreshes it after saving a schema filter", async () => {- // 用例覆盖「连接后自动展开」路径;#13302 把默认改为关闭后需显式开启。- const { useSettingsStore } = await import("@/stores/settingsStore");- useSettingsStore().editorSettings.sidebarExpandTreeOnConnect = true;const listDatabases = vi.fn().mockResolvedValue([]);const listSchemaInfos = vi.fn().mockResolvedValue([{ name: "APP_USER" }, { name: "APP_USER_ARCHIVE" }, { name: "SYS" }]);diff --git a/apps/desktop/src/stores/__tests__/connectionStore.mq.spec.ts b/apps/desktop/src/stores/__tests__/connectionStore.mq.spec.tsindex e08722f379..866be04177 100644--- a/apps/desktop/src/stores/__tests__/connectionStore.mq.spec.ts+++ b/apps/desktop/src/stores/__tests__/connectionStore.mq.spec.ts@@ -64,9 +64,6 @@ describe("connectionStore MQ sidebar tree", () => {});it("loads Pulsar tenants under a message queue connection", async () => {- // 用例覆盖「连接后自动展开」路径;#13302 把默认改为关闭后需显式开启。- const { useSettingsStore } = await import("@/stores/settingsStore");- useSettingsStore().editorSettings.sidebarExpandTreeOnConnect = true;const mqListTenants = vi.fn().mockResolvedValue([{ name: "public", adminRoles: [], allowedClusters: [] },{ name: "tenant-a", adminRoles: [], allowedClusters: [] },diff --git a/apps/desktop/src/stores/__tests__/connectionStore.timeout.spec.ts b/apps/desktop/src/stores/__tests__/connectionStore.timeout.spec.tsindex faac77008f..f3b02dc811 100644--- a/apps/desktop/src/stores/__tests__/connectionStore.timeout.spec.ts+++ b/apps/desktop/src/stores/__tests__/connectionStore.timeout.spec.ts@@ -851,10 +851,6 @@ describe("connectionStore timeout recovery", () => {},];- // 用例断言加载完成后连接节点自动展开;#13302 把该行为改为默认关闭,需在此显式开启。- const { useSettingsStore } = await import("@/stores/settingsStore");- useSettingsStore().editorSettings.sidebarExpandTreeOnConnect = true;-void store.loadDatabases(connection.id).catch(() => undefined);await vi.advanceTimersByTimeAsync(1);expect(connectDb).toHaveBeenCalledTimes(1);diff --git a/apps/desktop/src/stores/__tests__/settingsStore.spec.ts b/apps/desktop/src/stores/__tests__/settingsStore.spec.tsindex 49c9e7bf06..74422d6722 100644--- a/apps/desktop/src/stores/__tests__/settingsStore.spec.ts+++ b/apps/desktop/src/stores/__tests__/settingsStore.spec.ts@@ -28,7 +28,6 @@ import {} from "@/stores/settingsStore";import type { AiConfigItem } from "@/types/ai";import { DATA_GRID_DEFAULT_VISIBLE_COPY_EXTRACTORS, DATA_GRID_EXTRACTOR_OPTIONS_MIGRATION_VERSION } from "@/lib/dataGrid/dataGridCopyExtractor";-import { editorSettingsDraftChanged, editorSettingsDraftFromSettings, editorSettingsPatchFromDraft } from "@/lib/settings/editorSettingsDraft";import { DEFAULT_MONO_FONT_FAMILY } from "@/lib/app/appFonts";describe("normalizeEditorSettings", () => {@@ -1299,87 +1298,6 @@ describe("normalizeEditorSettings - sidebarPinDefaultDatabase", () => {});});-// #13302 implemented this as an opt-in switch with a default-off build, but the-// old auto-expand behavior was the long-standing default and the off default was-// taken as a regression. The default is enabled again (migration v1); users with-// many schemas can still opt out with the switch.-describe("normalizeEditorSettings - sidebarExpandTreeOnConnect", () => {- it("defaults sidebarExpandTreeOnConnect to true", () => {- expect(normalizeEditorSettings({}).sidebarExpandTreeOnConnect).toBe(true);- });-- it("honors an explicit toggle stamped with the current default version", () => {- expect(normalizeEditorSettings({ sidebarExpandTreeOnConnect: true, sidebarExpandTreeOnConnectMigrationVersion: 1 }).sidebarExpandTreeOnConnect).toBe(true);- expect(normalizeEditorSettings({ sidebarExpandTreeOnConnect: false, sidebarExpandTreeOnConnectMigrationVersion: 1 }).sidebarExpandTreeOnConnect).toBe(false);- });-- it("migrates legacy blobs without the marker to the enabled default", () => {- expect(normalizeEditorSettings({ sidebarExpandTreeOnConnect: false }).sidebarExpandTreeOnConnect).toBe(true);- expect(normalizeEditorSettings({ sidebarExpandTreeOnConnect: true }).sidebarExpandTreeOnConnect).toBe(true);- expect(normalizeEditorSettings({ sidebarExpandTreeOnConnect: "false" } as any).sidebarExpandTreeOnConnect).toBe(true);- });-- it("falls back to default for non-boolean values", () => {- expect(normalizeEditorSettings({ sidebarExpandTreeOnConnect: "true" } as any).sidebarExpandTreeOnConnect).toBe(true);- expect(normalizeEditorSettings({ sidebarExpandTreeOnConnect: undefined } as any).sidebarExpandTreeOnConnect).toBe(true);- expect(normalizeEditorSettings({ sidebarExpandTreeOnConnect: 1 } as any).sidebarExpandTreeOnConnect).toBe(true);- });-});--// #13549: the toggle was registered on the interface, the defaults, the normalize-// whitelist and the settings-dialog draft, but never on the patch applier. Every-// apply dropped the key, so the store value never changed, the dialog compared its-// draft against a base that never moved, and "apply and close" kept reporting-// unsaved changes.-describe("updateEditorSettings - sidebarExpandTreeOnConnect", () => {- beforeEach(() => {- vi.resetModules();- setActivePinia(createPinia());- });-- it("applies and persists the sidebarExpandTreeOnConnect toggle", async () => {- const loadEditorSettings = vi.fn().mockResolvedValue({});- const saveEditorSettings = vi.fn().mockResolvedValue(undefined);- vi.doMock("@/lib/backend/api", () => ({ loadEditorSettings, saveEditorSettings }));-- const { useSettingsStore } = await import("@/stores/settingsStore");- const store = useSettingsStore();- await store.initEditorSettings();- saveEditorSettings.mockClear();-- store.updateEditorSettings({ sidebarExpandTreeOnConnect: true });- expect(store.editorSettings.sidebarExpandTreeOnConnect).toBe(true);- await vi.waitFor(() => expect(saveEditorSettings).toHaveBeenCalledOnce());- expect(saveEditorSettings).toHaveBeenLastCalledWith(expect.objectContaining({ sidebarExpandTreeOnConnect: true }));-- store.updateEditorSettings({ sidebarExpandTreeOnConnect: false });- expect(store.editorSettings.sidebarExpandTreeOnConnect).toBe(false);- });-- it("clears the settings-dialog dirty state once the toggle is applied", async () => {- const loadEditorSettings = vi.fn().mockResolvedValue({});- const saveEditorSettings = vi.fn().mockResolvedValue(undefined);- vi.doMock("@/lib/backend/api", () => ({ loadEditorSettings, saveEditorSettings }));-- const { useSettingsStore } = await import("@/stores/settingsStore");- const store = useSettingsStore();- await store.initEditorSettings();-- // The dialog compares its draft against a base snapshot that is rebuilt from the- // store after every apply. A key that never reaches the store keeps the two apart- // forever, which is what made the dialog report unsaved changes and refuse to close.- const base = editorSettingsDraftFromSettings(store.editorSettings);- const draft = { ...base, sidebarExpandTreeOnConnect: false };- expect(editorSettingsDraftChanged(draft, base)).toBe(true);-- store.updateEditorSettings(editorSettingsPatchFromDraft(draft, base));-- const appliedBase = editorSettingsDraftFromSettings(store.editorSettings);- expect(appliedBase.sidebarExpandTreeOnConnect).toBe(false);- expect(editorSettingsDraftChanged(draft, appliedBase)).toBe(false);- });-});-describe("normalizeEditorSettings - preferredExportPath", () => {it("defaults preferredExportPath to empty string", () => {expect(normalizeEditorSettings({}).preferredExportPath).toBe("");diff --git a/apps/desktop/src/stores/connectionStore.ts b/apps/desktop/src/stores/connectionStore.tsindex a9cf1c2f4c..379feb91b3 100644--- a/apps/desktop/src/stores/connectionStore.ts+++ b/apps/desktop/src/stores/connectionStore.ts@@ -3481,15 +3481,6 @@ export const useConnectionStore = defineStore("connection", () => {.finally(() => staleTreeRefreshIds.delete(liveNode.id));}- /**- * 「连接后自动展开对象树」开关(#13302):关闭时连接/数据库节点加载完成后不再强制展开,- * 默认关闭以避免模式多的库全量展开造成的元数据请求与渲染开销。手动展开不受影响:- * 用户点击节点时 UI 已先置位 isExpanded,这里的 gating 只拦「加载完成后代为展开」的路径。- */- function sidebarAutoExpandTreeOnConnect(): boolean {- return useSettingsStore().editorSettings.sidebarExpandTreeOnConnect;- }-// The metadata tree cache must not persist UI state. isExpanded flags written// while a schema was expanded would replay that expansion on every cache hit// (a manual collapse never rewrites the cache), so opening a connection would@@ -3536,7 +3527,7 @@ export const useConnectionStore = defineStore("connection", () => {}const normalizedChildren = sortSidebarTreeChildrenForParent(targetNode, childrenWithLinkedServers, config?.db_type);setChildren(targetNode, targetNode.type === "connection" && targetNode.connectionId ? withSavedSqlRoot(targetNode.connectionId, normalizedChildren, targetNode) : normalizedChildren);- if (sidebarAutoExpandTreeOnConnect()) targetNode.isExpanded = true;+ targetNode.isExpanded = true;logMetadataLoadTrace(metadataTraceLogger, trace, "cache-hit", {cacheStatus: decoded.isStale ? "stale" : "hit",resultCount: normalizedChildren.length,@@ -5053,7 +5044,7 @@ export const useConnectionStore = defineStore("connection", () => {// Schema loading records its own error on the node; keep the database list usable.}const liveNode = findNode(treeNodes.value, defaultNodeId);- if (sidebarAutoExpandTreeOnConnect() && liveNode) liveNode.isExpanded = true;+ if (liveNode) liveNode.isExpanded = true;}async function reloadSchemaChildren(connectionId: string, database?: string) {@@ -5995,7 +5986,7 @@ export const useConnectionStore = defineStore("connection", () => {const children = buildXuguTablespaceChildren(targetNode, tablespaces);setChildren(targetNode, children);targetNode.objectCount = children.length;- if (sidebarAutoExpandTreeOnConnect()) targetNode.isExpanded = true;+ targetNode.isExpanded = true;} catch (error) {// Storage metadata is an optional, read-only enhancement. A user// without SYS_* view access should see an empty group rather than a@@ -6005,7 +5996,7 @@ export const useConnectionStore = defineStore("connection", () => {if (targetNode) {setChildren(targetNode, []);targetNode.objectCount = 0;- if (sidebarAutoExpandTreeOnConnect()) targetNode.isExpanded = true;+ targetNode.isExpanded = true;}} finally {finishTreeNodeLoad(load);@@ -6203,7 +6194,7 @@ export const useConnectionStore = defineStore("connection", () => {}}const liveNode = treeNodeLoadTarget(load);- if (sidebarAutoExpandTreeOnConnect() && liveNode) liveNode.isExpanded = true;+ if (liveNode) liveNode.isExpanded = true;if (options?.force) void loadSidebarDatabaseStorage(connectionId, { force: true });} catch (e) {recordMetadataLoadError(connectionId, e, load);@@ -6279,7 +6270,7 @@ export const useConnectionStore = defineStore("connection", () => {// reveal the rest on demand, unless the user explicitly asked to see all.const { visible, hasMore } = options?.showAll ? { visible: databaseNodes, hasMore: false } : limitRedisDatabaseList(databaseNodes, useSettingsStore().editorSettings.redisDatabaseDisplayLimit);setChildren(targetNode, withSavedSqlRoot(connectionId, hasMore ? [...visible, buildLoadMoreNode(targetNode, visible.length, databaseNodes.length - visible.length)] : visible, targetNode));- if (sidebarAutoExpandTreeOnConnect()) targetNode.isExpanded = true;+ targetNode.isExpanded = true;});}@@ -6323,7 +6314,7 @@ export const useConnectionStore = defineStore("connection", () => {);}setChildren(targetNode, withSavedSqlRoot(connectionId, children, targetNode));- if (sidebarAutoExpandTreeOnConnect()) targetNode.isExpanded = true;+ targetNode.isExpanded = true;});}@@ -6350,7 +6341,7 @@ export const useConnectionStore = defineStore("connection", () => {targetNode,),);- if (sidebarAutoExpandTreeOnConnect()) targetNode.isExpanded = true;+ targetNode.isExpanded = true;});}@@ -6386,7 +6377,7 @@ export const useConnectionStore = defineStore("connection", () => {targetNode,),);- if (sidebarAutoExpandTreeOnConnect()) targetNode.isExpanded = true;+ targetNode.isExpanded = true;});}@@ -6408,7 +6399,7 @@ export const useConnectionStore = defineStore("connection", () => {isExpanded: false,};setChildren(node, [consoleNode]);- if (sidebarAutoExpandTreeOnConnect()) node.isExpanded = true;+ node.isExpanded = true;} catch (e) {recordMetadataLoadError(connectionId, e);throw e;@@ -6457,7 +6448,7 @@ export const useConnectionStore = defineStore("connection", () => {);}const liveNode = treeNodeLoadTarget(load);- if (sidebarAutoExpandTreeOnConnect() && liveNode) liveNode.isExpanded = true;+ if (liveNode) liveNode.isExpanded = true;});}@@ -6508,7 +6499,7 @@ export const useConnectionStore = defineStore("connection", () => {});}setChildren(targetNode, children);- if (sidebarAutoExpandTreeOnConnect()) targetNode.isExpanded = true;+ targetNode.isExpanded = true;});}@@ -6572,7 +6563,7 @@ export const useConnectionStore = defineStore("connection", () => {),{ trustEmptyConnectionChildren: dbs.length > 0 && visibleDbs.length === 0 },);- if (sidebarAutoExpandTreeOnConnect()) targetNode.isExpanded = true;+ targetNode.isExpanded = true;} catch (e) {recordMetadataLoadError(connectionId, e, load);throw e;@@ -6608,7 +6599,7 @@ export const useConnectionStore = defineStore("connection", () => {isExpanded: false,})),);- if (sidebarAutoExpandTreeOnConnect()) targetNode.isExpanded = true;+ targetNode.isExpanded = true;} catch (e) {recordMetadataLoadError(connectionId, e, load);throw e;@@ -6686,7 +6677,7 @@ export const useConnectionStore = defineStore("connection", () => {targetNode,),);- if (sidebarAutoExpandTreeOnConnect()) targetNode.isExpanded = true;+ targetNode.isExpanded = true;} catch (e) {const targetNode = treeNodeLoadTarget(load);if (targetNode && getConfig(connectionId)?.db_type === "meilisearch") {@@ -6709,7 +6700,7 @@ export const useConnectionStore = defineStore("connection", () => {targetNode,),);- if (sidebarAutoExpandTreeOnConnect()) targetNode.isExpanded = true;+ targetNode.isExpanded = true;}recordMetadataLoadError(connectionId, e, load);throw e;@@ -6740,7 +6731,7 @@ export const useConnectionStore = defineStore("connection", () => {targetNode,),);- if (sidebarAutoExpandTreeOnConnect()) targetNode.isExpanded = true;+ targetNode.isExpanded = true;});}@@ -6766,7 +6757,7 @@ export const useConnectionStore = defineStore("connection", () => {const targetNode = treeNodeLoadTarget(load);if (!targetNode) return;setChildren(targetNode, isMilvus && database ? collectionChildren : withSavedSqlRoot(connectionId, collectionChildren, targetNode));- if (sidebarAutoExpandTreeOnConnect()) targetNode.isExpanded = true;+ targetNode.isExpanded = true;});}@@ -6804,7 +6795,7 @@ export const useConnectionStore = defineStore("connection", () => {const targetNode = treeNodeLoadTarget(load);if (!targetNode) return;setChildren(targetNode, children);- if (sidebarAutoExpandTreeOnConnect()) targetNode.isExpanded = true;+ targetNode.isExpanded = true;} catch (e) {recordMetadataLoadError(connectionId, e, load);throw e;@@ -6896,7 +6887,7 @@ export const useConnectionStore = defineStore("connection", () => {setChildren(targetNode, children);await savePersistedTreeChildren(cacheKey, children);const currentTargetNode = treeNodeLoadTarget(load);- if (sidebarAutoExpandTreeOnConnect() && currentTargetNode) currentTargetNode.isExpanded = true;+ if (currentTargetNode) currentTargetNode.isExpanded = true;} catch (e) {recordMetadataLoadError(connectionId, e, load);throw e;@@ -6936,7 +6927,7 @@ export const useConnectionStore = defineStore("connection", () => {setChildren(targetNode, children);await savePersistedTreeChildren(cacheKey, children);const currentTargetNode = treeNodeLoadTarget(load);- if (sidebarAutoExpandTreeOnConnect() && currentTargetNode) currentTargetNode.isExpanded = true;+ if (currentTargetNode) currentTargetNode.isExpanded = true;} catch (e) {recordMetadataLoadError(connectionId, e, load);throw e;diff --git a/apps/desktop/src/stores/settingsStore.ts b/apps/desktop/src/stores/settingsStore.tsindex 4f767b8fc1..257ffeadc5 100644--- a/apps/desktop/src/stores/settingsStore.ts+++ b/apps/desktop/src/stores/settingsStore.ts@@ -1185,10 +1185,6 @@ export interface EditorSettings {autoSelectActiveSidebarNode: boolean;sidebarPinDefaultDatabase: boolean;sidebarBrowseObjectsOnDatabaseActivation: boolean;- /** 连接成功后是否自动展开侧边栏对象树(连接节点/默认数据库节点)。默认开启,与 v0.6.55 及更早的行为一致;模式较多的库可关闭以避免连接期全量展开的元数据请求与渲染开销(#13302)。 */- sidebarExpandTreeOnConnect: boolean;- /** 「连接后自动展开对象树」默认值迁移标记(v1:默认由关闭恢复为开启)。 */- sidebarExpandTreeOnConnectMigrationVersion: number;openQueryOnConnectionOpen: boolean;sidebarBrowseObjectsOnDatabaseActivationMigrationVersion: number;openTabsRestoreMode: OpenTabsRestoreMode;@@ -1375,11 +1371,6 @@ const EDITOR_THEME_VALUES = new Set<EditorTheme>(EDITOR_THEMES.map((theme) => thexport const EXECUTE_MODE_CURRENT_DEFAULT_VERSION = 1;export const SIDEBAR_BROWSE_OBJECTS_MIGRATION_VERSION = 1;-// v1: "expand tree on connect" became the default again, restoring the pre-v0.6.56-// behavior. Builds that shipped the default-off version have no marker, so their-// stored false is treated as the old default rather than an explicit opt-out; once-// this marker is stamped, an explicit toggle wins.-export const SIDEBAR_EXPAND_TREE_ON_CONNECT_DEFAULT_VERSION = 1;// v1: the welcome page default moved from "intro" back to "workspace"; persisted// blobs from the intro-default builds lack this marker and are migrated.export const WELCOME_PAGE_DEFAULT_VERSION = 1;@@ -1559,8 +1550,6 @@ export const DEFAULT_EDITOR_SETTINGS: EditorSettings = {autoSelectActiveSidebarNode: false,sidebarPinDefaultDatabase: true,sidebarBrowseObjectsOnDatabaseActivation: false,- sidebarExpandTreeOnConnect: true,- sidebarExpandTreeOnConnectMigrationVersion: SIDEBAR_EXPAND_TREE_ON_CONNECT_DEFAULT_VERSION,openQueryOnConnectionOpen: false,sidebarBrowseObjectsOnDatabaseActivationMigrationVersion: SIDEBAR_BROWSE_OBJECTS_MIGRATION_VERSION,openTabsRestoreMode: "all",@@ -2035,9 +2024,6 @@ export function normalizeEditorSettings(settings: Partial<EditorSettings>, existconst savedCompactTabTitleDefaultVersion = settings.compactTabTitleDefaultVersion;const compactTabTitleDefaultVersion = typeof savedCompactTabTitleDefaultVersion === "number" && savedCompactTabTitleDefaultVersion >= COMPACT_TAB_TITLE_DEFAULT_VERSION ? savedCompactTabTitleDefaultVersion : COMPACT_TAB_TITLE_DEFAULT_VERSION;const hasCurrentCompactTabTitleDefault = compactTabTitleDefaultVersion === savedCompactTabTitleDefaultVersion;- const savedSidebarExpandTreeDefaultVersion = settings.sidebarExpandTreeOnConnectMigrationVersion;- const sidebarExpandTreeDefaultVersion = typeof savedSidebarExpandTreeDefaultVersion === "number" && savedSidebarExpandTreeDefaultVersion >= SIDEBAR_EXPAND_TREE_ON_CONNECT_DEFAULT_VERSION ? savedSidebarExpandTreeDefaultVersion : SIDEBAR_EXPAND_TREE_ON_CONNECT_DEFAULT_VERSION;- const hasCurrentSidebarExpandTreeDefault = sidebarExpandTreeDefaultVersion === savedSidebarExpandTreeDefaultVersion;// The active id can only be validated once the scheme list it points into is known.const dataGridTypeColorSchemes = normalizeDataGridTypeColorSchemes(settings.dataGridTypeColorSchemes);const savedExtractorMigrationVersion = settings.dataGridExtractorOptionsMigrationVersion;@@ -2268,8 +2254,6 @@ export function normalizeEditorSettings(settings: Partial<EditorSettings>, existsidebarSearchOpenedDatabasesOnly: typeof settings.sidebarSearchOpenedDatabasesOnly === "boolean" ? settings.sidebarSearchOpenedDatabasesOnly : DEFAULT_EDITOR_SETTINGS.sidebarSearchOpenedDatabasesOnly,autoSelectActiveSidebarNode: settings.autoSelectActiveSidebarNode ?? DEFAULT_EDITOR_SETTINGS.autoSelectActiveSidebarNode,sidebarPinDefaultDatabase: typeof settings.sidebarPinDefaultDatabase === "boolean" ? settings.sidebarPinDefaultDatabase : DEFAULT_EDITOR_SETTINGS.sidebarPinDefaultDatabase,- sidebarExpandTreeOnConnect: hasCurrentSidebarExpandTreeDefault && typeof settings.sidebarExpandTreeOnConnect === "boolean" ? settings.sidebarExpandTreeOnConnect : DEFAULT_EDITOR_SETTINGS.sidebarExpandTreeOnConnect,- sidebarExpandTreeOnConnectMigrationVersion: SIDEBAR_EXPAND_TREE_ON_CONNECT_DEFAULT_VERSION,openQueryOnConnectionOpen: typeof settings.openQueryOnConnectionOpen === "boolean" ? settings.openQueryOnConnectionOpen : DEFAULT_EDITOR_SETTINGS.openQueryOnConnectionOpen,sidebarBrowseObjectsOnDatabaseActivation:typeof settings.sidebarBrowseObjectsOnDatabaseActivation === "boolean"@@ -3218,11 +3202,6 @@ export const useSettingsStore = defineStore("settings", () => {if (partial.autoSelectActiveSidebarNode !== undefined) editorSettings.value.autoSelectActiveSidebarNode = partial.autoSelectActiveSidebarNode;if (partial.sidebarPinDefaultDatabase !== undefined) editorSettings.value.sidebarPinDefaultDatabase = partial.sidebarPinDefaultDatabase === true;if (partial.sidebarBrowseObjectsOnDatabaseActivation !== undefined) editorSettings.value.sidebarBrowseObjectsOnDatabaseActivation = partial.sidebarBrowseObjectsOnDatabaseActivation === true;- // #13549: this key reached the interface, the defaults, the normalize whitelist and the- // settings dialog draft, but never this patch applier. Without the branch below the- // toggle was dropped on every apply, so the value never reached the store or disk and- // the dialog stayed permanently dirty.- if (partial.sidebarExpandTreeOnConnect !== undefined) editorSettings.value.sidebarExpandTreeOnConnect = partial.sidebarExpandTreeOnConnect === true;if (partial.openQueryOnConnectionOpen !== undefined) editorSettings.value.openQueryOnConnectionOpen = partial.openQueryOnConnectionOpen === true;if (partial.openTabsRestoreMode !== undefined) editorSettings.value.openTabsRestoreMode = normalizeOpenTabsRestoreMode(partial.openTabsRestoreMode);if (partial.autoReloadRestoredDataTabsOnOpen !== undefined) editorSettings.value.autoReloadRestoredDataTabsOnOpen = partial.autoReloadRestoredDataTabsOnOpen === true;