From f4a663be5b35df94a2e730d0c327dd4f56b5d8b3 Mon Sep 17 00:00:00 2001 From: Alexander Shahorsky Date: Mon, 2 Feb 2026 20:07:46 +0100 Subject: [PATCH] feat(desktop): add ctrl+tab tab navigation --- .../workspace/$workspaceId/page.tsx | 25 +++++++++++++++++++ apps/desktop/src/shared/hotkeys.ts | 10 ++++++++ bun.lock | 2 +- 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/page.tsx b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/page.tsx index 959a7e599ba..f45a23b142e 100644 --- a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/page.tsx +++ b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/page.tsx @@ -174,6 +174,31 @@ function WorkspacePage() { [workspaceId, activeTabId, tabs, setActiveTab], ); + useAppHotkey( + "PREV_TAB_ALT", + () => { + if (!activeTabId || tabs.length === 0) return; + const index = tabs.findIndex((t) => t.id === activeTabId); + const prevIndex = index <= 0 ? tabs.length - 1 : index - 1; + setActiveTab(workspaceId, tabs[prevIndex].id); + }, + undefined, + [workspaceId, activeTabId, tabs, setActiveTab], + ); + + useAppHotkey( + "NEXT_TAB_ALT", + () => { + if (!activeTabId || tabs.length === 0) return; + const index = tabs.findIndex((t) => t.id === activeTabId); + const nextIndex = + index >= tabs.length - 1 || index === -1 ? 0 : index + 1; + setActiveTab(workspaceId, tabs[nextIndex].id); + }, + undefined, + [workspaceId, activeTabId, tabs, setActiveTab], + ); + const switchToTab = useCallback( (index: number) => { const tab = tabs[index]; diff --git a/apps/desktop/src/shared/hotkeys.ts b/apps/desktop/src/shared/hotkeys.ts index c4f713f5b02..38c47aaed0a 100644 --- a/apps/desktop/src/shared/hotkeys.ts +++ b/apps/desktop/src/shared/hotkeys.ts @@ -503,6 +503,16 @@ export const HOTKEYS = { label: "Next Tab", category: "Terminal", }), + PREV_TAB_ALT: defineHotkey({ + keys: "ctrl+shift+tab", + label: "Previous Tab (Alt)", + category: "Terminal", + }), + NEXT_TAB_ALT: defineHotkey({ + keys: "ctrl+tab", + label: "Next Tab (Alt)", + category: "Terminal", + }), PREV_PANE: defineHotkey({ keys: "meta+shift+left", label: "Previous Pane", diff --git a/bun.lock b/bun.lock index 6f2951b2eca..861771abacd 100644 --- a/bun.lock +++ b/bun.lock @@ -131,7 +131,7 @@ }, "apps/desktop": { "name": "@superset/desktop", - "version": "0.0.64", + "version": "0.0.65", "dependencies": { "@better-auth/stripe": "1.4.17", "@dnd-kit/core": "^6.3.1",