Skip to content

armgit / dbx

Public Imported from GitHub
0

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。

fix(sidebar): consolidate search options and shorten Redis import labels (#13682)

zipg9b46b83142a5
diff --git a/apps/desktop/src/components/layout/AppSidebar.vue b/apps/desktop/src/components/layout/AppSidebar.vue
index 16ec78b747..6361c00053 100644
--- a/apps/desktop/src/components/layout/AppSidebar.vue
+++ b/apps/desktop/src/components/layout/AppSidebar.vue
@@ -54,8 +54,8 @@ const importSourceItems = computed(() => [
{ value: "navicat", label: t("sidebar.importNavicat") },
{ value: "dbeaver", label: t("sidebar.importDbeaver") },
{ value: "datagrip", label: t("sidebar.importDatagrip") },
- { value: "rdm", label: t("sidebar.importRdm") },
- { value: "another-redis", label: t("sidebar.importAnotherRedis") },
+ { value: "rdm", label: t("sidebar.importRdm"), tooltip: "RedisDesktopManager" },
+ { value: "another-redis", label: t("sidebar.importAnotherRedis"), tooltip: "Another Redis Desktop Manager" },
]);
const connectionTransferItems = computed(() => [
...importSourceItems.value.map((item) => ({
diff --git a/apps/desktop/src/components/layout/WelcomeScreen.vue b/apps/desktop/src/components/layout/WelcomeScreen.vue
index 9a065ad1b7..cbf9f22829 100644
--- a/apps/desktop/src/components/layout/WelcomeScreen.vue
+++ b/apps/desktop/src/components/layout/WelcomeScreen.vue
@@ -50,8 +50,8 @@ const importSourceItems = computed(() => [
{ value: "navicat", label: t("sidebar.importNavicat") },
{ value: "dbeaver", label: t("sidebar.importDbeaver") },
{ value: "datagrip", label: t("sidebar.importDatagrip") },
- { value: "rdm", label: t("sidebar.importRdm") },
- { value: "another-redis", label: t("sidebar.importAnotherRedis") },
+ { value: "rdm", label: t("sidebar.importRdm"), tooltip: "RedisDesktopManager" },
+ { value: "another-redis", label: t("sidebar.importAnotherRedis"), tooltip: "Another Redis Desktop Manager" },
]);
function selectImportSource(source: string) {
diff --git a/apps/desktop/src/components/sidebar/ConnectionTree.vue b/apps/desktop/src/components/sidebar/ConnectionTree.vue
index 542a14dc39..b5f799701a 100644
--- a/apps/desktop/src/components/sidebar/ConnectionTree.vue
+++ b/apps/desktop/src/components/sidebar/ConnectionTree.vue
@@ -24,7 +24,7 @@ import {
type SidebarRegexScopeIdentity,
localTableSearchParentTypes,
} from "@/lib/sidebar/sidebarSearchTree";
-import { createSidebarLabelMatcher, type SidebarSearchMatchMode } from "@/lib/sidebar/sidebarSearch";
+import { createSidebarLabelMatcher } from "@/lib/sidebar/sidebarSearch";
import { firstSidebarSearchMatchDataNode, hasActiveSidebarSearch } from "@/lib/sidebar/sidebarSearchEnter";
import { collectSidebarRegexIndexScopes } from "@/lib/sidebar/sidebarRegexSearchIndex";
import { collectSidebarGlobalSearchIndexes, sidebarIndexedObjectGroupTypes } from "@/lib/sidebar/sidebarGlobalSearchIndex";
@@ -73,7 +73,6 @@ import ActiveConnectionFilterButton from "./ActiveConnectionFilterButton.vue";
import SidebarListOptionsIcon from "./SidebarListOptionsIcon.vue";
import SidebarLocateButton from "./SidebarLocateButton.vue";
import SidebarRegexToggleButton from "./SidebarRegexToggleButton.vue";
-import SidebarSearchMatchModeSelect from "./SidebarSearchMatchModeSelect.vue";
import SidebarTreeRuntimeHost from "./SidebarTreeRuntimeHost.vue";
import SidebarTreeItemDialogs from "./SidebarTreeItemDialogs.vue";
import SidebarTableVGroupDialog from "./SidebarTableVGroupDialog.vue";
@@ -120,14 +119,9 @@ const { toast } = useToast();
const searchQuery = ref("");
const deferredSearchQuery = ref("");
const regexMode = ref(false);
-// Session-scoped foreground match mode (#13505). Deliberately not persisted:
-// the default stays `fuzzy`, i.e. today's behavior, and the choice resets with
-// the window. Regex mode keeps its own semantics and disables this selector.
-// Scope: the top search input only (tree search + global table index). The
-// per-database inline search boxes keep their own local/remote behavior; the
-// remote path is server-filtered, so sharing this mode would make local and
-// remote results diverge.
-const searchMatchMode = ref<SidebarSearchMatchMode>("fuzzy");
+// The saved preference applies to the top search only; database-inline searches
+// retain their local/remote contracts. Regex continues to override plain text.
+const searchMatchMode = computed(() => settingsStore.editorSettings.sidebarSearchMatchMode);
store.sidebarSearchQuery = "";
const showConnectedConnectionsOnly = ref(false);
const isDisconnectingAllActiveConnections = ref(false);
@@ -346,15 +340,26 @@ const connectionListSortMenuItems = computed(() => [
]);
const isConnectionListAlphabeticallySorted = computed(() => settingsStore.editorSettings.sidebarConnectionSortMode !== "manual");
-const sidebarListOptionsLabel = computed(() => `${t("sidebar.sortConnections")} / ${t("sidebar.filterByType")}`);
+const sidebarListOptionsLabel = computed(() => t("sidebar.listOptions"));
const sidebarListOptionItems = computed(() => [
+ ...(["fuzzy", "contains"] as const).map((mode, index) => ({
+ value: `match:${mode}`,
+ label: t(mode === "fuzzy" ? "sidebar.searchMatchModeFuzzy" : "sidebar.searchMatchModeContains"),
+ groupLabel: index === 0 ? t("sidebar.searchMatchMode") : undefined,
+ tooltip: t("sidebar.searchMatchModeTooltip"),
+ role: "menuitemradio" as const,
+ disabled: regexMode.value,
+ })),
...connectionListSortMenuItems.value.map((item, index) => ({
...item,
value: `sort:${item.value}`,
+ role: "menuitemradio" as const,
+ separatorBefore: index === 0,
groupLabel: index === 0 ? t("sidebar.sortConnections") : undefined,
})),
...searchScopeOptions.value.map((item, index) => ({
value: `scope:${item.scope}`,
+ role: "menuitemcheckbox" as const,
label: item.label,
icon: item.icon,
separatorBefore: index === 0,
@@ -371,7 +376,7 @@ const sidebarListOptionItems = computed(() => [
]
: []),
]);
-const selectedSidebarListOptions = computed(() => [`sort:${settingsStore.editorSettings.sidebarConnectionSortMode}`, ...selectedSearchScopes.value.map((scope) => `scope:${scope}`)]);
+const selectedSidebarListOptions = computed(() => [`match:${searchMatchMode.value}`, `sort:${settingsStore.editorSettings.sidebarConnectionSortMode}`, ...selectedSearchScopes.value.map((scope) => `scope:${scope}`)]);
const hasCustomSidebarListOptions = computed(() => isConnectionListAlphabeticallySorted.value || hasSearchScopeFilter.value);
function updateConnectionListSortMode(mode: string) {
@@ -402,6 +407,10 @@ function toggleSearchScope(scope: SearchScope) {
}
function selectSidebarListOption(value: string) {
+ if (value === "match:fuzzy" || value === "match:contains") {
+ if (!regexMode.value) settingsStore.updateEditorSettings({ sidebarSearchMatchMode: value === "match:contains" ? "contains" : "fuzzy" });
+ return;
+ }
if (value.startsWith("sort:")) {
updateConnectionListSortMode(value.slice("sort:".length));
return;
@@ -2854,7 +2863,7 @@ defineExpose({
autocapitalize="off"
autocorrect="off"
spellcheck="false"
- class="w-full h-6 pl-7 pr-[6.25rem] text-xs rounded border bg-background focus:outline-none focus:ring-1 focus:ring-ring"
+ class="w-full h-6 pl-7 pr-[4.75rem] text-xs rounded border bg-background focus:outline-none focus:ring-1 focus:ring-ring"
:class="regexMode && compileSearchRegex(searchQuery).invalid ? 'border-destructive focus:ring-destructive' : 'border-border'"
:aria-invalid="regexMode && compileSearchRegex(searchQuery).invalid ? 'true' : 'false'"
:placeholder="t('grid.search')"
@@ -2867,8 +2876,6 @@ defineExpose({
<LightTooltip :text="t('sidebar.regexSearchTooltip')" side="top" :delay="300">
<SidebarRegexToggleButton :label="t('sidebar.regexSearch')" :pressed="regexMode" :invalid="regexMode && compileSearchRegex(searchQuery).invalid" @toggle="regexMode = !regexMode" />
</LightTooltip>
- <!-- Regex has its own semantics, so the plain-text match mode is disabled while it is on. -->
- <SidebarSearchMatchModeSelect v-model="searchMatchMode" :disabled="regexMode" />
<LightTooltip :text="t('sidebar.globalLocalSearchTooltip')" side="top" :delay="300">
<Switch size="sm" :model-value="settingsStore.editorSettings.sidebarGlobalSearchLocal" :disabled="regexMode" :aria-label="t('sidebar.globalLocalSearch')" @update:model-value="settingsStore.updateEditorSettings({ sidebarGlobalSearchLocal: Boolean($event) })" />
</LightTooltip>
diff --git a/apps/desktop/src/components/sidebar/SidebarSearchMatchModeSelect.vue b/apps/desktop/src/components/sidebar/SidebarSearchMatchModeSelect.vue
deleted file mode 100644
index 4a6fc636f2..0000000000
--- a/apps/desktop/src/components/sidebar/SidebarSearchMatchModeSelect.vue
+++ /dev/null
@@ -1,82 +0,0 @@
-<script setup lang="ts">
-import { computed } from "vue";
-import { useI18n } from "vue-i18n";
-import { BetweenHorizontalStart, TextSearch, Wand2 } from "@lucide/vue";
-import LightDropdownMenu, { type LightDropdownMenuItem } from "@/components/ui/LightDropdownMenu.vue";
-import LightTooltip from "@/components/ui/LightTooltip.vue";
-import type { SidebarSearchMatchMode } from "@/lib/sidebar/sidebarSearch";
-
-const props = defineProps<{
- modelValue: SidebarSearchMatchMode;
- disabled?: boolean;
-}>();
-
-const emit = defineEmits<{
- "update:modelValue": [mode: SidebarSearchMatchMode];
-}>();
-
-const { t } = useI18n();
-
-const MODE_ICONS = {
- fuzzy: Wand2,
- contains: TextSearch,
- edges: BetweenHorizontalStart,
-} as const;
-
-const MODE_LABEL_KEYS = {
- fuzzy: "sidebar.searchMatchModeFuzzy",
- contains: "sidebar.searchMatchModeContains",
- edges: "sidebar.searchMatchModeEdges",
-} as const;
-
-const modes: SidebarSearchMatchMode[] = ["fuzzy", "contains", "edges"];
-
-const items = computed<LightDropdownMenuItem[]>(() =>
- modes.map((mode) => ({
- label: t(MODE_LABEL_KEYS[mode]),
- value: mode,
- icon: MODE_ICONS[mode],
- // `checked` binds the checkmark to the prop instead of the dropdown's own
- // single-value bookkeeping, so a parent reset is reflected immediately.
- checked: mode === props.modelValue,
- // One-of-three choice: announce it as a radio option with its state.
- role: "menuitemradio",
- })),
-);
-
-const activeIcon = computed(() => MODE_ICONS[props.modelValue]);
-const activeModeLabel = computed(() => t(MODE_LABEL_KEYS[props.modelValue]));
-</script>
-
-<template>
- <LightDropdownMenu
- :items="items"
- align="end"
- :match-trigger-width="false"
- :disabled="disabled"
- content-class="w-max min-w-0"
- selected-item-class="bg-primary/10 text-primary"
- selected-check-class="text-primary"
- item-icon-class="h-3.5 w-3.5"
- @select="(mode: string) => emit('update:modelValue', mode as SidebarSearchMatchMode)"
- >
- <template #trigger="{ open, toggle }">
- <LightTooltip :text="`${activeModeLabel} — ${t('sidebar.searchMatchModeTooltip')}`" side="top" :delay="300">
- <button
- type="button"
- data-sidebar-search-match-mode-trigger
- :data-sidebar-search-match-mode="modelValue"
- class="relative flex h-5 min-w-5 shrink-0 items-center justify-center rounded-sm px-0.5 text-muted-foreground hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50"
- :class="{ 'bg-accent text-foreground': open }"
- :aria-label="`${t('sidebar.searchMatchMode')}: ${activeModeLabel}`"
- aria-haspopup="menu"
- :aria-expanded="open"
- :disabled="disabled"
- @click.stop="toggle"
- >
- <component :is="activeIcon" class="h-3.5 w-3.5" />
- </button>
- </LightTooltip>
- </template>
- </LightDropdownMenu>
-</template>
diff --git a/apps/desktop/src/components/sidebar/__tests__/ConnectionTree.searchOptions.spec.ts b/apps/desktop/src/components/sidebar/__tests__/ConnectionTree.searchOptions.spec.ts
new file mode 100644
index 0000000000..ddaa82513a
--- /dev/null
+++ b/apps/desktop/src/components/sidebar/__tests__/ConnectionTree.searchOptions.spec.ts
@@ -0,0 +1,112 @@
+// @vitest-environment happy-dom
+import { computed, createApp, h, nextTick, ref, type App } from "vue";
+import { createPinia } from "pinia";
+import { afterEach, expect, it, vi } from "vitest";
+import { createI18n } from "vue-i18n";
+import en from "@/i18n/locales/en";
+import LightDropdown from "@/components/ui/LightDropdown.vue";
+import { DEFAULT_EDITOR_SETTINGS, useSettingsStore } from "@/stores/settingsStore";
+import { matchSidebarLabel } from "@/lib/sidebar/sidebarSearch";
+import { compileConnectionTreeTestScript } from "./connectionTreeTestScript";
+
+vi.mock("@/lib/backend/api", () => ({ loadEditorSettings: vi.fn(async () => DEFAULT_EDITOR_SETTINGS), saveEditorSettings: vi.fn(async () => {}) }));
+const apps: App[] = [];
+afterEach(() => {
+ for (const app of apps.splice(0)) app.unmount();
+ document.body.replaceChildren();
+});
+
+const compiled = compileConnectionTreeTestScript(["searchMatchMode", "isConnectionListAlphabeticallySorted", "sidebarListOptionsLabel", "sidebarListOptionItems", "selectedSidebarListOptions", "hasCustomSidebarListOptions", "selectSidebarListOption"]);
+
+async function mount() {
+ const settingsStore = useSettingsStore(createPinia());
+ await settingsStore.initEditorSettings();
+ const i18n = createI18n({ legacy: false, locale: "en", messages: { en } });
+ const regexMode = ref(false);
+ const bindings = {
+ computed,
+ settingsStore,
+ regexMode,
+ t: i18n.global.t,
+ connectionListSortMenuItems: ref([{ value: "manual", label: "Manual" }]),
+ searchScopeOptions: ref([{ scope: "table", label: "Table" }]),
+ selectedSearchScopes: ref([]),
+ hasSearchScopeFilter: ref(false),
+ updateConnectionListSortMode: vi.fn(),
+ toggleSearchScope: vi.fn(),
+ clearSearchScopeFilter: vi.fn(),
+ };
+ const state = new Function(...Object.keys(bindings), `${compiled}; return { sidebarListOptionItems, selectedSidebarListOptions, hasCustomSidebarListOptions, sidebarListOptionsLabel, selectSidebarListOption };`)(...Object.values(bindings));
+ const container = document.createElement("div");
+ document.body.append(container);
+ const app = createApp({
+ render: () =>
+ h(LightDropdown, {
+ modelValue: "",
+ items: state.sidebarListOptionItems.value,
+ selectedValues: state.selectedSidebarListOptions.value,
+ ariaLabel: state.sidebarListOptionsLabel.value,
+ closeOnSelect: false,
+ "onUpdate:modelValue": state.selectSidebarListOption,
+ }),
+ });
+ app.use(i18n);
+ app.mount(container);
+ apps.push(app);
+ container.querySelector("button")!.click();
+ await nextTick();
+ return { ...state, settingsStore, regexMode };
+}
+
+function option(text: string) {
+ return [...document.querySelectorAll<HTMLButtonElement>('[role="menuitemradio"]')].find((el) => el.textContent?.trim() === text)!;
+}
+
+it("changes matching through the existing menu and reflects its saved state", async () => {
+ const view = await mount();
+ expect(option("Smart matching").getAttribute("aria-checked")).toBe("true");
+ expect(option("Contains text").getAttribute("aria-checked")).toBe("false");
+ expect(document.body.textContent).not.toContain("Edges");
+ expect(matchSidebarLabel("1001", "101", { matchMode: view.settingsStore.editorSettings.sidebarSearchMatchMode })).not.toBeNull();
+ option("Contains text").click();
+ await nextTick();
+ expect(view.settingsStore.editorSettings.sidebarSearchMatchMode).toBe("contains");
+ expect(matchSidebarLabel("1001", "101", { matchMode: view.settingsStore.editorSettings.sidebarSearchMatchMode })).toBeNull();
+ expect(option("Contains text").getAttribute("aria-checked")).toBe("true");
+ expect(option("Smart matching").getAttribute("aria-checked")).toBe("false");
+ expect(view.hasCustomSidebarListOptions.value).toBe(false);
+ expect(view.sidebarListOptionsLabel.value).toBe(en.sidebar.listOptions);
+ expect(document.querySelector('[role="menuitemcheckbox"]')?.textContent).toContain("Table");
+});
+
+it("lets regex override the preference without overwriting it", async () => {
+ const view = await mount();
+ option("Contains text").click();
+ view.regexMode.value = true;
+ await nextTick();
+ expect(option("Contains text").disabled).toBe(true);
+ expect(option("Smart matching").disabled).toBe(true);
+ option("Smart matching").click();
+ expect(view.settingsStore.editorSettings.sidebarSearchMatchMode).toBe("contains");
+ view.regexMode.value = false;
+ await nextTick();
+ expect(option("Contains text").disabled).toBe(false);
+ expect(option("Contains text").getAttribute("aria-checked")).toBe("true");
+});
+
+it("supports keyboard selection and restores focus when closing the merged menu", async () => {
+ const view = await mount();
+ const trigger = document.querySelector<HTMLButtonElement>('[aria-label="Sort and filter"]')!;
+ trigger.focus();
+ document.dispatchEvent(new KeyboardEvent("keydown", { key: "ArrowDown", bubbles: true }));
+ expect(document.activeElement).toBe(option("Smart matching"));
+ document.dispatchEvent(new KeyboardEvent("keydown", { key: "ArrowDown", bubbles: true }));
+ expect(document.activeElement).toBe(option("Contains text"));
+ option("Contains text").click();
+ await nextTick();
+ expect(view.settingsStore.editorSettings.sidebarSearchMatchMode).toBe("contains");
+ document.dispatchEvent(new KeyboardEvent("keydown", { key: "Escape", bubbles: true }));
+ await nextTick();
+ expect(document.querySelector('[role="menu"]')).toBeNull();
+ expect(document.activeElement).toBe(trigger);
+});
diff --git a/apps/desktop/src/components/sidebar/__tests__/SidebarSearchMatchModeSelect.spec.ts b/apps/desktop/src/components/sidebar/__tests__/SidebarSearchMatchModeSelect.spec.ts
deleted file mode 100644
index cd2e6c5841..0000000000
--- a/apps/desktop/src/components/sidebar/__tests__/SidebarSearchMatchModeSelect.spec.ts
+++ /dev/null
@@ -1,139 +0,0 @@
-// @vitest-environment happy-dom
-
-import { createApp, defineComponent, h, nextTick, reactive, type App } from "vue";
-import { createI18n } from "vue-i18n";
-import { afterEach, describe, expect, it, vi } from "vitest";
-import SidebarSearchMatchModeSelect from "../SidebarSearchMatchModeSelect.vue";
-import type { SidebarSearchMatchMode } from "@/lib/sidebar/sidebarSearch";
-
-const messages = {
- sidebar: {
- searchMatchMode: "Match mode",
- searchMatchModeFuzzy: "Fuzzy",
- searchMatchModeContains: "Contains",
- searchMatchModeEdges: "Edges",
- searchMatchModeTooltip: "How sidebar search matches names.",
- },
-};
-
-const mountedApps: App[] = [];
-
-async function mount(initial: SidebarSearchMatchMode, state?: { disabled: boolean; mode: SidebarSearchMatchMode }) {
- const container = document.createElement("div");
- document.body.append(container);
- const model = reactive({ value: initial, disabled: state?.disabled ?? false });
- const onUpdate = vi.fn();
- const app = createApp(
- defineComponent({
- setup: () => () =>
- h(SidebarSearchMatchModeSelect, {
- modelValue: model.value,
- disabled: model.disabled,
- "onUpdate:modelValue": (mode: SidebarSearchMatchMode) => {
- model.value = mode;
- onUpdate(mode);
- },
- }),
- }),
- );
- app.use(createI18n({ legacy: false, locale: "en", missingWarn: false, fallbackWarn: false, messages: { en: messages } }));
- mountedApps.push(app);
- app.mount(container);
- await nextTick();
- if (state) state.mode = model.value;
- return { container, onUpdate, model };
-}
-
-function trigger(container: HTMLElement): HTMLButtonElement {
- const element = container.querySelector("[data-sidebar-search-match-mode-trigger]");
- if (!(element instanceof HTMLButtonElement)) throw new Error("Match mode trigger was not rendered");
- return element;
-}
-
-function menuItems(): HTMLButtonElement[] {
- return [...document.body.querySelectorAll<HTMLButtonElement>('[role="menu"] [role="menuitemradio"]')];
-}
-
-function checkedItemLabel(): string | undefined {
- return menuItems()
- .find((item) => item.getAttribute("aria-checked") === "true")
- ?.textContent?.trim();
-}
-
-afterEach(() => {
- for (const app of mountedApps.splice(0)) app.unmount();
- document.body.innerHTML = "";
-});
-
-describe("SidebarSearchMatchModeSelect", () => {
- it("renders the active mode on the trigger with menu semantics", async () => {
- const { container } = await mount("fuzzy");
- const button = trigger(container);
-
- expect(button.getAttribute("data-sidebar-search-match-mode")).toBe("fuzzy");
- expect(button.getAttribute("aria-haspopup")).toBe("menu");
- expect(button.getAttribute("aria-expanded")).toBe("false");
- expect(button.getAttribute("aria-label")).toBe("Match mode: Fuzzy");
- expect(button.disabled).toBe(false);
- expect(container.querySelector("[data-sidebar-search-match-mode-trigger] .lucide-wand-2")).not.toBeNull();
- });
-
- it("lists all three modes and checks the active one", async () => {
- const { container } = await mount("contains");
- trigger(container).click();
- await nextTick();
-
- expect(trigger(container).getAttribute("aria-expanded")).toBe("true");
- expect(menuItems().map((item) => item.textContent?.trim())).toEqual(["Fuzzy", "Contains", "Edges"]);
- expect(checkedItemLabel()).toBe("Contains");
- // Radio semantics: the single-select group reports its state to assistive tech.
- expect(menuItems().map((item) => item.getAttribute("aria-checked"))).toEqual(["false", "true", "false"]);
- });
-
- it("emits the picked mode once and reflects it back on the trigger", async () => {
- const { container, onUpdate } = await mount("fuzzy");
- trigger(container).click();
- await nextTick();
-
- const edges = menuItems().find((item) => item.textContent?.trim() === "Edges");
- expect(edges).toBeTruthy();
- edges!.click();
- await nextTick();
-
- expect(onUpdate).toHaveBeenCalledTimes(1);
- expect(onUpdate).toHaveBeenCalledWith("edges");
- expect(trigger(container).getAttribute("data-sidebar-search-match-mode")).toBe("edges");
- expect(trigger(container).getAttribute("aria-label")).toBe("Match mode: Edges");
- // Single-select dropdown closes after a pick.
- expect(menuItems()).toHaveLength(0);
- });
-
- it("moves focus between the radio options with the arrow keys", async () => {
- const { container } = await mount("fuzzy");
- trigger(container).click();
- await nextTick();
-
- document.dispatchEvent(new KeyboardEvent("keydown", { key: "ArrowDown", bubbles: true }));
- await nextTick();
- expect(document.activeElement).toBe(menuItems()[0]);
- document.dispatchEvent(new KeyboardEvent("keydown", { key: "ArrowDown", bubbles: true }));
- await nextTick();
- expect(document.activeElement).toBe(menuItems()[1]);
- document.dispatchEvent(new KeyboardEvent("keydown", { key: "Escape", bubbles: true }));
- await nextTick();
- expect(menuItems()).toHaveLength(0);
- });
-
- it("disables the trigger and stays closed while regex mode owns the search", async () => {
- const { container } = await mount("fuzzy", { disabled: true, mode: "fuzzy" });
- const button = trigger(container);
-
- expect(button.disabled).toBe(true);
- expect(button.getAttribute("aria-label")).toBe("Match mode: Fuzzy");
- button.click();
- await nextTick();
- expect(button.getAttribute("aria-expanded")).toBe("false");
- expect(menuItems()).toHaveLength(0);
- expect(container.querySelector("[data-sidebar-search-match-mode-trigger]")?.className).toContain("disabled:opacity-50");
- });
-});
diff --git a/apps/desktop/src/components/ui/LightDropdown.vue b/apps/desktop/src/components/ui/LightDropdown.vue
index 2adb920290..51c6304b2b 100644
--- a/apps/desktop/src/components/ui/LightDropdown.vue
+++ b/apps/desktop/src/components/ui/LightDropdown.vue
@@ -1,12 +1,15 @@
<script setup lang="ts">
import { computed, nextTick, onBeforeUnmount, ref, type Component } from "vue";
import { Check, ChevronDown } from "@lucide/vue";
+import LightTooltip from "@/components/ui/LightTooltip.vue";
export interface LightDropdownItem {
label: string;
value: string;
groupLabel?: string;
title?: string;
+ tooltip?: string;
+ role?: "menuitem" | "menuitemradio" | "menuitemcheckbox";
icon?: Component;
iconClass?: string;
leadingText?: string;
@@ -127,11 +130,21 @@ function fitPositionToViewport() {
y.value = openBelow ? triggerRect.bottom + gap : Math.max(margin, triggerRect.top - menuRect.height - gap);
}
-function openMenu() {
+function menuItems(): HTMLButtonElement[] {
+ return [...(menuRef.value?.querySelectorAll<HTMLButtonElement>('button[role^="menuitem"]:not(:disabled)') ?? [])];
+}
+
+function openMenu(focus?: "first" | "last") {
if (props.disabled) return;
updatePosition();
open.value = true;
- nextTick(fitPositionToViewport);
+ nextTick(() => {
+ fitPositionToViewport();
+ if (focus) {
+ const items = menuItems();
+ (focus === "first" ? items[0] : items[items.length - 1])?.focus();
+ }
+ });
document.addEventListener("pointerdown", onOutsidePointerDown, true);
document.addEventListener("keydown", onKeydown);
window.addEventListener("scroll", onScroll, true);
@@ -155,8 +168,42 @@ function onOutsidePointerDown(event: PointerEvent) {
function onKeydown(event: KeyboardEvent) {
if (event.key === "Escape") {
event.preventDefault();
+ const restoreFocus = menuRef.value?.contains(document.activeElement);
close();
+ if (restoreFocus) triggerRef.value?.focus();
+ return;
+ }
+ if (!menuRef.value?.contains(document.activeElement) && document.activeElement !== triggerRef.value) return;
+ const items = menuItems();
+ if (!items.length) return;
+ const index = items.indexOf(document.activeElement as HTMLButtonElement);
+ let next: number;
+ switch (event.key) {
+ case "ArrowDown":
+ next = (index + 1) % items.length;
+ break;
+ case "ArrowUp":
+ next = index < 0 ? items.length - 1 : (index - 1 + items.length) % items.length;
+ break;
+ case "Home":
+ next = 0;
+ break;
+ case "End":
+ next = items.length - 1;
+ break;
+ default:
+ return;
}
+ event.preventDefault();
+ event.stopPropagation();
+ items[next]?.focus();
+}
+
+function onTriggerKeydown(event: KeyboardEvent) {
+ if (open.value || (event.key !== "ArrowDown" && event.key !== "ArrowUp")) return;
+ event.preventDefault();
+ event.stopPropagation();
+ openMenu(event.key === "ArrowDown" ? "first" : "last");
}
function isItemSelected(item: LightDropdownItem) {
@@ -181,7 +228,7 @@ onBeforeUnmount(close);
</script>
<template>
- <button ref="triggerRef" type="button" :class="triggerClass" :title="triggerTitle ?? selectedItem?.title" :aria-label="ariaLabel" :aria-expanded="open" :disabled="disabled" @click="toggle">
+ <button ref="triggerRef" type="button" :class="triggerClass" :title="triggerTitle ?? selectedItem?.title" :aria-label="ariaLabel" aria-haspopup="menu" :aria-expanded="open" :disabled="disabled" @click="toggle" @keydown="onTriggerKeydown">
<slot name="trigger-icon" :open="open">
<component :is="triggerIcon" v-if="triggerIcon" :class="triggerIconClass" />
</slot>
@@ -195,25 +242,28 @@ onBeforeUnmount(close);
<template v-for="item in items" :key="item.value">
<div v-if="item.separatorBefore" class="bg-border -mx-1 my-1 h-px" />
<div v-if="item.groupLabel" class="px-1.5 py-1 text-[11px] font-medium text-muted-foreground">{{ item.groupLabel }}</div>
- <button
- type="button"
- class="flex w-full items-center gap-1.5 rounded-md px-1.5 py-1 text-left text-sm outline-hidden hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50"
- :class="[itemClass, highlightSelected && isItemSelected(item) ? selectedItemClass : '']"
- :disabled="item.disabled"
- :title="item.title"
- :style="{ paddingInlineStart: `${0.375 + (item.indentLevel ?? 0) * 0.75}rem` }"
- role="menuitem"
- @pointerdown.prevent="selectItem(item)"
- @click="selectItemOnKeyboard(item, $event)"
- >
- <Check v-if="checkPosition === 'left'" class="h-3 w-3 shrink-0" :class="[isItemSelected(item) ? selectedCheckClass : 'opacity-0']" />
- <span v-if="item.leadingText" class="inline-flex h-5 w-6 shrink-0 items-center justify-center text-sm font-medium leading-none">
- {{ item.leadingText }}
- </span>
- <component :is="item.icon" v-if="item.icon" :class="[itemIconClass, 'shrink-0 text-muted-foreground', item.iconClass]" />
- <span class="truncate">{{ item.label }}</span>
- <Check v-if="checkPosition === 'right' && isItemSelected(item)" class="ml-auto h-4 w-4 shrink-0" :class="selectedCheckClass" />
- </button>
+ <LightTooltip :text="item.tooltip ?? ''" side="right" :delay="1000" :close-delay="0">
+ <button
+ type="button"
+ class="flex w-full items-center gap-1.5 rounded-md px-1.5 py-1 text-left text-sm outline-hidden hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50"
+ :class="[itemClass, highlightSelected && isItemSelected(item) ? selectedItemClass : '']"
+ :disabled="item.disabled"
+ :title="item.title"
+ :style="{ paddingInlineStart: `${0.375 + (item.indentLevel ?? 0) * 0.75}rem` }"
+ :role="item.role ?? 'menuitem'"
+ :aria-checked="item.role === 'menuitemradio' || item.role === 'menuitemcheckbox' ? isItemSelected(item) : undefined"
+ @pointerdown.prevent="selectItem(item)"
+ @click="selectItemOnKeyboard(item, $event)"
+ >
+ <Check v-if="checkPosition === 'left'" class="h-3 w-3 shrink-0" :class="[isItemSelected(item) ? selectedCheckClass : 'opacity-0']" />
+ <span v-if="item.leadingText" class="inline-flex h-5 w-6 shrink-0 items-center justify-center text-sm font-medium leading-none">
+ {{ item.leadingText }}
+ </span>
+ <component :is="item.icon" v-if="item.icon" :class="[itemIconClass, 'shrink-0 text-muted-foreground', item.iconClass]" />
+ <span class="truncate">{{ item.label }}</span>
+ <Check v-if="checkPosition === 'right' && isItemSelected(item)" class="ml-auto h-4 w-4 shrink-0" :class="selectedCheckClass" />
+ </button>
+ </LightTooltip>
</template>
<slot />
</div>
diff --git a/apps/desktop/src/i18n/__tests__/featureMessages.spec.ts b/apps/desktop/src/i18n/__tests__/featureMessages.spec.ts
index 02c4f79bea..a5437b2ea6 100644
--- a/apps/desktop/src/i18n/__tests__/featureMessages.spec.ts
+++ b/apps/desktop/src/i18n/__tests__/featureMessages.spec.ts
@@ -140,7 +140,7 @@ const FEATURE_MESSAGES: FeatureMessages[] = [
translated: true,
},
{ feature: "sidebar search skip hint", keys: ["sidebar.searchConnectionSkipped"] },
- { feature: "sidebar search match mode (#13505)", keys: under("sidebar", ["searchMatchMode", "searchMatchModeFuzzy", "searchMatchModeContains", "searchMatchModeEdges", "searchMatchModeTooltip"]), translated: true },
+ { feature: "sidebar search match mode (#13505)", keys: under("sidebar", ["listOptions", "searchMatchMode", "searchMatchModeFuzzy", "searchMatchModeContains", "searchMatchModeTooltip"]), translated: true },
{ feature: "PostgreSQL legacy TLS", keys: ["connection.postgresLegacyTls", "connection.postgresLegacyTlsHint"] },
{ feature: "settings search sections", keys: ["settings.syncWebDavWebDescription", "settings.performanceSection"] },
{ feature: "local backup selection", keys: ["settings.localBackupSecretsPassphraseRequiredHint", "settings.localBackupPathLabel", "settings.localBackupPathUnset", "settings.localBackupChoosePath", "settings.localBackupPathRequired"], translated: true },
diff --git a/apps/desktop/src/i18n/locales/az.ts b/apps/desktop/src/i18n/locales/az.ts
index 44c71f5f76..4fc424ca54 100644
--- a/apps/desktop/src/i18n/locales/az.ts
+++ b/apps/desktop/src/i18n/locales/az.ts
@@ -488,8 +488,8 @@ export default withEnglishFallback({
importNavicat: "Navicat NCX-i idxal et",
importDbeaver: "DBeaver-i idxal et",
importDatagrip: "DataGrip-i idxal et",
- importRdm: "RedisDesktopManager-i idxal et",
- importAnotherRedis: "Another Redis Desktop Manager-i idxal et",
+ importRdm: "RDM-i idxal et",
+ importAnotherRedis: "AnotherRDM-i idxal et",
export: "Əlaqələri ixrac et",
collapseAll: "Hamısını yığ",
collapse: "Yan paneli yığ",
@@ -519,11 +519,11 @@ export default withEnglishFallback({
globalLocalSearchTooltip: "Uzaq sorğular göndərmədən yüklənmiş obyektlərdə və keşlənmiş cədvəl indekslərində axtarın. Çatışmayan indeksləri yaratmaq və digər obyektləri uzaqdan axtarmaq üçün deaktiv edin. Metaverilənləri yeniləmək üçün yeniləmə əməliyyatından istifadə edin.",
regexSearch: "Müntəzəm ifadə ilə axtarış",
regexSearchTooltip: "Yan paneldəki adları, şərhləri və ləqəbləri JavaScript müntəzəm ifadələri ilə uyğunlaşdırın.",
- searchMatchMode: "Uyğunluq rejimi",
- searchMatchModeFuzzy: "Qeyri-dəqiq",
- searchMatchModeContains: "İçərir",
- searchMatchModeEdges: "Kənarlar",
- searchMatchModeTooltip: "Yan panel axtarışının adları, şərhləri və ləqəbləri necə uyğunlaşdırdığı: qeyri-dəqiq simvolların sıra ilə görünməsinə icazə verir, içərir davamlı fraqment tələb edir, kənarlar mətni yalnız adın əvvəlində və ya sonunda qəbul edir.",
+ listOptions: "Sırala və filtrlə",
+ searchMatchMode: "Axtarış uyğunluğu",
+ searchMatchModeFuzzy: "Ağıllı uyğunluq",
+ searchMatchModeContains: "Ardıcıl mətn ehtiva edir",
+ searchMatchModeTooltip: "Yuxarı axtarışdakı adlara, şərhlərə və ləqəblərə tətbiq edilir. Ağıllı uyğunluq qısaltmalara və buraxılmış simvollara icazə verir; ardıcıl mətn bitişik simvollar tələb edir (101, 1001 ilə uyğun gəlmir).",
clearFilter: "Süzgəci təmizlə",
locateTargetNotFound: "Element yan paneldə mövcud deyil. O, silinmiş və ya gizlədilmiş ola bilər.",
locateSqlFile: "SQL fayl siyahısında tap",
diff --git a/apps/desktop/src/i18n/locales/en.ts b/apps/desktop/src/i18n/locales/en.ts
index 866be7a5b3..ac17cc2816 100644
--- a/apps/desktop/src/i18n/locales/en.ts
+++ b/apps/desktop/src/i18n/locales/en.ts
@@ -1382,8 +1382,8 @@ export default {
importNavicat: "Import Navicat NCX",
importDbeaver: "Import DBeaver",
importDatagrip: "Import DataGrip",
- importRdm: "Import RedisDesktopManager",
- importAnotherRedis: "Import Another Redis Desktop Manager",
+ importRdm: "Import RDM",
+ importAnotherRedis: "Import AnotherRDM",
export: "Export Connections",
collapseAll: "Collapse all",
collapse: "Collapse sidebar",
@@ -1413,11 +1413,11 @@ export default {
globalLocalSearchTooltip: "Search loaded objects and cached table indexes without remote requests. Turn off to build missing indexes and search other objects remotely. Use Refresh to update metadata.",
regexSearch: "Regex search",
regexSearchTooltip: "Match sidebar names, comments, and aliases with JavaScript regular expressions.",
- searchMatchMode: "Match mode",
- searchMatchModeFuzzy: "Fuzzy",
- searchMatchModeContains: "Contains",
- searchMatchModeEdges: "Edges",
- searchMatchModeTooltip: "How sidebar search matches names, comments, and aliases: fuzzy allows characters in order, contains requires a contiguous fragment, edges requires the text at the start or the end.",
+ listOptions: "Sort and filter",
+ searchMatchMode: "Search matching",
+ searchMatchModeFuzzy: "Smart matching",
+ searchMatchModeContains: "Contains text",
+ searchMatchModeTooltip: "Applies to names, comments and aliases in the top search. Smart matching allows abbreviations and skipped characters; contains text requires consecutive characters (101 does not match 1001).",
clearFilter: "Clear filter",
locateTargetNotFound: "The item is not available in the sidebar. It may have been removed or hidden.",
locateSqlFile: "Locate in SQL file list",
diff --git a/apps/desktop/src/i18n/locales/es.ts b/apps/desktop/src/i18n/locales/es.ts
index 7ba1c841f1..c26a5cf9e7 100644
--- a/apps/desktop/src/i18n/locales/es.ts
+++ b/apps/desktop/src/i18n/locales/es.ts
@@ -1179,8 +1179,8 @@ export default withEnglishFallback({
importNavicat: "Importar Navicat NCX",
importDbeaver: "Importar DBeaver",
importDatagrip: "Importar DataGrip",
- importRdm: "Importar RedisDesktopManager",
- importAnotherRedis: "Importar Another Redis Desktop Manager",
+ importRdm: "Importar RDM",
+ importAnotherRedis: "Importar AnotherRDM",
export: "Exportar conexiones",
collapseAll: "Contraer todo",
collapse: "Contraer barra lateral",
@@ -1210,11 +1210,11 @@ export default withEnglishFallback({
globalLocalSearchTooltip: "Busca objetos cargados e índices de tablas en caché sin solicitudes remotas. Desactívalo para crear los índices faltantes y buscar otros objetos de forma remota. Usa Actualizar para actualizar los metadatos.",
regexSearch: "Búsqueda con regex",
regexSearchTooltip: "Coincide con nombres, comentarios y alias mediante expresiones regulares de JavaScript.",
- searchMatchMode: "Modo de coincidencia",
- searchMatchModeFuzzy: "Difuso",
- searchMatchModeContains: "Contiene",
- searchMatchModeEdges: "Extremos",
- searchMatchModeTooltip: "Cómo coincide la búsqueda lateral con nombres, comentarios y alias: difuso permite caracteres en orden, contiene exige un fragmento contiguo y extremos exige el texto al principio o al final.",
+ listOptions: "Ordenar y filtrar",
+ searchMatchMode: "Coincidencia de búsqueda",
+ searchMatchModeFuzzy: "Coincidencia inteligente",
+ searchMatchModeContains: "Contiene texto continuo",
+ searchMatchModeTooltip: "Se aplica a nombres, comentarios y alias en la búsqueda superior. La coincidencia inteligente admite abreviaturas y caracteres omitidos; el texto continuo exige caracteres consecutivos (101 no coincide con 1001).",
clearFilter: "Limpiar filtro",
locateTargetNotFound: "El elemento no está disponible en la barra lateral. Puede que se haya eliminado u ocultado.",
locateSqlFile: "Localizar en la lista de archivos SQL",
diff --git a/apps/desktop/src/i18n/locales/id.ts b/apps/desktop/src/i18n/locales/id.ts
index f691d2a1b0..d3be72f11a 100644
--- a/apps/desktop/src/i18n/locales/id.ts
+++ b/apps/desktop/src/i18n/locales/id.ts
@@ -693,8 +693,8 @@ export default withEnglishFallback({
importNavicat: "Impor Navicat NCX",
importDbeaver: "Impor DBeaver",
importDatagrip: "Impor DataGrip",
- importRdm: "Impor RedisDesktopManager",
- importAnotherRedis: "Impor Another Redis Desktop Manager",
+ importRdm: "Impor RDM",
+ importAnotherRedis: "Impor AnotherRDM",
export: "Ekspor Koneksi",
collapseAll: "Ciutkan semua",
collapse: "Ciutkan bilah sisi",
@@ -724,11 +724,11 @@ export default withEnglishFallback({
globalLocalSearchTooltip: "Cari objek yang sudah dimuat dan indeks tabel tersimpan tanpa permintaan jarak jauh. Nonaktifkan untuk membuat indeks yang belum tersedia dan mencari objek lain di server. Gunakan Segarkan untuk memperbarui metadata.",
regexSearch: "Pencarian regex",
regexSearchTooltip: "Cocokkan nama, komentar, dan alias di bilah sisi dengan ekspresi reguler JavaScript.",
- searchMatchMode: "Mode pencocokan",
- searchMatchModeFuzzy: "Samar",
- searchMatchModeContains: "Mengandung",
- searchMatchModeEdges: "Ujung",
- searchMatchModeTooltip: "Cara pencarian bilah sisi mencocokkan nama, komentar, dan alias: samar mengizinkan karakter berurutan, mengandung memerlukan fragmen bersebelahan, ujung hanya mencocokkan teks di awal atau akhir nama.",
+ listOptions: "Urutkan dan filter",
+ searchMatchMode: "Pencocokan pencarian",
+ searchMatchModeFuzzy: "Pencocokan cerdas",
+ searchMatchModeContains: "Mengandung teks berurutan",
+ searchMatchModeTooltip: "Berlaku untuk nama, komentar, dan alias di pencarian atas. Pencocokan cerdas mendukung singkatan dan karakter yang dilewati; teks berurutan memerlukan karakter bersebelahan (101 tidak cocok dengan 1001).",
clearFilter: "Bersihkan filter",
locateTargetNotFound: "Item tidak tersedia di bilah sisi. Item mungkin telah dihapus atau disembunyikan.",
locateSqlFile: "Temukan dalam daftar file SQL",
diff --git a/apps/desktop/src/i18n/locales/it.ts b/apps/desktop/src/i18n/locales/it.ts
index 683314bce9..579835e651 100644
--- a/apps/desktop/src/i18n/locales/it.ts
+++ b/apps/desktop/src/i18n/locales/it.ts
@@ -1167,8 +1167,8 @@ export default withEnglishFallback({
importNavicat: "Importa Navicat NCX",
importDbeaver: "Importa DBeaver",
importDatagrip: "Importa DataGrip",
- importRdm: "Importa RedisDesktopManager",
- importAnotherRedis: "Importa Another Redis Desktop Manager",
+ importRdm: "Importa RDM",
+ importAnotherRedis: "Importa AnotherRDM",
export: "Esporta Connessioni",
collapseAll: "Riduci tutto",
collapse: "Riduci barra laterale",
@@ -1198,11 +1198,11 @@ export default withEnglishFallback({
globalLocalSearchTooltip: "Cerca oggetti caricati e indici delle tabelle in cache senza richieste remote. Disattiva per creare gli indici mancanti e cercare altri oggetti in remoto. Usa Aggiorna per aggiornare i metadati.",
regexSearch: "Ricerca regex",
regexSearchTooltip: "Trova nomi, commenti e alias con espressioni regolari JavaScript.",
- searchMatchMode: "Modalità di corrispondenza",
- searchMatchModeFuzzy: "Approssimativa",
- searchMatchModeContains: "Contiene",
- searchMatchModeEdges: "Estremi",
- searchMatchModeTooltip: "Come la ricerca laterale confronta nomi, commenti e alias: fuzzy consente caratteri in ordine, contiene richiede un frammento contiguo, estremi richiede il testo all'inizio o alla fine.",
+ listOptions: "Ordina e filtra",
+ searchMatchMode: "Corrispondenza ricerca",
+ searchMatchModeFuzzy: "Corrispondenza intelligente",
+ searchMatchModeContains: "Contiene testo continuo",
+ searchMatchModeTooltip: "Si applica a nomi, commenti e alias nella ricerca superiore. La corrispondenza intelligente ammette abbreviazioni e caratteri omessi; il testo continuo richiede caratteri consecutivi (101 non corrisponde a 1001).",
clearFilter: "Cancella filtro",
locateTargetNotFound: "L’elemento non è disponibile nella barra laterale. Potrebbe essere stato rimosso o nascosto.",
locateSqlFile: "Individua nell’elenco dei file SQL",
diff --git a/apps/desktop/src/i18n/locales/ja.ts b/apps/desktop/src/i18n/locales/ja.ts
index 3bd07736ca..15da052281 100644
--- a/apps/desktop/src/i18n/locales/ja.ts
+++ b/apps/desktop/src/i18n/locales/ja.ts
@@ -1168,8 +1168,8 @@ export default withEnglishFallback({
importNavicat: "Navicat NCXをインポート",
importDbeaver: "DBeaverをインポート",
importDatagrip: "DataGripをインポート",
- importRdm: "RedisDesktopManager をインポート",
- importAnotherRedis: "Another Redis Desktop Manager をインポート",
+ importRdm: "RDM をインポート",
+ importAnotherRedis: "AnotherRDM をインポート",
export: "接続をエクスポート",
collapseAll: "すべて折りたたむ",
collapse: "サイドバーを折りたたむ",
@@ -1199,11 +1199,11 @@ export default withEnglishFallback({
globalLocalSearchTooltip: "リモート要求を行わずに読み込み済みオブジェクトとキャッシュされたテーブルインデックスを検索します。オフにすると不足しているインデックスを作成し、他のオブジェクトをリモートで検索します。メタデータを更新するには更新を使用してください。",
regexSearch: "正規表現検索",
regexSearchTooltip: "JavaScript 正規表現でサイドバーの名前、コメント、エイリアスを照合します。",
- searchMatchMode: "一致モード",
- searchMatchModeFuzzy: "あいまい",
- searchMatchModeContains: "含む",
- searchMatchModeEdges: "先頭・末尾",
- searchMatchModeTooltip: "サイドバー検索が名前、コメント、エイリアスを照合する方法: あいまいは文字が順に現れれば一致、含むは連続した文字列が必要、先頭・末尾は名前の先頭か末尾にある場合のみ一致します。",
+ listOptions: "並べ替えとフィルター",
+ searchMatchMode: "検索の一致方法",
+ searchMatchModeFuzzy: "スマート一致",
+ searchMatchModeContains: "連続した文字列",
+ searchMatchModeTooltip: "上部検索の名前、コメント、別名に適用します。スマート一致は略語や文字の省略を許可し、連続した文字列では 101 は 1001 に一致しません。",
clearFilter: "フィルターをクリア",
locateTargetNotFound: "サイドバーに該当する項目が見つかりません。削除または非表示にされている可能性があります。",
locateSqlFile: "SQL ファイル一覧で表示",
diff --git a/apps/desktop/src/i18n/locales/ko.ts b/apps/desktop/src/i18n/locales/ko.ts
index 0f0af71a23..cc47c4f653 100644
--- a/apps/desktop/src/i18n/locales/ko.ts
+++ b/apps/desktop/src/i18n/locales/ko.ts
@@ -1174,8 +1174,8 @@ export default withEnglishFallback({
importNavicat: "Navicat NCX 가져오기",
importDbeaver: "DBeaver 가져오기",
importDatagrip: "DataGrip 가져오기",
- importRdm: "RedisDesktopManager 가져오기",
- importAnotherRedis: "Another Redis Desktop Manager 가져오기",
+ importRdm: "RDM 가져오기",
+ importAnotherRedis: "AnotherRDM 가져오기",
export: "연결 내보내기",
collapseAll: "모두 접기",
collapse: "사이드바 접기",
@@ -1205,11 +1205,11 @@ export default withEnglishFallback({
globalLocalSearchTooltip: "원격 요청 없이 로드된 객체 및 캐시된 테이블 인덱스를 검색합니다. 누락된 인덱스를 생성하고 다른 객체를 원격으로 검색하려면 끄세요. 메타데이터를 업데이트하려면 새로 고침을 사용하세요.",
regexSearch: "정규식 검색",
regexSearchTooltip: "JavaScript 정규식으로 사이드바 이름, 주석, 별칭을 검색합니다.",
- searchMatchMode: "일치 모드",
- searchMatchModeFuzzy: "유사",
- searchMatchModeContains: "포함",
- searchMatchModeEdges: "앞뒤",
- searchMatchModeTooltip: "사이드바 검색이 이름, 주석, 별칭을 일치시키는 방식: 유사는 문자가 순서대로 나타나면 일치, 포함은 연속된 문자열이 필요, 앞뒤는 이름의 시작이나 끝에 있는 경우만 일치합니다.",
+ listOptions: "정렬 및 필터",
+ searchMatchMode: "검색 일치 방식",
+ searchMatchModeFuzzy: "스마트 일치",
+ searchMatchModeContains: "연속 문자열 포함",
+ searchMatchModeTooltip: "상단 검색의 이름, 설명, 별칭에 적용됩니다. 스마트 일치는 약어와 문자 생략을 허용하며, 연속 문자열 포함에서는 101이 1001과 일치하지 않습니다.",
clearFilter: "필터 지우기",
locateTargetNotFound: "사이드바에서 해당 항목을 찾을 수 없습니다. 삭제되었거나 숨겨져 있을 수 있습니다.",
locateSqlFile: "SQL 파일 목록에서 찾기",
diff --git a/apps/desktop/src/i18n/locales/pl.ts b/apps/desktop/src/i18n/locales/pl.ts
index 0a2f08ac5a..3baaf8e3df 100644
--- a/apps/desktop/src/i18n/locales/pl.ts
+++ b/apps/desktop/src/i18n/locales/pl.ts
@@ -753,8 +753,8 @@ export default withEnglishFallback({
importNavicat: "Importuj Navicat NCX",
importDbeaver: "Importuj DBeaver",
importDatagrip: "Importuj DataGrip",
- importRdm: "Importuj RedisDesktopManager",
- importAnotherRedis: "Importuj Another Redis Desktop Manager",
+ importRdm: "Importuj RDM",
+ importAnotherRedis: "Importuj AnotherRDM",
export: "Eksportuj połączenia",
collapseAll: "Zwiń wszystko",
collapse: "Zwiń pasek boczny",
@@ -784,11 +784,11 @@ export default withEnglishFallback({
globalLocalSearchTooltip: "Przeszukuj wczytane obiekty i indeksy tabel w pamięci podręcznej bez zapytań zdalnych. Wyłącz, aby utworzyć brakujące indeksy i szukać innych obiektów zdalnie. Użyj Odśwież, aby zaktualizować metadane.",
regexSearch: "Wyszukiwanie wyrażeniem regularnym",
regexSearchTooltip: "Dopasowuj nazwy, komentarze i aliasy w panelu bocznym przy użyciu wyrażeń regularnych JavaScript.",
- searchMatchMode: "Tryb dopasowania",
- searchMatchModeFuzzy: "Przybliżony",
- searchMatchModeContains: "Zawiera",
- searchMatchModeEdges: "Krawędzie",
- searchMatchModeTooltip: "Jak wyszukiwanie w panelu bocznym dopasowuje nazwy, komentarze i aliasy: przybliżony pozwala na znaki w kolejności, zawiera wymaga ciągłego fragmentu, krawędzie wymaga tekstu na początku lub końcu nazwy.",
+ listOptions: "Sortowanie i filtrowanie",
+ searchMatchMode: "Dopasowanie wyszukiwania",
+ searchMatchModeFuzzy: "Inteligentne dopasowanie",
+ searchMatchModeContains: "Zawiera ciągły tekst",
+ searchMatchModeTooltip: "Dotyczy nazw, komentarzy i aliasów w górnym wyszukiwaniu. Inteligentne dopasowanie dopuszcza skróty i pomijanie znaków; ciągły tekst wymaga kolejnych znaków (101 nie pasuje do 1001).",
clearFilter: "Wyczyść filtr",
locateTargetNotFound: "Pozycja nie jest dostępna w panelu bocznym. Mogła zostać usunięta lub ukryta.",
locateSqlFile: "Znajdź na liście plików SQL",
diff --git a/apps/desktop/src/i18n/locales/pt-BR.ts b/apps/desktop/src/i18n/locales/pt-BR.ts
index 6e54f5ab87..9d738d0b30 100644
--- a/apps/desktop/src/i18n/locales/pt-BR.ts
+++ b/apps/desktop/src/i18n/locales/pt-BR.ts
@@ -1168,8 +1168,8 @@ export default withEnglishFallback({
importNavicat: "Importar Navicat NCX",
importDbeaver: "Importar DBeaver",
importDatagrip: "Importar DataGrip",
- importRdm: "Importar RedisDesktopManager",
- importAnotherRedis: "Importar Another Redis Desktop Manager",
+ importRdm: "Importar RDM",
+ importAnotherRedis: "Importar AnotherRDM",
export: "Exportar Conexões",
collapseAll: "Recolher tudo",
collapse: "Recolher barra lateral",
@@ -1199,11 +1199,11 @@ export default withEnglishFallback({
globalLocalSearchTooltip: "Pesquisa objetos carregados e índices de tabelas em cache sem solicitações remotas. Desative para criar índices ausentes e pesquisar outros objetos remotamente. Use Atualizar para atualizar os metadatos.",
regexSearch: "Busca por regex",
regexSearchTooltip: "Correspondência de nomes, comentários e aliases com expressões regulares JavaScript.",
- searchMatchMode: "Modo de correspondência",
- searchMatchModeFuzzy: "Difuso",
- searchMatchModeContains: "Contém",
- searchMatchModeEdges: "Extremidades",
- searchMatchModeTooltip: "Como a busca lateral corresponde a nomes, comentários e aliases: difuso permite caracteres em ordem, contém exige um trecho contíguo e extremidades exige o texto no início ou no fim.",
+ listOptions: "Ordenar e filtrar",
+ searchMatchMode: "Correspondência da busca",
+ searchMatchModeFuzzy: "Correspondência inteligente",
+ searchMatchModeContains: "Contém texto contínuo",
+ searchMatchModeTooltip: "Aplica-se a nomes, comentários e aliases na busca superior. A correspondência inteligente aceita abreviações e caracteres omitidos; o texto contínuo exige caracteres consecutivos (101 não corresponde a 1001).",
clearFilter: "Limpar filtro",
locateTargetNotFound: "O item não está disponível na barra lateral. Ele pode ter sido removido ou ocultado.",
locateSqlFile: "Localizar na lista de arquivos SQL",
diff --git a/apps/desktop/src/i18n/locales/ru.ts b/apps/desktop/src/i18n/locales/ru.ts
index c98b3dec4b..34f41489b4 100644
--- a/apps/desktop/src/i18n/locales/ru.ts
+++ b/apps/desktop/src/i18n/locales/ru.ts
@@ -1148,8 +1148,8 @@ export default withEnglishFallback({
importNavicat: "Импорт Navicat NCX",
importDbeaver: "Импорт DBeaver",
importDatagrip: "Импорт DataGrip",
- importRdm: "Импорт RedisDesktopManager",
- importAnotherRedis: "Импорт Another Redis Desktop Manager",
+ importRdm: "Импорт RDM",
+ importAnotherRedis: "Импорт AnotherRDM",
export: "Экспортировать подключения",
collapseAll: "Свернуть всё",
collapse: "Свернуть боковую панель",
@@ -1179,11 +1179,11 @@ export default withEnglishFallback({
globalLocalSearchTooltip: "Поиск по загруженным объектам и кэшированным индексам таблиц без удалённых запросов. Отключите для построения недостающих индексов и удалённого поиска других объектов. Используйте обновление для обновления метаданных.",
regexSearch: "Поиск по регулярному выражению",
regexSearchTooltip: "Сопоставлять имена, комментарии и псевдонимы в боковой панели с помощью регулярных выражений JavaScript.",
- searchMatchMode: "Режим сопоставления",
- searchMatchModeFuzzy: "Нечёткий",
- searchMatchModeContains: "Содержит",
- searchMatchModeEdges: "Края",
- searchMatchModeTooltip: "Как поиск на боковой панели сопоставляет имена, комментарии и псевдонимы: нечёткий допускает символы по порядку, содержит требует непрерывный фрагмент, края требует текст в начале или в конце имени.",
+ listOptions: "Сортировка и фильтрация",
+ searchMatchMode: "Сопоставление поиска",
+ searchMatchModeFuzzy: "Умное сопоставление",
+ searchMatchModeContains: "Непрерывное вхождение",
+ searchMatchModeTooltip: "Применяется к именам, комментариям и псевдонимам в верхнем поиске. Умное сопоставление допускает сокращения и пропуск символов; непрерывное вхождение требует последовательных символов (101 не совпадает с 1001).",
clearFilter: "Очистить фильтр",
locateTargetNotFound: "Элемент недоступен на боковой панели. Возможно, он был удалён или скрыт.",
locateSqlFile: "Найти в списке SQL-файлов",
diff --git a/apps/desktop/src/i18n/locales/th.ts b/apps/desktop/src/i18n/locales/th.ts
index b7149875ee..10551932f3 100644
--- a/apps/desktop/src/i18n/locales/th.ts
+++ b/apps/desktop/src/i18n/locales/th.ts
@@ -1248,8 +1248,8 @@ export default withEnglishFallback({
importNavicat: "นำเข้า Navicat NCX",
importDbeaver: "นำเข้า DBeaver",
importDatagrip: "นำเข้า DataGrip",
- importRdm: "นำเข้า RedisDesktopManager",
- importAnotherRedis: "นำเข้า Another Redis Desktop Manager",
+ importRdm: "นำเข้า RDM",
+ importAnotherRedis: "นำเข้า AnotherRDM",
export: "ส่งออกการเชื่อมต่อ",
collapseAll: "ยุบทั้งหมด",
collapse: "ยุบแถบด้านข้าง",
@@ -1279,11 +1279,11 @@ export default withEnglishFallback({
globalLocalSearchTooltip: "ค้นหาออบเจ็กต์ที่โหลดแล้วและ Index ตารางในแคชโดยไม่ส่ง Request ระยะไกล ปิดเพื่อสร้าง Index ที่ขาดหายไปและค้นหาออบเจ็กต์อื่นจากระยะไกล ใช้รีเฟรชเพื่ออัปเดต Metadata",
regexSearch: "การค้นหา Regex",
regexSearchTooltip: "จับคู่ชื่อ คอมเมนต์ และ Alias ในแถบด้านข้างด้วย Regular Expression ของ JavaScript",
- searchMatchMode: "โหมดการจับคู่",
- searchMatchModeFuzzy: "คล้ายกัน",
- searchMatchModeContains: "มีข้อความ",
- searchMatchModeEdges: "หัวท้าย",
- searchMatchModeTooltip: "วิธีที่การค้นหาในแถบด้านข้างจับคู่ชื่อ คอมเมนต์ และ Alias: คล้ายกันอนุญาตให้อักขระปรากฏตามลำดับ มีข้อความต้องเป็นข้อความต่อเนื่อง และหัวท้ายต้องอยู่ที่จุดเริ่มต้นหรือจุดสิ้นสุดของชื่อเท่านั้น",
+ listOptions: "เรียงลำดับและกรอง",
+ searchMatchMode: "การจับคู่การค้นหา",
+ searchMatchModeFuzzy: "จับคู่อัจฉริยะ",
+ searchMatchModeContains: "มีข้อความต่อเนื่อง",
+ searchMatchModeTooltip: "ใช้กับชื่อ ความคิดเห็น และชื่อแทนในการค้นหาด้านบน การจับคู่อัจฉริยะรองรับตัวย่อและการข้ามอักขระ ส่วนข้อความต่อเนื่องต้องมีอักขระติดกัน (101 ไม่ตรงกับ 1001)",
clearFilter: "ล้างตัวกรอง",
locateTargetNotFound: "รายการนี้ไม่พร้อมใช้งานในแถบด้านข้าง อาจถูกลบหรือซ่อนไว้",
locateSqlFile: "ค้นหาในรายการไฟล์ SQL",
diff --git a/apps/desktop/src/i18n/locales/tr.ts b/apps/desktop/src/i18n/locales/tr.ts
index 481364084e..c870b48733 100644
--- a/apps/desktop/src/i18n/locales/tr.ts
+++ b/apps/desktop/src/i18n/locales/tr.ts
@@ -488,8 +488,8 @@ export default withEnglishFallback({
importNavicat: "Navicat NCX İçe Aktar",
importDbeaver: "DBeaver İçe Aktar",
importDatagrip: "DataGrip İçe Aktar",
- importRdm: "RedisDesktopManager içe aktar",
- importAnotherRedis: "Another Redis Desktop Manager içe aktar",
+ importRdm: "RDM içe aktar",
+ importAnotherRedis: "AnotherRDM içe aktar",
export: "Bağlantıları Dışa Aktar",
collapseAll: "Tümünü daralt",
collapse: "Kenar çubuğunu daralt",
@@ -519,11 +519,11 @@ export default withEnglishFallback({
globalLocalSearchTooltip: "Uzak istek olmadan yüklü nesneleri ve önbelleğe alınmış tablo dizinlerini arayın. Eksik dizinleri oluşturmak ve diğer nesneleri uzaktan aramak için kapatın. Meta verileri güncellemek için Yenile düğmesini kullanın.",
regexSearch: "Regex araması",
regexSearchTooltip: "Kenar çubuğu adlarını, açıklamaları ve takma adları JavaScript düzenli ifadeleriyle eşleştirin.",
- searchMatchMode: "Eşleşme modu",
- searchMatchModeFuzzy: "Bulanık",
- searchMatchModeContains: "İçerir",
- searchMatchModeEdges: "Kenarlar",
- searchMatchModeTooltip: "Kenar çubuğu aramasının adları, açıklamaları ve takma adları nasıl eşleştirdiği: bulanık karakterlerin sırayla görünmesine izin verir, içerir bitişik bir parça gerektirir, kenarlar metnin adın başında veya sonunda olmasını gerektirir.",
+ listOptions: "Sırala ve filtrele",
+ searchMatchMode: "Arama eşleştirme",
+ searchMatchModeFuzzy: "Akıllı eşleştirme",
+ searchMatchModeContains: "Ardışık metin içerir",
+ searchMatchModeTooltip: "Üst aramadaki adlara, yorumlara ve takma adlara uygulanır. Akıllı eşleştirme kısaltmalara ve atlanan karakterlere izin verir; ardışık metin bitişik karakterler gerektirir (101, 1001 ile eşleşmez).",
clearFilter: "Filtreyi temizle",
locateTargetNotFound: "Öğe kenar çubuğunda bulunamıyor. Silinmiş veya gizlenmiş olabilir.",
locateSqlFile: "SQL dosya listesinde bul",
diff --git a/apps/desktop/src/i18n/locales/zh-CN.ts b/apps/desktop/src/i18n/locales/zh-CN.ts
index 88eb24a196..6ba17a8824 100644
--- a/apps/desktop/src/i18n/locales/zh-CN.ts
+++ b/apps/desktop/src/i18n/locales/zh-CN.ts
@@ -1318,8 +1318,8 @@ export default withEnglishFallback({
importNavicat: "导入 Navicat NCX",
importDbeaver: "导入 DBeaver",
importDatagrip: "导入 DataGrip",
- importRdm: "导入 RedisDesktopManager",
- importAnotherRedis: "导入 Another Redis Desktop Manager",
+ importRdm: "导入 RDM",
+ importAnotherRedis: "导入 AnotherRDM",
export: "导出连接",
collapseAll: "一键折叠",
collapse: "收起侧边栏",
@@ -1349,11 +1349,11 @@ export default withEnglishFallback({
globalLocalSearchTooltip: "搜索已加载的对象和缓存的表索引,不发送远程请求。关闭后构建缺失的索引并远程搜索其他对象。请使用刷新更新元数据。",
regexSearch: "正则搜索",
regexSearchTooltip: "使用 JavaScript 正则表达式匹配侧边栏名称、备注和别名。",
- searchMatchMode: "匹配方式",
- searchMatchModeFuzzy: "模糊",
- searchMatchModeContains: "包含",
- searchMatchModeEdges: "首尾",
- searchMatchModeTooltip: "侧边栏搜索如何匹配名称、备注和别名:模糊允许字符按顺序出现,包含要求连续文本,首尾只匹配名称开头或结尾。",
+ listOptions: "排序与筛选",
+ searchMatchMode: "搜索匹配",
+ searchMatchModeFuzzy: "智能匹配",
+ searchMatchModeContains: "连续包含",
+ searchMatchModeTooltip: "作用于顶部搜索的名称、备注和别名。智能匹配支持缩写和跳字;连续包含要求字符连续出现,例如 101 不匹配 1001。",
clearFilter: "清除筛选",
locateTargetNotFound: "左侧导航中未找到对应项目,该项目可能已被删除或隐藏。",
locateSqlFile: "在 SQL 文件列表中定位",
diff --git a/apps/desktop/src/i18n/locales/zh-TW.ts b/apps/desktop/src/i18n/locales/zh-TW.ts
index 7c08a34fa6..33f074923f 100644
--- a/apps/desktop/src/i18n/locales/zh-TW.ts
+++ b/apps/desktop/src/i18n/locales/zh-TW.ts
@@ -1153,8 +1153,8 @@ export default withEnglishFallback({
importNavicat: "匯入 Navicat NCX",
importDbeaver: "匯入 DBeaver",
importDatagrip: "匯入 DataGrip",
- importRdm: "匯入 RedisDesktopManager",
- importAnotherRedis: "匯入 Another Redis Desktop Manager",
+ importRdm: "匯入 RDM",
+ importAnotherRedis: "匯入 AnotherRDM",
export: "匯出連線",
collapseAll: "一鍵收合",
collapse: "收合側邊欄",
@@ -1184,11 +1184,11 @@ export default withEnglishFallback({
globalLocalSearchTooltip: "搜尋已載入的物件與快取的資料表索引,不會發出遠端請求。關閉後可建立缺少的索引並遠端搜尋其他物件。使用重新整理更新中繼資料。",
regexSearch: "正規表示式搜尋",
regexSearchTooltip: "使用 JavaScript 正規表示式比對側邊欄名稱、備註與別名。",
- searchMatchMode: "比對方式",
- searchMatchModeFuzzy: "模糊",
- searchMatchModeContains: "包含",
- searchMatchModeEdges: "首尾",
- searchMatchModeTooltip: "側邊欄搜尋如何比對名稱、備註與別名:模糊允許字元依序出現,包含要求連續文字,首尾只比對名稱開頭或結尾。",
+ listOptions: "排序與篩選",
+ searchMatchMode: "搜尋比對",
+ searchMatchModeFuzzy: "智慧比對",
+ searchMatchModeContains: "連續包含",
+ searchMatchModeTooltip: "套用於頂部搜尋的名稱、備註和別名。智慧比對支援縮寫與跳字;連續包含要求字元連續出現,例如 101 不比對 1001。",
clearFilter: "清除篩選",
locateTargetNotFound: "側邊欄中找不到對應項目,該項目可能已被刪除或隱藏。",
locateSqlFile: "在 SQL 檔案清單中定位",
diff --git a/apps/desktop/src/stores/__tests__/settingsStore.sidebarSearchMatchMode.spec.ts b/apps/desktop/src/stores/__tests__/settingsStore.sidebarSearchMatchMode.spec.ts
new file mode 100644
index 0000000000..6b0f5e7381
--- /dev/null
+++ b/apps/desktop/src/stores/__tests__/settingsStore.sidebarSearchMatchMode.spec.ts
@@ -0,0 +1,48 @@
+// @vitest-environment happy-dom
+import { createPinia, setActivePinia } from "pinia";
+import { beforeEach, expect, it, vi } from "vitest";
+import { DEFAULT_EDITOR_SETTINGS, normalizeEditorSettings, useSettingsStore } from "../settingsStore";
+
+const backend = vi.hoisted(() => ({ loadEditorSettings: vi.fn(), saveEditorSettings: vi.fn() }));
+vi.mock("@/lib/backend/api", () => backend);
+
+beforeEach(() => {
+ vi.resetAllMocks();
+ localStorage.clear();
+ setActivePinia(createPinia());
+ backend.loadEditorSettings.mockResolvedValue(DEFAULT_EDITOR_SETTINGS);
+ backend.saveEditorSettings.mockResolvedValue(undefined);
+});
+
+it("keeps smart matching for existing settings and rejects obsolete or invalid modes", () => {
+ expect(normalizeEditorSettings({}).sidebarSearchMatchMode).toBe("fuzzy");
+ for (const mode of ["edges", "invalid", null]) {
+ expect(normalizeEditorSettings({ sidebarSearchMatchMode: mode as never }).sidebarSearchMatchMode).toBe("fuzzy");
+ }
+});
+
+it("saves continuous matching and restores it in a new store", async () => {
+ const store = useSettingsStore();
+ await store.initEditorSettings();
+ await store.updateEditorSettingsAndPersist({ sidebarSearchMatchMode: "contains" });
+ const saved = backend.saveEditorSettings.mock.calls.at(-1)![0];
+ expect(saved.sidebarSearchMatchMode).toBe("contains");
+ backend.loadEditorSettings.mockResolvedValue(saved);
+ setActivePinia(createPinia());
+ const restored = useSettingsStore();
+ await restored.initEditorSettings();
+ expect(restored.editorSettings.sidebarSearchMatchMode).toBe("contains");
+});
+
+it("preserves a choice made while saved settings are still loading", async () => {
+ let resolveLoad!: (value: unknown) => void;
+ backend.loadEditorSettings.mockReturnValue(new Promise((resolve) => (resolveLoad = resolve)));
+ const store = useSettingsStore();
+ const loading = store.initEditorSettings();
+ store.updateEditorSettings({ sidebarSearchMatchMode: "contains" });
+ resolveLoad(DEFAULT_EDITOR_SETTINGS);
+ await loading;
+ await store.persistEditorSettings();
+ expect(store.editorSettings.sidebarSearchMatchMode).toBe("contains");
+ expect(backend.saveEditorSettings.mock.calls.at(-1)![0].sidebarSearchMatchMode).toBe("contains");
+});
diff --git a/apps/desktop/src/stores/settingsStore.ts b/apps/desktop/src/stores/settingsStore.ts
index a7d4e763c3..1137882cd1 100644
--- a/apps/desktop/src/stores/settingsStore.ts
+++ b/apps/desktop/src/stores/settingsStore.ts
@@ -1188,6 +1188,7 @@ export interface EditorSettings {
sidebarMenuHiddenPrimaryActions: SidebarMenuPinnedActions;
sidebarMenuOrder: SidebarMenuOrder;
sidebarConnectionSortMode: ConnectionListSortMode;
+ sidebarSearchMatchMode: "fuzzy" | "contains";
sidebarObjectDisplay: "grouped" | "simple";
routineSourceOpenMode: "query-tab" | "dialog";
sidebarTableSearchEnabled: boolean;
@@ -1558,6 +1559,7 @@ export const DEFAULT_EDITOR_SETTINGS: EditorSettings = {
sidebarMenuHiddenPrimaryActions: {},
sidebarMenuOrder: {},
sidebarConnectionSortMode: "manual",
+ sidebarSearchMatchMode: "fuzzy",
sidebarObjectDisplay: "grouped",
routineSourceOpenMode: "query-tab",
sidebarTableSearchEnabled: false,
@@ -2266,6 +2268,7 @@ export function normalizeEditorSettings(settings: Partial<EditorSettings>, exist
sidebarMenuHiddenPrimaryActions: normalizeSidebarMenuPinnedActions(settings.sidebarMenuHiddenPrimaryActions),
sidebarMenuOrder: normalizeSidebarMenuOrder(settings.sidebarMenuOrder),
sidebarConnectionSortMode: normalizeConnectionListSortMode(settings.sidebarConnectionSortMode),
+ sidebarSearchMatchMode: settings.sidebarSearchMatchMode === "contains" ? "contains" : "fuzzy",
sidebarObjectDisplay: settings.sidebarObjectDisplay === "simple" || settings.sidebarObjectDisplay === "grouped" ? settings.sidebarObjectDisplay : DEFAULT_EDITOR_SETTINGS.sidebarObjectDisplay,
routineSourceOpenMode: settings.routineSourceOpenMode === "query-tab" || settings.routineSourceOpenMode === "dialog" ? settings.routineSourceOpenMode : DEFAULT_EDITOR_SETTINGS.routineSourceOpenMode,
sidebarTableSearchEnabled: typeof settings.sidebarTableSearchEnabled === "boolean" ? settings.sidebarTableSearchEnabled : DEFAULT_EDITOR_SETTINGS.sidebarTableSearchEnabled,
@@ -3219,6 +3222,7 @@ export const useSettingsStore = defineStore("settings", () => {
if (partial.sidebarMenuHiddenPrimaryActions !== undefined) editorSettings.value.sidebarMenuHiddenPrimaryActions = normalizeSidebarMenuPinnedActions(partial.sidebarMenuHiddenPrimaryActions);
if (partial.sidebarMenuOrder !== undefined) editorSettings.value.sidebarMenuOrder = normalizeSidebarMenuOrder(partial.sidebarMenuOrder);
if (partial.sidebarConnectionSortMode !== undefined) editorSettings.value.sidebarConnectionSortMode = normalizeConnectionListSortMode(partial.sidebarConnectionSortMode);
+ if (partial.sidebarSearchMatchMode !== undefined) editorSettings.value.sidebarSearchMatchMode = partial.sidebarSearchMatchMode === "contains" ? "contains" : "fuzzy";
if (partial.sidebarObjectDisplay !== undefined) editorSettings.value.sidebarObjectDisplay = partial.sidebarObjectDisplay;
if (partial.routineSourceOpenMode !== undefined) editorSettings.value.routineSourceOpenMode = partial.routineSourceOpenMode;
if (partial.sidebarTableSearchEnabled !== undefined) editorSettings.value.sidebarTableSearchEnabled = partial.sidebarTableSearchEnabled;
diff --git a/docs/assets/sidebar-search-options/redis-import-menu.png b/docs/assets/sidebar-search-options/redis-import-menu.png
new file mode 100644
index 0000000000..6e20a31aae
Binary files /dev/null and b/docs/assets/sidebar-search-options/redis-import-menu.png differ
diff --git a/docs/assets/sidebar-search-options/sort-and-filter.png b/docs/assets/sidebar-search-options/sort-and-filter.png
new file mode 100644
index 0000000000..7f172b8897
Binary files /dev/null and b/docs/assets/sidebar-search-options/sort-and-filter.png differ