From 744267a0bcc8c610037adc160dd937c07d40c539 Mon Sep 17 00:00:00 2001 From: Kiet Ho Date: Mon, 26 Jan 2026 20:13:57 -0800 Subject: [PATCH 1/2] feat(desktop): show hotkey shortcuts in preset dropdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Display the bound keyboard shortcut (e.g., ⌘⇧1) next to each preset in the dropdown menu, making it easier for users to discover and remember preset hotkeys. --- .../$workspaceId/hooks/usePresetHotkeys.ts | 2 +- .../TabsContent/GroupStrip/GroupStrip.tsx | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/hooks/usePresetHotkeys.ts b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/hooks/usePresetHotkeys.ts index c0e96233167..6232b8a8a74 100644 --- a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/hooks/usePresetHotkeys.ts +++ b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/hooks/usePresetHotkeys.ts @@ -1,7 +1,7 @@ import { useAppHotkey } from "renderer/stores/hotkeys"; import type { HotkeyId } from "shared/hotkeys"; -const PRESET_HOTKEY_IDS: HotkeyId[] = [ +export const PRESET_HOTKEY_IDS: HotkeyId[] = [ "OPEN_PRESET_1", "OPEN_PRESET_2", "OPEN_PRESET_3", diff --git a/apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/GroupStrip/GroupStrip.tsx b/apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/GroupStrip/GroupStrip.tsx index b618b8856de..ac5376b5b80 100644 --- a/apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/GroupStrip/GroupStrip.tsx +++ b/apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/GroupStrip/GroupStrip.tsx @@ -5,6 +5,7 @@ import { DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, + DropdownMenuShortcut, DropdownMenuTrigger, } from "@superset/ui/dropdown-menu"; import { Tooltip, TooltipContent, TooltipTrigger } from "@superset/ui/tooltip"; @@ -23,6 +24,8 @@ import { } from "renderer/assets/app-icons/preset-icons"; import { HotkeyTooltipContent } from "renderer/components/HotkeyTooltipContent"; import { usePresets } from "renderer/react-query/presets"; +import { useHotkeyText } from "renderer/stores/hotkeys"; +import { PRESET_HOTKEY_IDS } from "renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/hooks/usePresetHotkeys"; import { useTabsStore } from "renderer/stores/tabs/store"; import { useTabsWithPresets } from "renderer/stores/tabs/useTabsWithPresets"; import { @@ -33,6 +36,17 @@ import { type ActivePaneStatus, pickHigherStatus } from "shared/tabs-types"; import { GroupItem } from "./GroupItem"; import { NewTabDropZone } from "./NewTabDropZone"; +function PresetMenuItemShortcut({ index }: { index: number }) { + const hotkeyId = PRESET_HOTKEY_IDS[index]; + const hotkeyText = useHotkeyText(hotkeyId); + + if (!hotkeyId || hotkeyText === "Unassigned") { + return null; + } + + return {hotkeyText}; +} + export function GroupStrip() { const { workspaceId: activeWorkspaceId } = useParams({ strict: false }); @@ -231,7 +245,7 @@ export function GroupStrip() { {presets.length > 0 && ( <> - {presets.map((preset) => { + {presets.map((preset, index) => { const presetIcon = getPresetIcon(preset.name, isDark); return ( {preset.isDefault && ( - + )} + ); })} From edb9b03e72f99f0e78568183de176e0059e7ffef Mon Sep 17 00:00:00 2001 From: Kiet Ho Date: Mon, 26 Jan 2026 22:17:01 -0800 Subject: [PATCH 2/2] Ports top border --- .../main/components/WorkspaceSidebar/PortsList/PortsList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/PortsList/PortsList.tsx b/apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/PortsList/PortsList.tsx index 5f7c148afab..12813863547 100644 --- a/apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/PortsList/PortsList.tsx +++ b/apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/PortsList/PortsList.tsx @@ -24,7 +24,7 @@ export function PortsList() { }; return ( -
+