diff --git a/src/renderer.ts b/src/renderer.ts index 58a584c..ea7c0dc 100644 --- a/src/renderer.ts +++ b/src/renderer.ts @@ -249,8 +249,8 @@ async function init(): Promise { // Skip rest if user is typing in an input field if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLSelectElement) return; - // Ctrl+1..5 jumps directly to a tab (Cmd on macOS via metaKey) - if ((e.ctrlKey || e.metaKey) && !e.altKey && !e.shiftKey && e.key >= '1' && e.key <= '5') { + // Ctrl+1..7 jumps directly to a tab (Cmd on macOS via metaKey) + if ((e.ctrlKey || e.metaKey) && !e.altKey && !e.shiftKey && e.key >= '1' && e.key <= '7') { const tabIndex = parseInt(e.key, 10) - 1; if (tabIndex >= 0 && tabIndex < TAB_IDS.length) { e.preventDefault(); @@ -794,7 +794,12 @@ async function syncQueueAndDownloadState(): Promise { } } -const TAB_IDS = ['vods', 'clips', 'cutter', 'merge', 'settings'] as const; +// Must include every nav-item from index.html — otherwise: +// - Ctrl+N keyboard shortcut won't reach tabs past index 4 +// - persistActiveTab silently no-ops, so the tab won't restore on reboot +// 'stats' (4.6.14) and 'archive' (4.6.15) were added to the nav but the +// const was never updated, leaving them effectively second-class tabs. +const TAB_IDS = ['vods', 'clips', 'cutter', 'merge', 'stats', 'archive', 'settings'] as const; const ACTIVE_TAB_STORAGE_KEY = 'twitch-vod-manager:active-tab'; function isKnownTab(value: string): value is typeof TAB_IDS[number] {