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(settings): highlight settings items on hover
cowking7b0ea38bbf08
diff --git a/apps/desktop/src/components/editor/EditorSettingsDialog.vue b/apps/desktop/src/components/editor/EditorSettingsDialog.vueindex e86f00f349..576663c5fd 100644--- a/apps/desktop/src/components/editor/EditorSettingsDialog.vue+++ b/apps/desktop/src/components/editor/EditorSettingsDialog.vue@@ -5208,7 +5208,7 @@ onUnmounted(() => {</div><div class="grid grid-cols-2 gap-2 lg:grid-cols-4" data-editor-preview-controls>- <div class="flex min-w-0 items-center justify-between gap-2 rounded-md border bg-muted/20 px-2 py-1.5">+ <div class="settings-item flex min-w-0 items-center justify-between gap-2 rounded-md border bg-muted/20 px-2 py-1.5"><div class="flex min-w-0 items-center gap-1"><Label for="editor-show-statement-run-buttons" class="truncate text-xs">{{ t("settings.showStatementRunButtons") }}</Label><HelpTooltip :label="t('settings.showStatementRunButtons')" trigger-class="[&_svg]:h-3 [&_svg]:w-3" content-class="max-w-64">@@ -5218,7 +5218,7 @@ onUnmounted(() => {<Switch id="editor-show-statement-run-buttons" v-model="editShowStatementRunButtons" size="sm" /></div>- <div class="flex min-w-0 items-center justify-between gap-2 rounded-md border bg-muted/20 px-2 py-1.5">+ <div class="settings-item flex min-w-0 items-center justify-between gap-2 rounded-md border bg-muted/20 px-2 py-1.5"><div class="flex min-w-0 items-center gap-1"><Label for="editor-show-line-numbers" class="truncate text-xs">{{ t("settings.showLineNumbers") }}</Label><HelpTooltip :label="t('settings.showLineNumbers')" trigger-class="[&_svg]:h-3 [&_svg]:w-3" content-class="max-w-64">@@ -5228,7 +5228,7 @@ onUnmounted(() => {<Switch id="editor-show-line-numbers" v-model="editShowLineNumbers" size="sm" /></div>- <div class="flex min-w-0 items-center justify-between gap-2 rounded-md border bg-muted/20 px-2 py-1.5">+ <div class="settings-item flex min-w-0 items-center justify-between gap-2 rounded-md border bg-muted/20 px-2 py-1.5"><div class="flex min-w-0 items-center gap-1"><Label for="editor-show-current-statement-frame" class="truncate text-xs">{{ t("settings.showCurrentStatementFrame") }}</Label><HelpTooltip :label="t('settings.showCurrentStatementFrame')" trigger-class="[&_svg]:h-3 [&_svg]:w-3" content-class="max-w-64">@@ -5238,7 +5238,7 @@ onUnmounted(() => {<Switch id="editor-show-current-statement-frame" v-model="editShowCurrentStatementFrame" size="sm" /></div>- <div class="flex min-w-0 items-center justify-between gap-2 rounded-md border bg-muted/20 px-2 py-1.5">+ <div class="settings-item flex min-w-0 items-center justify-between gap-2 rounded-md border bg-muted/20 px-2 py-1.5"><div class="flex min-w-0 items-center gap-1"><Label for="editor-sql-semantic-diagnostics" class="truncate text-xs">{{ t("settings.sqlSemanticDiagnosticsEnabled") }}</Label><HelpTooltip :label="t('settings.sqlSemanticDiagnosticsEnabled')" trigger-class="[&_svg]:h-3 [&_svg]:w-3" content-class="max-w-64">@@ -5248,7 +5248,7 @@ onUnmounted(() => {<Switch id="editor-sql-semantic-diagnostics" :model-value="editSqlSemanticDiagnosticsEnabled" size="sm" @update:model-value="onSqlSemanticDiagnosticsEnabledChange" /></div>- <div class="flex min-w-0 items-center justify-between gap-2 rounded-md border bg-muted/20 px-2 py-1.5">+ <div class="settings-item flex min-w-0 items-center justify-between gap-2 rounded-md border bg-muted/20 px-2 py-1.5"><div class="flex min-w-0 items-center gap-1"><Label for="editor-show-table-ddl-hover-preview" class="truncate text-xs">{{ t("settings.showTableDdlHoverPreview") }}</Label><HelpTooltip :label="t('settings.showTableDdlHoverPreview')" trigger-class="[&_svg]:h-3 [&_svg]:w-3" content-class="max-w-64">@@ -5262,7 +5262,7 @@ onUnmounted(() => {<Separator /><div class="grid gap-4 md:grid-cols-2" data-editor-execution-settings>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2 md:col-span-2" data-editor-execute-mode>+ <div class="settings-item flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2 md:col-span-2" data-editor-execute-mode><div class="min-w-0 space-y-1"><Label>{{ executeModeLabel }}</Label><p class="text-xs text-muted-foreground">@@ -5280,7 +5280,7 @@ onUnmounted(() => {</Select></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2" data-editor-default-transaction-mode>+ <div class="settings-item flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2" data-editor-default-transaction-mode><div class="min-w-0 space-y-1"><Label for="editor-default-transaction-mode">{{ t("settings.defaultTransactionMode") }}</Label><p class="text-xs text-muted-foreground">@@ -5298,7 +5298,7 @@ onUnmounted(() => {</Select></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2" :class="{ 'opacity-50': editExecuteMode !== 'current' }">+ <div class="settings-item flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2" :class="{ 'opacity-50': editExecuteMode !== 'current' }"><div class="space-y-1"><Label for="editor-execute-all-on-blank-line">{{ t("settings.executeAllOnBlankLine") }}</Label><p class="text-xs text-muted-foreground">@@ -5308,7 +5308,7 @@ onUnmounted(() => {<Switch id="editor-execute-all-on-blank-line" v-model="editExecuteAllOnBlankLine" :disabled="editExecuteMode !== 'current'" class="mt-0.5" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-execution-target-picker">{{ t("settings.showExecutionTargetPicker") }}</Label><p class="text-xs text-muted-foreground">@@ -5318,7 +5318,7 @@ onUnmounted(() => {<Switch id="editor-show-execution-target-picker" v-model="editShowExecutionTargetPicker" class="mt-0.5" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-confirm-dangerous-sql">{{ t("settings.confirmDangerousSqlExecution") }}</Label><p class="text-xs text-muted-foreground">@@ -5328,7 +5328,7 @@ onUnmounted(() => {<Switch id="editor-confirm-dangerous-sql" v-model="editConfirmDangerousSqlExecution" class="mt-0.5" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-continue-on-error">{{ t("settings.continueOnErrorOnBatch") }}</Label><p class="text-xs text-muted-foreground">@@ -5342,7 +5342,7 @@ onUnmounted(() => {<Separator /><div class="grid gap-4 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]" data-editor-sql-completion-settings>- <div class="flex items-start justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2" data-editor-completion-trigger-mode>+ <div class="settings-item flex items-start justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2" data-editor-completion-trigger-mode><div class="min-w-0 space-y-1"><Label>{{ t("settings.completionTriggerMode") }}</Label><p class="text-xs leading-tight text-muted-foreground">@@ -5361,7 +5361,7 @@ onUnmounted(() => {</Select></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-select-first-completion-on-open">{{ t("settings.selectFirstCompletionOnOpen") }}</Label><p class="text-xs text-muted-foreground">@@ -5371,7 +5371,7 @@ onUnmounted(() => {<Switch id="editor-select-first-completion-on-open" v-model="editSelectFirstCompletionOnOpen" class="mt-0.5" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-auto-close-brackets">{{ t("settings.autoCloseBrackets") }}</Label><p class="text-xs text-muted-foreground">@@ -5381,7 +5381,7 @@ onUnmounted(() => {<Switch id="editor-auto-close-brackets" v-model="editAutoCloseBrackets" class="mt-0.5" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-insert-space-after-completion">{{ t("settings.insertSpaceAfterCompletion") }}</Label><p class="text-xs text-muted-foreground">@@ -5391,7 +5391,7 @@ onUnmounted(() => {<Switch id="editor-insert-space-after-completion" v-model="editInsertSpaceAfterCompletion" class="mt-0.5" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-sort-completion-columns-alphabetically">{{ t("settings.sortCompletionColumnsAlphabetically") }}</Label><p class="text-xs text-muted-foreground">@@ -5401,7 +5401,7 @@ onUnmounted(() => {<Switch id="editor-sort-completion-columns-alphabetically" v-model="editSortCompletionColumnsAlphabetically" class="mt-0.5" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-auto-alias-tables">{{ t("settings.autoAliasTables") }}</Label><p class="text-xs text-muted-foreground">@@ -5415,7 +5415,7 @@ onUnmounted(() => {<Separator /><div class="grid gap-4 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]" data-editor-other-settings>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-insert-value-hints">{{ t("settings.showInsertValueHints") }}</Label><p class="text-xs text-muted-foreground">@@ -5425,7 +5425,7 @@ onUnmounted(() => {<Switch id="editor-show-insert-value-hints" v-model="editShowInsertValueHints" class="mt-0.5" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-word-wrap">{{ t("settings.wordWrap") }}</Label><p class="text-xs text-muted-foreground">@@ -5435,7 +5435,7 @@ onUnmounted(() => {<Switch id="editor-word-wrap" v-model="editWordWrap" class="mt-0.5" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-vim-mode">{{ t("settings.vimMode") }}</Label><p class="text-xs text-muted-foreground">@@ -5445,7 +5445,7 @@ onUnmounted(() => {<Switch id="editor-vim-mode" v-model="editVimModeEnabled" class="mt-0.5" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="regex-max-match-count">{{ t("settings.regexMaxMatchCount") }}</Label><p class="text-xs text-muted-foreground">{{ t("settings.regexMaxMatchCountDescription") }}</p>@@ -5465,7 +5465,7 @@ onUnmounted(() => {<Separator /><div class="grid gap-3 md:grid-cols-2">- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2 md:col-span-2">+ <div class="settings-item flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2 md:col-span-2"><div class="min-w-0 space-y-1"><Label for="editor-saved-sql-open-target">{{ t("settings.savedSqlOpenTarget") }}</Label><p class="text-xs text-muted-foreground">@@ -5483,7 +5483,7 @@ onUnmounted(() => {</Select></div>- <div class="rounded-md border bg-muted/20 p-3 md:col-span-2" data-editor-unsaved-sql-settings>+ <div class="settings-item rounded-md border bg-muted/20 p-3 md:col-span-2" data-editor-unsaved-sql-settings><div class="grid gap-4 md:grid-cols-2"><div class="flex min-w-0 items-start justify-between gap-4"><div class="min-w-0 space-y-1">@@ -5520,7 +5520,7 @@ onUnmounted(() => {</div></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="generate-sql-include-database-name">{{ t("settings.generateSqlIncludeDatabaseName") }}</Label><p class="text-xs text-muted-foreground">@@ -5530,7 +5530,7 @@ onUnmounted(() => {<Switch id="generate-sql-include-database-name" v-model="editGenerateSqlIncludeDatabaseName" class="mt-0.5" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="generate-sql-quote-identifiers">{{ t("settings.generateSqlQuoteIdentifiers") }}</Label><p class="text-xs text-muted-foreground">@@ -5540,7 +5540,7 @@ onUnmounted(() => {<Switch id="generate-sql-quote-identifiers" v-model="editGenerateSqlQuoteIdentifiers" class="mt-0.5" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="format-sql-on-sql-file-save">{{ t("settings.formatSqlOnSqlFileSave") }}</Label><p class="text-xs text-muted-foreground">@@ -5583,7 +5583,7 @@ onUnmounted(() => {</div></div><div class="grid gap-3 md:grid-cols-2">- <div v-for="key in SQL_VARIABLE_SYNTAX_KEYS" :key="key" class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2" :class="{ 'opacity-50': !editSqlVariableSubstitutionEnabled }">+ <div v-for="key in SQL_VARIABLE_SYNTAX_KEYS" :key="key" class="settings-item flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2" :class="{ 'opacity-50': !editSqlVariableSubstitutionEnabled }"><div class="min-w-0 space-y-1"><Label :for="`sql-var-syntax-${key}`" class="flex items-center gap-1.5"><span class="font-mono text-xs text-primary">{{ SQL_VARIABLE_SYNTAX_TOKENS[key] }}</span>@@ -5604,7 +5604,7 @@ onUnmounted(() => {<div class="text-sm font-medium text-muted-foreground">{{ t("settings.sqlFileSection") }}</div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="external-sql-editor-max-mb">{{ t("settings.externalSqlEditorMaxMb") }}@@ -6045,7 +6045,7 @@ onUnmounted(() => {</div></div>- <div v-if="!isWeb" class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <div v-if="!isWeb" 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="show-tray-icon">{{ t("settings.showTrayIcon") }}</Label><p class="text-xs text-muted-foreground">@@ -6055,7 +6055,7 @@ onUnmounted(() => {<Switch id="show-tray-icon" v-model="editShowTrayIcon" /></div>- <div v-if="!isWeb" class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <div v-if="!isWeb" 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="quit-on-close">{{ t("settings.quitOnClose") }}</Label><p class="text-xs text-muted-foreground">@@ -6065,7 +6065,7 @@ onUnmounted(() => {<Switch id="quit-on-close" v-model="editQuitOnClose" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="update-notifications-enabled">{{ t("settings.updateNotificationsEnabled") }}</Label><p class="text-xs text-muted-foreground">@@ -6075,7 +6075,7 @@ onUnmounted(() => {<Switch id="update-notifications-enabled" v-model="editUpdateNotificationsEnabled" /></div>- <div v-if="!isWeb" class="flex flex-col gap-3 rounded-md border bg-muted/20 px-3 py-2">+ <div v-if="!isWeb" class="settings-item flex flex-col gap-3 rounded-md border bg-muted/20 px-3 py-2"><div class="flex items-center justify-between gap-4"><div class="space-y-1"><Label for="debug-logging-enabled">{{ t("settings.debugLoggingEnabled") }}</Label>@@ -6188,7 +6188,7 @@ onUnmounted(() => {<p>{{ t("settings.toolbarHiddenHint") }}</p></HelpTooltip></div>- <div class="flex items-center justify-between gap-4 rounded-md border border-border/60 p-3">+ <div class="settings-item flex items-center justify-between gap-4 rounded-md border border-border/60 p-3"><div class="space-y-1"><Label for="exclusive-right-sidebar-panels" class="text-sm cursor-pointer">{{ t("settings.exclusiveRightSidebarPanels") }}</Label><p class="text-xs text-muted-foreground">@@ -6232,7 +6232,7 @@ onUnmounted(() => {</Button></div></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-browse-objects-on-database-activation">{{ t("settings.sidebarBrowseObjectsOnDatabaseActivation") }}</Label><HelpTooltip :label="t('settings.sidebarBrowseObjectsOnDatabaseActivation')">@@ -6302,7 +6302,7 @@ onUnmounted(() => {</Button></div></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="open-data-tabs-next-to-active">{{ t("settings.openDataTabsNextToActive") }}</Label><HelpTooltip :label="t('settings.openDataTabsNextToActive')">@@ -6381,7 +6381,7 @@ onUnmounted(() => {</div></div><div class="grid gap-3 md:grid-cols-2">- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-click-table-navigation-ddl">{{ t("settings.clickTableNavigationTarget") }}</Label><p class="text-xs text-muted-foreground">@@ -6391,7 +6391,7 @@ onUnmounted(() => {<Switch id="editor-click-table-navigation-ddl" :model-value="editClickTableNavigationTarget === 'ddl'" @update:model-value="editClickTableNavigationTarget = $event ? 'ddl' : 'data'" class="mt-0.5" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-prefill-new-query">{{ t("settings.prefillNewQueryWithSelect") }}</Label><p class="text-xs text-muted-foreground">@@ -6401,7 +6401,7 @@ onUnmounted(() => {<Switch id="editor-prefill-new-query" v-model="editPrefillNewQueryWithSelect" class="mt-0.5" /></div></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-table-search-enabled">{{ t("settings.sidebarTableSearchEnabled") }}</Label><HelpTooltip :label="t('settings.sidebarTableSearchEnabled')">@@ -6410,7 +6410,7 @@ onUnmounted(() => {</div><Switch id="sidebar-table-search-enabled" v-model="editSidebarTableSearchEnabled" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="auto-select-active-sidebar-node">{{ t("settings.autoSelectActiveSidebarNode") }}</Label><HelpTooltip :label="t('settings.autoSelectActiveSidebarNode')">@@ -6419,7 +6419,7 @@ onUnmounted(() => {</div><Switch id="auto-select-active-sidebar-node" v-model="editAutoSelectActiveSidebarNode" /></div>- <div class="space-y-2 rounded-md border bg-muted/20 px-3 py-2">+ <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><HelpTooltip :label="t('settings.openTabsRestoreMode')">@@ -6440,7 +6440,7 @@ onUnmounted(() => {{{ t("settings.openTabsRestoreModeHint") }}</p></div>- <div class="space-y-2 rounded-md border bg-muted/20 px-3 py-2">+ <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="disconnect-tab-handling-mode">{{ t("settings.disconnectTabHandlingMode") }}</Label><HelpTooltip :label="t('settings.disconnectTabHandlingMode')">@@ -6465,7 +6465,7 @@ onUnmounted(() => {{{ t(`settings.${disconnectTabHandlingModeDescriptionKey}`) }}</p></div>- <div class="space-y-2 rounded-md border bg-muted/20 px-3 py-2">+ <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="sidebar-object-info-mode">{{ t("settings.sidebarObjectInfoMode") }}</Label><HelpTooltip :label="t('settings.sidebarObjectInfoMode')">@@ -6485,7 +6485,7 @@ onUnmounted(() => {</SelectContent></Select></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-allow-horizontal-scroll">{{ t("settings.sidebarAllowHorizontalScroll") }}@@ -6496,7 +6496,7 @@ onUnmounted(() => {</div><Switch id="sidebar-allow-horizontal-scroll" v-model="editSidebarAllowHorizontalScroll" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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-show-tooltips">{{ t("settings.sidebarShowTooltips") }}@@ -6507,7 +6507,7 @@ onUnmounted(() => {</div><Switch id="sidebar-show-tooltips" v-model="editSidebarShowTooltips" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="sidebar-indent">{{ t("settings.sidebarIndent") }}</Label><p class="text-xs text-muted-foreground">@@ -6530,7 +6530,7 @@ onUnmounted(() => {"/></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="sidebar-font-size">{{ t("settings.sidebarFontSize") }}</Label><p class="text-xs text-muted-foreground">@@ -6565,7 +6565,7 @@ onUnmounted(() => {{{ t("settings.sidebarHiddenTablePrefixesDescription") }}</p></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="sidebar-copy-table-name-separator">{{ t("settings.sidebarCopyTableNameSeparator") }}</Label><p class="text-xs text-muted-foreground">@@ -6590,7 +6590,7 @@ onUnmounted(() => {</SelectContent></Select></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="sidebar-copy-table-name-include-schema">{{ t("settings.sidebarCopyTableNameIncludeSchema") }}</Label><p class="text-xs text-muted-foreground">@@ -6599,7 +6599,7 @@ onUnmounted(() => {</div><Switch id="sidebar-copy-table-name-include-schema" v-model="editSidebarCopyTableNameIncludeSchema" class="mt-0.5" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="sidebar-table-page-size">{{ t("settings.sidebarTablePageSize") }}</Label><p class="text-xs text-muted-foreground">@@ -6684,7 +6684,7 @@ onUnmounted(() => {<span class="truncate">{{ t("grid.filterTextView") }}</span></Button></div>- <div v-if="editDataGridFilterEditorView !== 'quick'" class="flex items-center justify-between gap-4 rounded-md border bg-background px-3 py-2">+ <div v-if="editDataGridFilterEditorView !== 'quick'" class="settings-item flex items-center justify-between gap-4 rounded-md border bg-background px-3 py-2"><div class="space-y-1"><Label for="data-grid-keep-filter-editor-expanded">{{ t("settings.dataGridKeepFilterEditorExpanded") }}</Label><p class="text-xs text-muted-foreground">{{ t("settings.dataGridKeepFilterEditorExpandedDescription") }}</p>@@ -6767,7 +6767,7 @@ onUnmounted(() => {<div class="text-sm font-medium text-muted-foreground">{{ t("settings.dataGridDisplay") }}</div>- <div data-settings-search-id="data-grid-type-colors" :class="['flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2', settingsSearchTargetClass('data-grid-type-colors')]">+ <div data-settings-search-id="data-grid-type-colors" :class="['settings-item flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2', settingsSearchTargetClass('data-grid-type-colors')]"><div class="space-y-1 min-w-0"><Label>{{ t("settings.dataGridTypeColorScheme") }}</Label><p class="text-xs text-muted-foreground">@@ -6782,7 +6782,7 @@ onUnmounted(() => {</Button></div></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="table-open-page-size">{{ t("settings.tableOpenPageSize") }}@@ -6793,7 +6793,7 @@ onUnmounted(() => {</div><Input id="table-open-page-size" type="number" inputmode="numeric" class="h-7 w-24 px-2 text-left text-xs tabular-nums" :min="MIN_RESULT_PAGE_SIZE" :max="MAX_RESULT_PAGE_SIZE" :model-value="editTableOpenPageSize" @update:model-value="updateTableOpenPageSizeDraft" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="query-page-size">{{ t("settings.queryPageSize") }}@@ -6814,7 +6814,7 @@ onUnmounted(() => {@update:model-value="updatePageSizeDraft"/></div>- <div data-settings-search-id="multi-statement-default-view" :class="['flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2', settingsSearchTargetClass('multi-statement-default-view')]">+ <div data-settings-search-id="multi-statement-default-view" :class="['settings-item flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2', settingsSearchTargetClass('multi-statement-default-view')]"><div class="min-w-0 space-y-1"><Label for="multi-statement-default-view">{{ t("settings.multiStatementDefaultView") }}</Label><p class="text-xs text-muted-foreground">{{ t("settings.multiStatementDefaultViewDescription") }}</p>@@ -6829,7 +6829,7 @@ onUnmounted(() => {</SelectContent></Select></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="query-result-max-rows-enabled">{{ t("settings.queryResultMaxRows") }}@@ -6854,7 +6854,7 @@ onUnmounted(() => {<Switch id="query-result-max-rows-enabled" v-model="editQueryResultMaxRowsEnabled" :aria-label="t('settings.queryResultMaxRowsEnabled')" /></div></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="infinite-scroll">{{ t("settings.infiniteScroll") }}@@ -6865,7 +6865,7 @@ onUnmounted(() => {</div><Switch id="infinite-scroll" v-model="editInfiniteScroll" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="auto-calculate-total-rows">{{ t("settings.autoCalculateTotalRows") }}@@ -6876,7 +6876,7 @@ onUnmounted(() => {</div><Switch id="auto-calculate-total-rows" v-model="editAutoCalculateTotalRows" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="show-column-comments-in-header">{{ t("settings.showColumnCommentsInHeader") }}@@ -6887,7 +6887,7 @@ onUnmounted(() => {</div><Switch id="show-column-comments-in-header" v-model="editShowColumnCommentsInHeader" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="show-column-types-in-header">{{ t("settings.showColumnTypesInHeader") }}@@ -6898,7 +6898,7 @@ onUnmounted(() => {</div><Switch id="show-column-types-in-header" v-model="editShowColumnTypesInHeader" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="data-grid-show-transpose-field-metadata">{{ t("settings.dataGridShowTransposeFieldMetadata") }}@@ -6909,7 +6909,7 @@ onUnmounted(() => {</div><Switch id="data-grid-show-transpose-field-metadata" v-model="editDataGridShowTransposeFieldMetadata" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="colorize-data-grid-cell-types">{{ t("settings.colorizeDataGridCellTypes") }}@@ -6920,7 +6920,7 @@ onUnmounted(() => {</div><Switch id="colorize-data-grid-cell-types" v-model="editColorizeDataGridCellTypes" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="show-index-indicators-in-header">{{ t("settings.showIndexIndicatorsInHeader") }}@@ -6931,7 +6931,7 @@ onUnmounted(() => {</div><Switch id="show-index-indicators-in-header" v-model="editShowIndexIndicatorsInHeader" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="compact-column-header-actions">{{ t("settings.compactColumnHeaderActions") }}@@ -6942,7 +6942,7 @@ onUnmounted(() => {</div><Switch id="compact-column-header-actions" v-model="editCompactColumnHeaderActions" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="data-grid-quick-entry">{{ t("settings.dataGridQuickEntry") }}@@ -6953,7 +6953,7 @@ onUnmounted(() => {</div><Switch id="data-grid-quick-entry" v-model="editDataGridQuickEntry" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="data-grid-auto-transpose-single-row">{{ t("settings.dataGridAutoTransposeSingleRow") }}@@ -6964,7 +6964,7 @@ onUnmounted(() => {</div><Switch id="data-grid-auto-transpose-single-row" v-model="editDataGridAutoTransposeSingleRow" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="data-grid-cell-detail-button-visible">{{ t("settings.dataGridCellDetailButtonVisible") }}@@ -6975,7 +6975,7 @@ onUnmounted(() => {</div><Switch id="data-grid-cell-detail-button-visible" v-model="editDataGridCellDetailButtonVisible" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="data-grid-crosshair-highlight">{{ t("settings.dataGridCrosshairHighlight") }}@@ -6986,7 +6986,7 @@ onUnmounted(() => {</div><Switch id="data-grid-crosshair-highlight" v-model="editDataGridCrosshairHighlight" /></div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="flattening-multi-line">{{ t("settings.flatteningMultiLineText") }}@@ -7002,7 +7002,7 @@ onUnmounted(() => {<template v-if="!isWeb"><div class="space-y-3"><div class="text-sm font-medium text-muted-foreground">DuckDB</div>- <div class="space-y-3 rounded-md border bg-muted/20 px-3 py-2">+ <div class="settings-item space-y-3 rounded-md border bg-muted/20 px-3 py-2"><div class="flex items-start justify-between gap-4"><div class="space-y-1"><Label for="duckdb-worker-process-isolation">@@ -7054,7 +7054,7 @@ onUnmounted(() => {<div class="text-sm font-medium text-muted-foreground">{{ t("settings.dateTimeSection") }}</div>- <div class="grid gap-3 rounded-md border bg-muted/20 px-3 py-3 sm:grid-cols-[minmax(0,1fr)_minmax(220px,0.8fr)] sm:items-center">+ <div class="settings-item grid gap-3 rounded-md border bg-muted/20 px-3 py-3 sm:grid-cols-[minmax(0,1fr)_minmax(220px,0.8fr)] sm:items-center"><div><Label>{{ t("settings.globalDateTimeDisplayFormat") }}</Label><p class="mt-1 text-xs text-muted-foreground">@@ -7208,7 +7208,7 @@ onUnmounted(() => {<div class="text-sm font-medium text-muted-foreground">{{ t("settings.sqlFileSection") }}</div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <div class="settings-item flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2" :class="{ 'settings-item-disabled': !webSqlFileUploadMaxMbLoaded || webSqlFileUploadMaxMbLoading }"><div class="space-y-1"><Label for="web-sql-file-upload-max-mb">{{ t("settings.webSqlFileUploadMaxMb") }}@@ -7242,7 +7242,7 @@ onUnmounted(() => {<div class="text-sm font-medium text-muted-foreground">{{ t("settings.performanceSection") }}</div>- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <div class="settings-item flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2"><div class="min-w-0 space-y-1"><Label for="metadata-cache-memory-limit">{{ t("settings.metadataCacheMemoryLimit") }}</Label><p class="text-xs text-muted-foreground">@@ -7262,7 +7262,7 @@ onUnmounted(() => {<div class="text-sm font-medium text-muted-foreground">{{ t("settings.tableStructureSection") }}</div>- <div ref="tableColumnTemplateSectionRef" data-settings-search-id="table-column-templates" :class="['space-y-2 rounded-md border bg-muted/20 px-3 py-2', settingsSearchTargetClass('table-column-templates')]">+ <div ref="tableColumnTemplateSectionRef" data-settings-search-id="table-column-templates" :class="['settings-item space-y-2 rounded-md border bg-muted/20 px-3 py-2', settingsSearchTargetClass('table-column-templates')]"><div class="flex items-start justify-between gap-3"><div class="space-y-1"><Label>{{ t("settings.tableColumnTemplateFields") }}</Label>@@ -7656,7 +7656,7 @@ LIMIT 100;</pre{{ t("settings.syncRemotePathDescription") }}</p></div>- <div class="space-y-2 md:col-span-2 rounded-md border bg-muted/20 px-3 py-3">+ <div class="settings-item space-y-2 md:col-span-2 rounded-md border bg-muted/20 px-3 py-3"><label class="flex items-center gap-2 text-xs"><input v-model="webdavAutoUploadEnabled" type="checkbox" class="h-4 w-4 shrink-0 accent-primary" /><span class="font-medium">{{ t("settings.syncAutoUpload") }}</span>@@ -7813,7 +7813,7 @@ LIMIT 100;</pre</TabsContent></Tabs>- <div class="mt-5 space-y-3 rounded-md border bg-muted/20 px-3 py-3">+ <div class="settings-item mt-5 space-y-3 rounded-md border bg-muted/20 px-3 py-3"><div class="flex items-center justify-between gap-4"><div class="space-y-1"><Label for="sync-secrets">{{ t("settings.syncSecrets") }}</Label>@@ -7962,7 +7962,7 @@ LIMIT 100;</pre<!-- Restore last AI conversation (list mode, global) --><div v-if="aiConfigListMode === 'list'" class="space-y-3"><Separator />- <div class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <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="ai-restore-last-conversation">{{ t("ai.restoreLastConversation") }}@@ -8521,7 +8521,7 @@ LIMIT 100;</pre</div><div v-if="!isWeb" class="space-y-4">- <div class="rounded-md border bg-muted/20 p-4">+ <div class="settings-item rounded-md border bg-muted/20 p-4" :class="{ 'settings-item-disabled': mcpHttpLoading || mcpHttpSaving }"><div class="flex items-start justify-between gap-4"><div class="space-y-1"><div class="flex items-center gap-2">@@ -9217,7 +9217,7 @@ LIMIT 100;</pre<ChangelogPanel :checking-updates="props.checkingUpdates" @check-updates="emit('check-updates')" />- <div class="rounded-lg border p-4">+ <div class="settings-item rounded-lg border p-4"><div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between"><div class="min-w-0 space-y-1"><Label>{{ t("settings.updateDownloadSource") }}</Label>@@ -9628,6 +9628,24 @@ LIMIT 100;</premargin-top: 0.625rem;}+.settings-item:not(.settings-item-disabled):not(.opacity-50) {+ transition:+ background-color 150ms ease-out,+ border-color 150ms ease-out;+}++.settings-item:not(.settings-item-disabled):not(.opacity-50):hover {+ border-color: var(--muted-foreground);+ background-color: var(--muted);+}++@supports (background: color-mix(in oklab, black, white)) {+ .settings-item:not(.settings-item-disabled):not(.opacity-50):hover {+ border-color: color-mix(in oklab, var(--border) 80%, var(--muted-foreground));+ background-color: color-mix(in oklab, var(--muted) 40%, var(--background));+ }+}+.settings-editor-live-preview {border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent);background: var(--background);diff --git a/apps/desktop/src/components/editor/__tests__/EditorSettingsDialog.itemHover.spec.ts b/apps/desktop/src/components/editor/__tests__/EditorSettingsDialog.itemHover.spec.tsnew file mode 100644index 0000000000..c73354b9aa--- /dev/null+++ b/apps/desktop/src/components/editor/__tests__/EditorSettingsDialog.itemHover.spec.ts@@ -0,0 +1,120 @@+import { readFileSync } from "node:fs";+import { describe, expect, it } from "vitest";++const dialogSource = readFileSync(new URL("../EditorSettingsDialog.vue", import.meta.url), "utf8");+const templateSource = dialogSource.slice(dialogSource.indexOf("<template>"));+const styleSource = dialogSource.slice(dialogSource.indexOf("<style>"), dialogSource.indexOf("</style>"));++function sourceIndexForKey(key: string): number {+ const index = templateSource.indexOf(`t("settings.${key}")`);+ if (index < 0) throw new Error(`Missing settings key: ${key}`);+ return index;+}++function tagEnd(source: string, start: number): number {+ let quote: '"' | "'" | null = null;+ for (let index = start; index < source.length; index += 1) {+ const char = source[index];+ if (quote) {+ if (char === quote && source[index - 1] !== "\\") quote = null;+ } else if (char === '"' || char === "'") {+ quote = char;+ } else if (char === ">") {+ return index;+ }+ }+ return -1;+}++function borderedSettingDivForKey(key: string): string {+ const keyIndex = sourceIndexForKey(key);+ let start = templateSource.lastIndexOf("<div", keyIndex);+ while (start >= 0) {+ const end = tagEnd(templateSource, start);+ const tag = templateSource.slice(start, end + 1);+ if (tag.includes("rounded") && tag.includes("border")) return tag;+ start = templateSource.lastIndexOf("<div", start - 1);+ }+ throw new Error(`Missing bordered setting div for settings key: ${key}`);+}++function divTagForAttribute(attribute: string): string {+ const index = templateSource.indexOf(attribute);+ if (index < 0) throw new Error(`Missing template attribute: ${attribute}`);+ let start = templateSource.lastIndexOf("<div", index);+ while (start >= 0) {+ const end = tagEnd(templateSource, start);+ if (end >= index) return templateSource.slice(start, end + 1);+ start = templateSource.lastIndexOf("<div", start - 1);+ }+ throw new Error(`Missing div for template attribute: ${attribute}`);+}++function settingItemDivForText(text: string): string {+ const index = templateSource.indexOf(text);+ if (index < 0) throw new Error(`Missing template text: ${text}`);+ let start = templateSource.lastIndexOf("<div", index);+ while (start >= 0) {+ const end = tagEnd(templateSource, start);+ const tag = templateSource.slice(start, end + 1);+ if (tag.includes("settings-item")) return tag;+ start = templateSource.lastIndexOf("<div", start - 1);+ }+ throw new Error(`Missing settings item for template text: ${text}`);+}++function borderedDivForText(text: string): string {+ const index = templateSource.indexOf(text);+ if (index < 0) throw new Error(`Missing template text: ${text}`);+ let start = templateSource.lastIndexOf("<div", index);+ while (start >= 0) {+ const end = tagEnd(templateSource, start);+ const tag = templateSource.slice(start, end + 1);+ if (tag.includes("rounded") && tag.includes("border")) return tag;+ start = templateSource.lastIndexOf("<div", start - 1);+ }+ throw new Error(`Missing bordered div for template text: ${text}`);+}++describe("EditorSettingsDialog standard item hover feedback", () => {+ it("marks representative editor, navigation, data, toolbar, and update setting rows for the shared hover treatment", () => {+ for (const key of ["showStatementRunButtons", "externalSqlEditorMaxMb", "dataGridTypeColorScheme", "exclusiveRightSidebarPanels", "updateDownloadSource"] as const) {+ expect(borderedSettingDivForKey(key)).toContain("settings-item");+ }+ });++ it("keeps hover feedback off rows while their controls are disabled", () => {+ expect(settingItemDivForText('id="web-sql-file-upload-max-mb"')).toContain("'settings-item-disabled': !webSqlFileUploadMaxMbLoaded || webSqlFileUploadMaxMbLoading");+ expect(settingItemDivForText('id="mcp-http-enabled"')).toContain("'settings-item-disabled': mcpHttpLoading || mcpHttpSaving");+ expect(styleSource).toMatch(/\.settings-item:not\(\.settings-item-disabled\):not\(\.opacity-50\):hover/);+ });++ it("provides legacy color fallbacks before progressively enhancing hover colors", () => {+ const fallbackStart = styleSource.indexOf(".settings-item:not(.settings-item-disabled):not(.opacity-50):hover");+ const enhancementStart = styleSource.indexOf("@supports (background: color-mix(in oklab, black, white))");+ expect(fallbackStart).toBeGreaterThan(-1);+ expect(enhancementStart).toBeGreaterThan(fallbackStart);+ expect(styleSource.slice(fallbackStart, enhancementStart)).toContain("background-color: var(--muted);");+ expect(styleSource.slice(fallbackStart, enhancementStart)).toContain("border-color: var(--muted-foreground);");+ expect(styleSource.slice(enhancementStart)).toContain("color-mix(in oklab");+ });++ it("limits shared hover feedback to independent rows instead of composite and informational containers", () => {+ expect(divTagForAttribute('data-settings-search-id="data-grid-filter-view"')).not.toContain("settings-item");+ expect(borderedSettingDivForKey("dataGridKeepFilterEditorExpanded")).toContain("settings-item");++ for (const text of ['t("settings.mcpHttpWebServiceTitle")', 't("settings.mcpHttpUnsavedChangesHint")', "{{ mcpStatus.bin_path }}", 't("settings.mcpCursorConfigPath")', 't("settings.mcpQoderConfigPath")', 't("settings.supportInfoTitle")'] as const) {+ expect(borderedDivForText(text)).not.toContain("settings-item");+ }+ });++ it("uses direct selectors without styling nested descendants", () => {+ expect(styleSource).not.toContain(".settings-item *");+ expect(styleSource).not.toContain(".settings-item:hover *");+ });++ it("leaves choice cards and shortcut rows on their existing interaction styles", () => {+ expect(borderedSettingDivForKey("showStatementRunButtons")).not.toContain("settings-choice-card");+ expect(templateSource).toContain("settings-shortcut-row group");+ });+});diff --git a/apps/desktop/src/components/editor/__tests__/EditorSettingsDialog.previewPosition.spec.ts b/apps/desktop/src/components/editor/__tests__/EditorSettingsDialog.previewPosition.spec.tsindex 753a20da0c..9935a0f62a 100644--- a/apps/desktop/src/components/editor/__tests__/EditorSettingsDialog.previewPosition.spec.ts+++ b/apps/desktop/src/components/editor/__tests__/EditorSettingsDialog.previewPosition.spec.ts@@ -71,10 +71,10 @@ describe("EditorSettingsDialog live preview placement", () => {expect(completionTriggerMode).toBeGreaterThan(completionSection);expect(selectFirstCompletion).toBeGreaterThan(completionTriggerMode);expect(editorSection).not.toContain('t("settings.sqlCompletionSection")');- expect(editorSection).toContain('class="flex items-start justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2" data-editor-completion-trigger-mode');+ expect(editorSection).toContain('class="settings-item flex items-start justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2" data-editor-completion-trigger-mode');expect(editorSection).toContain('<SelectTrigger class="h-8 w-44 shrink-0">');expect(editorSection).toContain('class="grid gap-4 md:grid-cols-2" data-editor-execution-settings');- expect(editorSection).toContain('class="flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2 md:col-span-2" data-editor-execute-mode');+ expect(editorSection).toContain('class="settings-item flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2 md:col-span-2" data-editor-execute-mode');expect(editorSection.match(/:model-value="editCompletionTriggerMode"/g)).toHaveLength(1);expect(editorSection.match(/id="editor-select-first-completion-on-open"/g)).toHaveLength(1);});