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
feat(editor): add setting to show full connection group path
hanxuanyu7d53dfa26c8b
diff --git a/apps/desktop/src/components/editor/EditorSettingsDialog.vue b/apps/desktop/src/components/editor/EditorSettingsDialog.vueindex fa18f2b8ce..a0c0986caa 100644--- a/apps/desktop/src/components/editor/EditorSettingsDialog.vue+++ b/apps/desktop/src/components/editor/EditorSettingsDialog.vue@@ -763,6 +763,7 @@ const editLocateCursorOnGutterExecute = ref(settingsStore.editorSettings.locateCconst editShowLineNumbers = ref(settingsStore.editorSettings.showLineNumbers);const editShowCurrentStatementFrame = ref(settingsStore.editorSettings.showCurrentStatementFrame);const editShowInsertValueHints = ref(settingsStore.editorSettings.showInsertValueHints);+const editShowConnectionGroupPath = ref(settingsStore.editorSettings.showConnectionGroupPath);const editAutoAliasTables = ref(settingsStore.editorSettings.autoAliasTables);const editTableCompletionSchemaQualification = ref<SqlTableCompletionSchemaQualification>(settingsStore.editorSettings.tableCompletionSchemaQualification);const tableCompletionSchemaQualificationDescription = computed(() => {@@ -1223,6 +1224,7 @@ function currentEditorSettingsDraft(): EditorSettingsDraft {showLineNumbers: editShowLineNumbers.value,showCurrentStatementFrame: editShowCurrentStatementFrame.value,showInsertValueHints: editShowInsertValueHints.value,+ showConnectionGroupPath: editShowConnectionGroupPath.value,autoAliasTables: editAutoAliasTables.value,tableCompletionSchemaQualification: editTableCompletionSchemaQualification.value,insertSpaceAfterCompletion: editInsertSpaceAfterCompletion.value,@@ -1926,6 +1928,7 @@ function syncEditorSettingsDraftFromStore() {editShowLineNumbers.value = settingsStore.editorSettings.showLineNumbers;editShowCurrentStatementFrame.value = settingsStore.editorSettings.showCurrentStatementFrame;editShowInsertValueHints.value = settingsStore.editorSettings.showInsertValueHints;+ editShowConnectionGroupPath.value = settingsStore.editorSettings.showConnectionGroupPath;editAutoAliasTables.value = settingsStore.editorSettings.autoAliasTables;editTableCompletionSchemaQualification.value = settingsStore.editorSettings.tableCompletionSchemaQualification;editInsertSpaceAfterCompletion.value = settingsStore.editorSettings.insertSpaceAfterCompletion;@@ -2106,6 +2109,7 @@ const editorSettingsDraftRefs: EditorSettingsDraftRefMap = {showLineNumbers: editShowLineNumbers,showCurrentStatementFrame: editShowCurrentStatementFrame,showInsertValueHints: editShowInsertValueHints,+ showConnectionGroupPath: editShowConnectionGroupPath,autoAliasTables: editAutoAliasTables,tableCompletionSchemaQualification: editTableCompletionSchemaQualification,insertSpaceAfterCompletion: editInsertSpaceAfterCompletion,@@ -2713,6 +2717,7 @@ function resetDefaultsForTab(tab: SettingsCategory) {editShowLineNumbers.value = DEFAULT_EDITOR_SETTINGS.showLineNumbers;editShowCurrentStatementFrame.value = DEFAULT_EDITOR_SETTINGS.showCurrentStatementFrame;editShowInsertValueHints.value = DEFAULT_EDITOR_SETTINGS.showInsertValueHints;+ editShowConnectionGroupPath.value = DEFAULT_EDITOR_SETTINGS.showConnectionGroupPath;editAutoAliasTables.value = DEFAULT_EDITOR_SETTINGS.autoAliasTables;editTableCompletionSchemaQualification.value = DEFAULT_EDITOR_SETTINGS.tableCompletionSchemaQualification;editInsertSpaceAfterCompletion.value = DEFAULT_EDITOR_SETTINGS.insertSpaceAfterCompletion;@@ -2916,6 +2921,7 @@ function resetAllDefaults() {editShowLineNumbers.value = DEFAULT_EDITOR_SETTINGS.showLineNumbers;editShowCurrentStatementFrame.value = DEFAULT_EDITOR_SETTINGS.showCurrentStatementFrame;editShowInsertValueHints.value = DEFAULT_EDITOR_SETTINGS.showInsertValueHints;+ editShowConnectionGroupPath.value = DEFAULT_EDITOR_SETTINGS.showConnectionGroupPath;editAutoAliasTables.value = DEFAULT_EDITOR_SETTINGS.autoAliasTables;editTableCompletionSchemaQualification.value = DEFAULT_EDITOR_SETTINGS.tableCompletionSchemaQualification;editInsertSpaceAfterCompletion.value = DEFAULT_EDITOR_SETTINGS.insertSpaceAfterCompletion;@@ -8127,6 +8133,16 @@ onUnmounted(() => {<Switch id="editor-show-insert-value-hints" v-model="editShowInsertValueHints" class="mt-0.5" /></div>+ <div class="settings-item flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <div class="space-y-1">+ <Label for="editor-show-connection-group-path">{{ t("settings.showConnectionGroupPath") }}</Label>+ <p class="text-xs text-muted-foreground">+ {{ t("settings.showConnectionGroupPathDescription") }}+ </p>+ </div>+ <Switch id="editor-show-connection-group-path" v-model="editShowConnectionGroupPath" class="mt-0.5" />+ </div>+<div class="settings-item flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2"><div class="space-y-1"><Label for="editor-show-whitespace">{{ t("settings.showWhitespace") }}</Label>diff --git a/apps/desktop/src/components/editor/__tests__/EditorSettingsDialog.saveShortcut.integration.spec.ts b/apps/desktop/src/components/editor/__tests__/EditorSettingsDialog.saveShortcut.integration.spec.tsindex 9c320ca735..604e7a24a4 100644--- a/apps/desktop/src/components/editor/__tests__/EditorSettingsDialog.saveShortcut.integration.spec.ts+++ b/apps/desktop/src/components/editor/__tests__/EditorSettingsDialog.saveShortcut.integration.spec.ts@@ -21,14 +21,18 @@ vi.mock("@/lib/backend/api", async (importOriginal) => {loadHistoryRetentionLimit: async () => 5000,loadMcpHistoryRetentionLimit: async () => 5000,loadMcpGlobalPolicy: async () => null,+ loadWebMcpHttpStatus: async () => ({ enabled: false, allowedHosts: [], allowedOrigins: [] }),loadDesktopSettings: async () => null,+ saveDesktopSettings: async () => undefined,loadAiConfigs: async () => [],loadAiConfig: async () => null,loadAiProviderConfigs: async () => ({}),loadAiChatSelection: async () => null,webdavSyncSecretsStatus: async () => ({}),- snippetSavedTokenStatus: async () => ({}),+ snippetTokenStatus: async () => ({ hasSavedToken: false }),+ snippetPassphraseStatus: async () => ({ hasSavedPassphrase: false }),snippetSyncSettings: async () => ({}),+ listPlugins: async () => [],};});@@ -123,3 +127,34 @@ describe("Ctrl+S on the settings page (exposed apply entrypoint)", () => {expect(open.value).toBe(true);});});++describe("connection group path setting", () => {+ it("applies both toggle values and reloads them when old settings have no field", async () => {+ backend.saved = {};+ const { store } = await mountPage();+ const toggle = host.querySelector<HTMLButtonElement>("#editor-show-connection-group-path")!;+ const apply = [...host.querySelectorAll<HTMLButtonElement>("button")].find((button) => button.textContent?.trim() === i18n.global.t("settings.apply"))!;++ expect(store.editorSettings.showConnectionGroupPath).toBe(false);+ expect(toggle.getAttribute("aria-checked")).toBe("false");+ expect(apply.disabled).toBe(true);++ for (const enabled of [true, false]) {+ backend.saves.mockClear();+ toggle.click();+ await settle();+ expect(toggle.getAttribute("aria-checked")).toBe(String(enabled));+ expect(apply.disabled).toBe(false);++ apply.click();+ await settle();+ expect(store.editorSettings.showConnectionGroupPath).toBe(enabled);+ expect(backend.saves).toHaveBeenCalledWith(expect.objectContaining({ showConnectionGroupPath: enabled }));+ expect(apply.disabled).toBe(true);++ const reloadedStore = useSettingsStore(createPinia());+ await reloadedStore.initEditorSettings();+ expect(reloadedStore.editorSettings.showConnectionGroupPath).toBe(enabled);+ }+ });+});diff --git a/apps/desktop/src/components/layout/EditorToolbar.vue b/apps/desktop/src/components/layout/EditorToolbar.vueindex 006fc47af4..9132a5b883 100644--- a/apps/desktop/src/components/layout/EditorToolbar.vue+++ b/apps/desktop/src/components/layout/EditorToolbar.vue@@ -263,6 +263,7 @@ const activeConnectionGroupPath = computed(() => {if (!connection) return "";return findConnectionGroupPath(connectionStore.sidebarLayout, connection.id)?.join(" / ") || "";});+const visibleConnectionGroupPath = computed(() => (settingsStore.editorSettings.showConnectionGroupPath ? activeConnectionGroupPath.value : ""));const activeSchemaValue = computed(() => props.activeTab.schema || "");// Salesforce identity badge. A Salesforce tab talks to one live org and every grid// save is a real REST write, so the signed-in user stays visible next to the@@ -597,6 +598,7 @@ async function changeCatalog(selectedCatalog: string) {}const connectionPickerRef = ref<InstanceType<typeof ConnectionTreeSelect> | null>(null);+const connectionPickerOpen = ref(false);const databasePickerRef = ref<InstanceType<typeof SearchableSelect> | null>(null);const schemaPickerRef = ref<InstanceType<typeof SearchableSelect> | null>(null);@@ -1001,7 +1003,7 @@ defineExpose({<div class="flex shrink-0 items-center gap-2"><div class="flex shrink-0 items-center gap-1" :class="{ 'connection-required-prompt': connectionRequiredVisible }"><span v-if="activeConnection?.color" class="h-4 w-1 rounded-full shrink-0" :style="{ backgroundColor: activeConnection.color }" />- <LightTooltip text="" :disabled="!activeConnectionDetailRows.length" side="bottom" :side-offset="6" :delay="250" :close-delay="80" surface="popover">+ <LightTooltip text="" :disabled="connectionPickerOpen || !activeConnectionDetailRows.length" side="bottom" :side-offset="6" :delay="250" :close-delay="80" surface="popover"><ConnectionTreeSelectref="connectionPickerRef":model-value="activeConnectionValue"@@ -1011,16 +1013,17 @@ defineExpose({:search-placeholder="t('editor.searchConnection')":empty-text="t('grid.noSearchResults')":hide-title="activeConnectionDetailRows.length > 0"- trigger-class="font-medium text-foreground"+ trigger-class="max-w-[min(28rem,36vw)] font-medium text-foreground"trigger-icon-class="h-3 w-3"list-class="w-96 max-w-[calc(100vw-2rem)]"@update:model-value="(connectionId) => emit('changeConnection', connectionId)"+ @update:open="(open: boolean) => (connectionPickerOpen = open)"><template #trigger-label="{ label }"><div v-if="activeConnection" class="flex min-w-0 items-center gap-1.5"><DatabaseIcon :db-type="connectionIconType(activeConnection)" class="h-3.5 w-3.5 shrink-0" />- <span v-if="activeConnectionGroupPath" class="shrink-0 text-muted-foreground">{{ activeConnectionGroupPath }} /</span>- <span class="truncate">{{ label }}</span>+ <span v-if="visibleConnectionGroupPath" data-connection-group-path class="min-w-0 max-w-[50%] shrink truncate text-muted-foreground">{{ visibleConnectionGroupPath }} /</span>+ <span :class="visibleConnectionGroupPath ? 'min-w-0 shrink truncate' : 'min-w-0 flex-1 truncate'">{{ label }}</span><ProductionContextBadge v-if="showConnectionProductionBadge" compact /></div><span v-else class="truncate text-muted-foreground">{{ t("editor.selectConnection") }}</span>diff --git a/apps/desktop/src/components/layout/__tests__/EditorToolbar.mount.spec.ts b/apps/desktop/src/components/layout/__tests__/EditorToolbar.mount.spec.tsindex 929d61e223..67b84fd6b1 100644--- a/apps/desktop/src/components/layout/__tests__/EditorToolbar.mount.spec.ts+++ b/apps/desktop/src/components/layout/__tests__/EditorToolbar.mount.spec.ts@@ -50,7 +50,36 @@ vi.mock("@/components/icons/DatabaseIcon.vue", () => ({vi.mock("@/components/connection/ConnectionTreeSelect.vue", () => ({default: {name: "ConnectionTreeSelectStub",- template: `<div />`,+ emits: ["update:open"],+ props: {+ connections: { type: Array, default: () => [] },+ modelValue: { type: String, default: "" },+ },+ data() {+ return { open: false };+ },+ computed: {+ selectedLabel() {+ return this.connections.find((connection: { id: string }) => connection.id === this.modelValue)?.name || this.modelValue;+ },+ },+ methods: {+ toggleOpen() {+ this.open = !this.open;+ this.$emit("update:open", this.open);+ },+ },+ template: `<div data-test="connection-selector"><button type="button" data-test="toggle-connection-picker" @click="toggleOpen" /><slot name="trigger-label" :label="selectedLabel" /></div>`,+ },+}));++vi.mock("@/components/ui/LightTooltip.vue", () => ({+ default: {+ name: "LightTooltipStub",+ props: {+ disabled: { type: Boolean, default: false },+ },+ template: `<div data-test="connection-tooltip" :data-disabled="String(disabled)"><slot /><slot name="content" /></div>`,},}));@@ -749,4 +778,98 @@ describe("EditorToolbar mount contract", () => {app.unmount();host.remove();});++ it("renders the active connection group path and sanitized detail preview", async () => {+ const connectionStore = useConnectionStore();+ const settingsStore = useSettingsStore();+ settingsStore.editorSettings.showConnectionGroupPath = true;+ const connection = {+ id: "conn-grouped",+ name: "orders",+ db_type: "postgres",+ host: "db.example.com",+ port: 5432,+ database: "app",+ username: "alice",+ password: "secret",+ connection_string: "postgres://alice:[email protected]:5432/app",+ color: "",+ } as never;+ connectionStore.connections = [connection];+ connectionStore.sidebarLayout = {+ groups: [+ { id: "group-prod", name: "Production", collapsed: false },+ { id: "group-orders", name: "Orders", collapsed: false },+ ],+ order: [+ {+ type: "group",+ id: "group-prod",+ children: [{ type: "group", id: "group-orders", children: [{ type: "connection", id: connection.id }] }],+ },+ ],+ };++ const host = createHost();+ const app = createApp(EditorToolbar, {+ activeTab: {+ id: "tab-grouped",+ title: "SQL",+ connectionId: connection.id,+ database: "app",+ sql: "SELECT 1",+ mode: "query",+ isExecuting: false,+ isCancelling: false,+ isExplaining: false,+ },+ activeConnection: connectionStore.getConfig(connection.id),+ executableSql: "SELECT 1",+ explainMode: "explain",+ blockDangerousRedisCommands: false,+ sqlKeywordCase: "preserve",+ databaseRequiredSignal: 0,+ autoCommit: true,+ txnSessionId: undefined,+ txnAutoRolledBack: false,+ txnPossiblyDirty: false,+ stickyProvenReadOnlyState: false,+ });+ app.use(pinia);+ app.use(i18n);+ app.mount(host);+ await nextTick();++ const groupPath = host.querySelector<HTMLElement>("[data-connection-group-path]");+ expect(groupPath?.textContent).toContain("Production / Orders /");+ expect(groupPath?.classList.contains("min-w-0")).toBe(true);+ expect(groupPath?.classList.contains("flex-1")).toBe(false);+ expect(groupPath?.classList.contains("max-w-[50%]")).toBe(true);+ expect(groupPath?.classList.contains("shrink")).toBe(true);+ expect(groupPath?.classList.contains("truncate")).toBe(true);+ const connectionName = groupPath?.nextElementSibling;+ expect(connectionName?.classList.contains("shrink")).toBe(true);+ expect(connectionName?.classList.contains("flex-1")).toBe(false);+ expect(host.textContent).toContain("orders");+ expect(host.textContent).toContain("postgres://alice:***@db.example.com:5432/app");+ expect(host.textContent).not.toContain("postgres://alice:[email protected]:5432/app");++ settingsStore.editorSettings.showConnectionGroupPath = false;+ await nextTick();+ expect(host.querySelector("[data-connection-group-path]")).toBeNull();+ expect(host.textContent).toContain("orders");++ const tooltip = host.querySelector<HTMLElement>('[data-test="connection-tooltip"]');+ const pickerToggle = host.querySelector<HTMLButtonElement>('[data-test="toggle-connection-picker"]');+ expect(tooltip?.dataset.disabled).toBe("false");+ pickerToggle?.dispatchEvent(new MouseEvent("click", { bubbles: true }));+ await nextTick();+ expect(tooltip?.dataset.disabled).toBe("true");+ pickerToggle?.dispatchEvent(new MouseEvent("click", { bubbles: true }));+ await nextTick();+ expect(tooltip?.dataset.disabled).toBe("false");++ app.unmount();+ host.remove();+ });});diff --git a/apps/desktop/src/i18n/locales/en.ts b/apps/desktop/src/i18n/locales/en.tsindex 351b9c4359..1b3c101ac4 100644--- a/apps/desktop/src/i18n/locales/en.ts+++ b/apps/desktop/src/i18n/locales/en.ts@@ -10172,6 +10172,8 @@ export default {showCurrentStatementFrameDescription: "When enabled, the SQL editor draws an outline around the current executable statement; when disabled, the outline is hidden.",showInsertValueHints: "Show INSERT value column hints",showInsertValueHintsDescription: "When enabled, the SQL editor shows column-name hints next to each value or SELECT projection in INSERT ... VALUES and INSERT ... SELECT clauses.",+ showConnectionGroupPath: "Show full query connection group path",+ showConnectionGroupPathDescription: "When enabled, the query toolbar connection picker shows the full group path before the connection name; when disabled, it shows only the connection name.",previewStatementRunButton: "Preview statement run button",wordWrap: "Word wrap",wordWrapDescription: "Wrap long lines within the editor width",diff --git a/apps/desktop/src/i18n/locales/es.ts b/apps/desktop/src/i18n/locales/es.tsindex ef5e203471..b23eecf01f 100644--- a/apps/desktop/src/i18n/locales/es.ts+++ b/apps/desktop/src/i18n/locales/es.ts@@ -9798,6 +9798,8 @@ export default withEnglishFallback({linuxFloatingFrame: "Efecto de transparencia de ventana",linuxFloatingFrameDescription: "Habilita automáticamente bordes transparentes en escritorios compatibles. Si la ventana parpadea, se puede desactivar; surte efecto tras aplicar y reiniciar DBX. La configuración de las variables de entorno tiene prioridad.",shortcutExecuteAllSql: "Ejecutar todo el SQL",+ showConnectionGroupPath: "Mostrar la ruta completa del grupo de la conexión de consulta",+ showConnectionGroupPathDescription: "Cuando está activado, el selector de conexiones de la esquina superior derecha de la página de consulta mostrará la ruta completa del grupo antes del nombre de la conexión; cuando está desactivado, solo mostrará el nombre de la conexión.",},driverStore: {jreDirRemoveFailed: "No se pudo eliminar el directorio JRE antiguo: {path} (error original: {error})",diff --git a/apps/desktop/src/i18n/locales/it.ts b/apps/desktop/src/i18n/locales/it.tsindex cc31ad4c7a..b056867dda 100644--- a/apps/desktop/src/i18n/locales/it.ts+++ b/apps/desktop/src/i18n/locales/it.ts@@ -9547,6 +9547,8 @@ export default withEnglishFallback({linuxFloatingFrame: "Effetto di trasparenza della finestra",linuxFloatingFrameDescription: "Abilita automaticamente i bordi trasparenti sui desktop supportati. Può essere disattivato se la finestra sfarfalla; ha effetto dopo l'applicazione e il riavvio di DBX. Le impostazioni delle variabili d'ambiente hanno la precedenza.",shortcutExecuteAllSql: "Esegui tutto il SQL",+ showConnectionGroupPath: "Mostra il percorso completo del gruppo per le connessioni query",+ showConnectionGroupPathDescription: "Se attivato, il selettore di connessione nell'angolo in alto a destra della pagina query mostrerà il percorso completo del gruppo prima del nome della connessione; se disattivato, mostrerà solo il nome della connessione.",},driverStore: {jreDirRemoveFailed: "Impossibile rimuovere la vecchia directory JRE: {path} (errore originale: {error})",diff --git a/apps/desktop/src/i18n/locales/ja.ts b/apps/desktop/src/i18n/locales/ja.tsindex ef82c97a91..e55b358b59 100644--- a/apps/desktop/src/i18n/locales/ja.ts+++ b/apps/desktop/src/i18n/locales/ja.ts@@ -9584,6 +9584,8 @@ export default withEnglishFallback({linuxFloatingFrame: "ウィンドウの透明効果",linuxFloatingFrameDescription: "サポートされているデスクトップで透明な枠線を自動的に有効にします。ウィンドウがちらつく場合は無効にでき、適用して DBX を再起動すると反映されます。環境変数の設定が優先されます。",shortcutExecuteAllSql: "すべての SQL を実行",+ showConnectionGroupPath: "クエリ接続の完全なグループパスを表示",+ showConnectionGroupPathDescription: "有効にすると、クエリページ右上の接続セレクターで接続名の前に完全なグループパスが表示されます。無効にすると接続名のみが表示されます。",},driverStore: {jreDirRemoveFailed: "古い JRE ディレクトリを削除できませんでした: {path}(元のエラー: {error})",diff --git a/apps/desktop/src/i18n/locales/ko.ts b/apps/desktop/src/i18n/locales/ko.tsindex 49c87b9f8b..0da7181529 100644--- a/apps/desktop/src/i18n/locales/ko.ts+++ b/apps/desktop/src/i18n/locales/ko.ts@@ -9652,6 +9652,8 @@ export default withEnglishFallback({linuxFloatingFrame: "창 투명 효과",linuxFloatingFrameDescription: "지원되는 데스크톱에서 투명 테두리를 자동으로 활성화합니다. 창이 깜박이면 끌 수 있으며, 적용하고 DBX를 다시 시작한 후 적용됩니다. 환경 변수 설정이 우선합니다.",shortcutExecuteAllSql: "모든 SQL 실행",+ showConnectionGroupPath: "쿼리 연결의 전체 그룹 경로 표시",+ showConnectionGroupPathDescription: "활성화하면 쿼리 페이지 오른쪽 위의 연결 선택기에서 연결 이름 앞에 전체 그룹 경로를 표시합니다. 비활성화하면 연결 이름만 표시합니다.",},driverStore: {jreDirRemoveFailed: "이전 JRE 디렉터리 제거 실패: {path} (원래 오류: {error})",diff --git a/apps/desktop/src/i18n/locales/pt-BR.ts b/apps/desktop/src/i18n/locales/pt-BR.tsindex 4542fb1844..c76b746aad 100644--- a/apps/desktop/src/i18n/locales/pt-BR.ts+++ b/apps/desktop/src/i18n/locales/pt-BR.ts@@ -9544,6 +9544,8 @@ export default withEnglishFallback({linuxFloatingFrame: "Efeito de transparência da janela",linuxFloatingFrameDescription: "Ativa automaticamente bordas transparentes em desktops compatíveis. Pode ser desativado se a janela piscar; entra em vigor após aplicar e reiniciar o DBX. As configurações de variáveis de ambiente têm prioridade.",shortcutExecuteAllSql: "Executar todo o SQL",+ showConnectionGroupPath: "Mostrar caminho completo do grupo da conexão de consulta",+ showConnectionGroupPathDescription: "Quando ativado, o seletor de conexão no canto superior direito da página de consulta exibirá o caminho completo do grupo antes do nome da conexão; quando desativado, exibirá apenas o nome da conexão.",},driverStore: {jreDirRemoveFailed: "Não foi possível remover o diretório JRE antigo: {path} (erro original: {error})",diff --git a/apps/desktop/src/i18n/locales/ru.ts b/apps/desktop/src/i18n/locales/ru.tsindex c9518f4b09..51f087f6a0 100644--- a/apps/desktop/src/i18n/locales/ru.ts+++ b/apps/desktop/src/i18n/locales/ru.ts@@ -11125,6 +11125,8 @@ export default withEnglishFallback({linuxFloatingFrame: "Эффект прозрачности окна",linuxFloatingFrameDescription: "Автоматически включает прозрачные границы на поддерживаемых рабочих столах. Если окно мерцает, эту функцию можно отключить; изменения вступят в силу после применения и перезапуска DBX. Настройки переменных среды имеют приоритет.",shortcutExecuteAllSql: "Выполнить весь SQL",+ showConnectionGroupPath: "Показывать полный путь к группе подключения в запросах",+ showConnectionGroupPathDescription: "Если включено, селектор подключений в правом верхнем углу страницы запросов будет показывать полный путь к группе перед именем подключения; если выключено — только имя подключения.",deepLinkConnectionConfirmMode: "Способ подтверждения при открытии подключения по ссылке",deepLinkConnectionConfirmModeDescription: "Выберите, какие ссылки подключения сохранять сразу, не дожидаясь подтверждения в диалоговом окне.",deepLinkConnectionConfirmModeAlways: "Все требуют подтверждения",diff --git a/apps/desktop/src/i18n/locales/th.ts b/apps/desktop/src/i18n/locales/th.tsindex 014c300371..eb19b9158c 100644--- a/apps/desktop/src/i18n/locales/th.ts+++ b/apps/desktop/src/i18n/locales/th.ts@@ -11506,6 +11506,8 @@ export default withEnglishFallback({linuxFloatingFrame: "เอฟเฟกต์ความโปร่งใสของหน้าต่าง",linuxFloatingFrameDescription: "เปิดใช้ขอบโปร่งใสโดยอัตโนมัติบนเดสก์ท็อปที่รองรับ หากหน้าต่างกะพริบสามารถปิดได้ มีผลหลังนำไปใช้และรีสตาร์ท DBX การตั้งค่าตัวแปรสภาพแวดล้อมมีลำดับความสำคัญ",shortcutExecuteAllSql: "เรียกใช้ SQL ทั้งหมด",+ showConnectionGroupPath: "แสดงพาธกลุ่มแบบเต็มของคอนเนกชันสำหรับคิวรี",+ showConnectionGroupPathDescription: "เมื่อเปิดใช้ ตัวเลือกคอนเนกชันที่มุมขวาบนของหน้าคิวรีจะแสดงพาธกลุ่มแบบเต็มก่อนชื่อคอนเนกชัน; เมื่อปิดใช้จะแสดงเฉพาะชื่อคอนเนกชันเท่านั้น",deepLinkConnectionConfirmMode: "วิธียืนยันเมื่อเปิดการเชื่อมต่อผ่านลิงก์",deepLinkConnectionConfirmModeDescription: "เลือกว่าลิงก์การเชื่อมต่อใดจะบันทึกโดยตรงโดยไม่ต้องรอการยืนยันในป๊อปอัป",deepLinkConnectionConfirmModeAlways: "ต้องยืนยันทั้งหมด",diff --git a/apps/desktop/src/i18n/locales/zh-CN.ts b/apps/desktop/src/i18n/locales/zh-CN.tsindex 995126c3af..1fb3272f55 100644--- a/apps/desktop/src/i18n/locales/zh-CN.ts+++ b/apps/desktop/src/i18n/locales/zh-CN.ts@@ -10135,6 +10135,8 @@ export default withEnglishFallback({showCurrentStatementFrameDescription: "开启后,在 SQL 编辑器中用外框线标出当前可执行语句;关闭后不显示外框线。",showInsertValueHints: "显示 INSERT 值列名提示",showInsertValueHintsDescription: "开启后,在 INSERT ... VALUES 或 INSERT ... SELECT 的每个值/投影旁显示对应列名提示。",+ showConnectionGroupPath: "显示查询连接完整分组路径",+ showConnectionGroupPathDescription: "开启后,查询页面右上角的连接选择器会在连接名称前显示完整分组路径;关闭后仅显示连接名称。",previewStatementRunButton: "预览语句执行按钮",wordWrap: "自动换行",wordWrapDescription: "长内容在编辑器宽度内自动折行显示",diff --git a/apps/desktop/src/i18n/locales/zh-TW.ts b/apps/desktop/src/i18n/locales/zh-TW.tsindex 01a18eedb1..88f476c597 100644--- a/apps/desktop/src/i18n/locales/zh-TW.ts+++ b/apps/desktop/src/i18n/locales/zh-TW.ts@@ -8891,6 +8891,8 @@ export default withEnglishFallback({openQueryOnConnectionOpenDescription: "啟用後,開啟連線或資料庫時進入對應的 default.sql 預設查詢,修改自動儲存。",linuxFloatingFrame: "視窗透明效果",linuxFloatingFrameDescription: "在支援的桌面上自動啟用透明邊框。視窗閃爍時可關閉,套用並重新啟動 DBX 後生效。環境變數設定優先。",+ showConnectionGroupPath: "顯示查詢連線完整群組路徑",+ showConnectionGroupPathDescription: "開啟後,查詢頁面右上角的連線選擇器會在連線名稱前顯示完整群組路徑;關閉後僅顯示連線名稱。",},driverStore: {jreDirRemoveFailed: "無法刪除舊的 JRE 目錄:{path}(原始錯誤:{error})",diff --git a/apps/desktop/src/lib/settings/editorSettingsDraft.ts b/apps/desktop/src/lib/settings/editorSettingsDraft.tsindex df7fbaa119..7bfd238206 100644--- a/apps/desktop/src/lib/settings/editorSettingsDraft.ts+++ b/apps/desktop/src/lib/settings/editorSettingsDraft.ts@@ -30,6 +30,7 @@ export const EDITOR_SETTINGS_DRAFT_KEYS = ["showLineNumbers","showCurrentStatementFrame","showInsertValueHints",+ "showConnectionGroupPath","autoAliasTables","tableCompletionSchemaQualification","insertSpaceAfterCompletion",diff --git a/apps/desktop/src/lib/settings/settingsSearch.ts b/apps/desktop/src/lib/settings/settingsSearch.tsindex 10a8a85547..7c9d625985 100644--- a/apps/desktop/src/lib/settings/settingsSearch.ts+++ b/apps/desktop/src/lib/settings/settingsSearch.ts@@ -157,6 +157,7 @@ export const SETTINGS_SEARCH_DEFINITIONS: readonly SettingsSearchDefinition[] ={ id: "editor-line-numbers", category: "editor", titleKey: "settings.showLineNumbers", descriptionKey: "settings.showLineNumbersDescription", targetId: "editor" },{ id: "editor-statement-frame", category: "editor", titleKey: "settings.showCurrentStatementFrame", descriptionKey: "settings.showCurrentStatementFrameDescription", targetId: "editor" },{ id: "editor-value-hints", category: "editor", titleKey: "settings.showInsertValueHints", descriptionKey: "settings.showInsertValueHintsDescription", targetId: "editor" },+ { id: "editor-connection-group-path", category: "editor", titleKey: "settings.showConnectionGroupPath", descriptionKey: "settings.showConnectionGroupPathDescription", targetId: "editor" },{ id: "editor-show-whitespace", category: "editor", titleKey: "settings.showWhitespace", descriptionKey: "settings.showWhitespaceDescription", targetId: "editor" },{ id: "editor-word-wrap", category: "editor", titleKey: "settings.wordWrap", descriptionKey: "settings.wordWrapDescription", targetId: "editor" },{ id: "editor-vim", category: "editor", titleKey: "settings.vimMode", descriptionKey: "settings.vimModeDescription", targetId: "editor" },diff --git a/apps/desktop/src/lib/settings/settingsTransfer.ts b/apps/desktop/src/lib/settings/settingsTransfer.tsindex 6b34e1f33e..deed15cb6e 100644--- a/apps/desktop/src/lib/settings/settingsTransfer.ts+++ b/apps/desktop/src/lib/settings/settingsTransfer.ts@@ -147,6 +147,7 @@ const SETTINGS_TRANSFER_CATEGORY_KEYS: Record<SettingsTransferCategoryId, readon"showLineNumbers","showCurrentStatementFrame","showInsertValueHints",+ "showConnectionGroupPath","autoAliasTables","tableCompletionSchemaQualification","insertSpaceAfterCompletion",diff --git a/apps/desktop/src/stores/__tests__/settingsStore.spec.ts b/apps/desktop/src/stores/__tests__/settingsStore.spec.tsindex ce38d06836..74422d6722 100644--- a/apps/desktop/src/stores/__tests__/settingsStore.spec.ts+++ b/apps/desktop/src/stores/__tests__/settingsStore.spec.ts@@ -31,6 +31,13 @@ import { DATA_GRID_DEFAULT_VISIBLE_COPY_EXTRACTORS, DATA_GRID_EXTRACTOR_OPTIONS_import { DEFAULT_MONO_FONT_FAMILY } from "@/lib/app/appFonts";describe("normalizeEditorSettings", () => {+ it("defaults query connection group paths to hidden and validates the toggle", () => {+ expect(DEFAULT_EDITOR_SETTINGS.showConnectionGroupPath).toBe(false);+ expect(normalizeEditorSettings({}).showConnectionGroupPath).toBe(false);+ expect(normalizeEditorSettings({ showConnectionGroupPath: true }).showConnectionGroupPath).toBe(true);+ expect(normalizeEditorSettings({ showConnectionGroupPath: "true" as any }).showConnectionGroupPath).toBe(false);+ });+it("migrates legacy partial DDL settings before applying and tracking the patch", async () => {setActivePinia(createPinia());const { useSettingsStore } = await import("@/stores/settingsStore");diff --git a/apps/desktop/src/stores/settingsStore.ts b/apps/desktop/src/stores/settingsStore.tsindex b38d7cd95f..6406cb532d 100644--- a/apps/desktop/src/stores/settingsStore.ts+++ b/apps/desktop/src/stores/settingsStore.ts@@ -1007,6 +1007,8 @@ export interface EditorSettings {showLineNumbers: boolean;showCurrentStatementFrame: boolean;showInsertValueHints: boolean;+ /** Whether the query toolbar connection picker shows the full group path. */+ showConnectionGroupPath: boolean;autoAliasTables: boolean;tableCompletionSchemaQualification: SqlTableCompletionSchemaQualification;insertSpaceAfterCompletion: boolean;@@ -1402,6 +1404,7 @@ export const DEFAULT_EDITOR_SETTINGS: EditorSettings = {showLineNumbers: true,showCurrentStatementFrame: true,showInsertValueHints: true,+ showConnectionGroupPath: false,autoAliasTables: true,tableCompletionSchemaQualification: DEFAULT_SQL_TABLE_COMPLETION_SCHEMA_QUALIFICATION,insertSpaceAfterCompletion: true,@@ -2104,6 +2107,7 @@ export function normalizeEditorSettings(settings: Partial<EditorSettings>, existshowLineNumbers: typeof settings.showLineNumbers === "boolean" ? settings.showLineNumbers : DEFAULT_EDITOR_SETTINGS.showLineNumbers,showCurrentStatementFrame: typeof settings.showCurrentStatementFrame === "boolean" ? settings.showCurrentStatementFrame : DEFAULT_EDITOR_SETTINGS.showCurrentStatementFrame,showInsertValueHints: typeof settings.showInsertValueHints === "boolean" ? settings.showInsertValueHints : DEFAULT_EDITOR_SETTINGS.showInsertValueHints,+ showConnectionGroupPath: typeof settings.showConnectionGroupPath === "boolean" ? settings.showConnectionGroupPath : DEFAULT_EDITOR_SETTINGS.showConnectionGroupPath,autoAliasTables: settings.autoAliasTables ?? DEFAULT_EDITOR_SETTINGS.autoAliasTables,tableCompletionSchemaQualification: normalizeSqlTableCompletionSchemaQualification(settings.tableCompletionSchemaQualification),insertSpaceAfterCompletion: typeof settings.insertSpaceAfterCompletion === "boolean" ? settings.insertSpaceAfterCompletion : DEFAULT_EDITOR_SETTINGS.insertSpaceAfterCompletion,@@ -3035,6 +3039,7 @@ export const useSettingsStore = defineStore("settings", () => {if (partial.showLineNumbers !== undefined) editorSettings.value.showLineNumbers = partial.showLineNumbers === true;if (partial.showCurrentStatementFrame !== undefined) editorSettings.value.showCurrentStatementFrame = partial.showCurrentStatementFrame === true;if (partial.showInsertValueHints !== undefined) editorSettings.value.showInsertValueHints = partial.showInsertValueHints === true;+ if (partial.showConnectionGroupPath !== undefined) editorSettings.value.showConnectionGroupPath = partial.showConnectionGroupPath === true;if (partial.autoAliasTables !== undefined) editorSettings.value.autoAliasTables = partial.autoAliasTables;if (partial.tableCompletionSchemaQualification !== undefined) editorSettings.value.tableCompletionSchemaQualification = normalizeSqlTableCompletionSchemaQualification(partial.tableCompletionSchemaQualification);if (partial.insertSpaceAfterCompletion !== undefined) editorSettings.value.insertSpaceAfterCompletion = partial.insertSpaceAfterCompletion === true;