diff --git a/changes/overlay-notifications.md b/changes/overlay-notifications.md index 78b5c0d5..47075c58 100644 --- a/changes/overlay-notifications.md +++ b/changes/overlay-notifications.md @@ -4,7 +4,7 @@ breaking: true - Added overlay notifications with a Catppuccin Macchiato stack, a 3-second transient timeout, and persistent long-running job notifications for character dictionary sync. - Added `notifications.overlayPosition` to place overlay notifications at the top left, top center, or top right; top right remains the default. -- Added a notification history panel (default `Ctrl+N`, configurable via `shortcuts.toggleNotificationHistory`) that logs every notification shown during the session; the toggle works whether the overlay or mpv has focus, the panel slides in from the same edge as notifications (right when centered), and entries can be removed individually or cleared. +- Added a notification history panel (default `Ctrl/Cmd+N`, configurable via `shortcuts.toggleNotificationHistory`) that logs every notification shown during the session; the toggle works whether the overlay or mpv has focus, the panel slides in from the same edge as notifications (right when centered), and entries can be removed individually or cleared. - Made the overlay error/recovery toast follow the configured `notifications.overlayPosition` instead of always pinning to the top-right corner, and kept the notification stack and history panel side synced from that position before first open so left-side history panels slide in from the left. - Routed startup tokenization, subtitle annotation, and character dictionary status through queued overlay notifications for `overlay`/`both` instead of falling back to mpv OSD while the overlay loads; queued loading cards are shown before their ready update when both happen before the overlay is ready, and the bundled mpv plugin now only emits startup OSD messages for `osd` and `osd-system`. - Preserved character dictionary checking/building/importing/ready phases in overlay notification history and sent those phases to system notifications when `notificationType` is `both`. diff --git a/config.example.jsonc b/config.example.jsonc index defe8b7f..9e189247 100644 --- a/config.example.jsonc +++ b/config.example.jsonc @@ -209,7 +209,7 @@ "openControllerSelect": "Alt+C", // Accelerator that opens the controller selection and learn-mode modal. "openControllerDebug": "Alt+Shift+C", // Accelerator that opens the controller debug modal with live axis/button readouts. "toggleSubtitleSidebar": "Backslash", // Accelerator that toggles the subtitle sidebar visibility. - "toggleNotificationHistory": "Ctrl+N" // Accelerator that toggles the overlay notification history panel. + "toggleNotificationHistory": "CommandOrControl+N" // Accelerator that toggles the overlay notification history panel. }, // Overlay keyboard shortcuts. Set a shortcut to null to disable. // ========================================== diff --git a/docs-site/configuration.md b/docs-site/configuration.md index 9f8baa54..975d5652 100644 --- a/docs-site/configuration.md +++ b/docs-site/configuration.md @@ -232,7 +232,7 @@ Configure where overlay notification cards appear: #### Notification history panel -Every overlay notification shown during a session is also recorded in a notification history panel. Press `Ctrl+N` (configurable via [`shortcuts.toggleNotificationHistory`](#shortcuts-configuration)) to toggle the panel; the binding works whether the overlay or mpv has focus. The panel slides in from the same edge the notifications use — left when `overlayPosition` is `"top-left"`, and right for `"top-right"` or `"top"` (centered). Character dictionary sync uses one live card but records each distinct phase in history. Each entry can be removed individually, or use **Clear** to empty the history. History is session-only and is not persisted across restarts. +Every overlay notification shown during a session is also recorded in a notification history panel. Press `Ctrl/Cmd+N` (configurable via [`shortcuts.toggleNotificationHistory`](#shortcuts-configuration)) to toggle the panel; the binding works whether the overlay or mpv has focus. The panel slides in from the same edge the notifications use — left when `overlayPosition` is `"top-left"`, and right for `"top-right"` or `"top"` (centered). Character dictionary sync uses one live card but records each distinct phase in history. Each entry can be removed individually, or use **Clear** to empty the history. History is session-only and is not persisted across restarts. Startup tokenization, subtitle annotation, and character dictionary status follow the configured notification surface. When the surface is `"overlay"` or `"both"`, SubMiner queues those startup notifications until the overlay renderer is ready instead of falling back to mpv OSD. If loading and ready states both finish before the overlay can paint, the loading card is delivered first and then updates to ready shortly after. With `"both"`, character dictionary checking/building/importing/ready status also goes to system notifications; building and importing are only emitted when that work is actually needed. The bundled mpv plugin only shows its startup OSD messages when `ankiConnect.behavior.notificationType` is set to `"osd"` or `"osd-system"` in `config.jsonc`. @@ -647,7 +647,7 @@ See `config.example.jsonc` for detailed configuration options. "openControllerDebug": "Alt+Shift+C", "openJimaku": "Ctrl+Shift+J", "toggleSubtitleSidebar": "Backslash", - "toggleNotificationHistory": "Ctrl+N", + "toggleNotificationHistory": "CommandOrControl+N", "multiCopyTimeoutMs": 3000 } } @@ -673,7 +673,7 @@ See `config.example.jsonc` for detailed configuration options. | `openControllerDebug` | string \| `null` | Opens the controller debug modal (default: `"Alt+Shift+C"`) | | `openJimaku` | string \| `null` | Opens the Jimaku search modal (default: `"Ctrl+Shift+J"`) | | `toggleSubtitleSidebar` | string \| `null` | Dispatches the subtitle sidebar toggle action (default: `"Backslash"`). `subtitleSidebar.toggleKey` remains the primary bare-key setting. | -| `toggleNotificationHistory` | string \| `null` | Toggles the overlay notification history panel (default: `"Ctrl+N"`). The panel slides in from the same edge as notifications (right when notifications are centered). | +| `toggleNotificationHistory` | string \| `null` | Toggles the overlay notification history panel (default: `"CommandOrControl+N"`). The panel slides in from the same edge as notifications (right when notifications are centered). | **See `config.example.jsonc`** for the complete list of shortcut configuration options. diff --git a/docs-site/public/config.example.jsonc b/docs-site/public/config.example.jsonc index defe8b7f..9e189247 100644 --- a/docs-site/public/config.example.jsonc +++ b/docs-site/public/config.example.jsonc @@ -209,7 +209,7 @@ "openControllerSelect": "Alt+C", // Accelerator that opens the controller selection and learn-mode modal. "openControllerDebug": "Alt+Shift+C", // Accelerator that opens the controller debug modal with live axis/button readouts. "toggleSubtitleSidebar": "Backslash", // Accelerator that toggles the subtitle sidebar visibility. - "toggleNotificationHistory": "Ctrl+N" // Accelerator that toggles the overlay notification history panel. + "toggleNotificationHistory": "CommandOrControl+N" // Accelerator that toggles the overlay notification history panel. }, // Overlay keyboard shortcuts. Set a shortcut to null to disable. // ========================================== diff --git a/docs-site/shortcuts.md b/docs-site/shortcuts.md index 626cb56a..179520e7 100644 --- a/docs-site/shortcuts.md +++ b/docs-site/shortcuts.md @@ -82,7 +82,7 @@ Mouse-hover playback behavior is configured separately from shortcuts: `subtitle | `Ctrl/Cmd+Shift+O` | Open runtime options palette | `shortcuts.openRuntimeOptions` | | `Ctrl/Cmd+/` | Open session help modal | `shortcuts.openSessionHelp` | | `Ctrl+Shift+J` | Open Jimaku subtitle search modal | `shortcuts.openJimaku` | -| `Ctrl+N` | Toggle overlay notification history panel | `shortcuts.toggleNotificationHistory` | +| `Ctrl/Cmd+N` | Toggle overlay notification history panel | `shortcuts.toggleNotificationHistory` | | `Ctrl+Alt+C` | Open the manual YouTube subtitle picker | `keybindings` | | `Ctrl+Alt+S` | Open subtitle sync (subsync) modal | `shortcuts.triggerSubsync` | | `\` | Toggle subtitle sidebar | `subtitleSidebar.toggleKey` | diff --git a/src/config/config.test.ts b/src/config/config.test.ts index 4c89fa76..3be95b0d 100644 --- a/src/config/config.test.ts +++ b/src/config/config.test.ts @@ -98,6 +98,7 @@ test('loads defaults when config is missing', () => { assert.equal(config.shortcuts.markAudioCard, 'CommandOrControl+Shift+A'); assert.equal(config.shortcuts.openCharacterDictionaryManager, 'CommandOrControl+D'); assert.equal(config.shortcuts.toggleSubtitleSidebar, 'Backslash'); + assert.equal(config.shortcuts.toggleNotificationHistory, 'CommandOrControl+N'); assert.equal(config.discordPresence.enabled, true); assert.equal(config.discordPresence.updateIntervalMs, 3_000); assert.equal(config.subtitleStyle.backgroundColor, 'transparent'); diff --git a/src/config/definitions/defaults-core.ts b/src/config/definitions/defaults-core.ts index 876eb794..e429d001 100644 --- a/src/config/definitions/defaults-core.ts +++ b/src/config/definitions/defaults-core.ts @@ -102,7 +102,7 @@ export const CORE_DEFAULT_CONFIG: Pick< openControllerSelect: 'Alt+C', openControllerDebug: 'Alt+Shift+C', toggleSubtitleSidebar: 'Backslash', - toggleNotificationHistory: 'Ctrl+N', + toggleNotificationHistory: 'CommandOrControl+N', }, secondarySub: { secondarySubLanguages: [], diff --git a/src/renderer/style.css b/src/renderer/style.css index 45663ab5..d6d6de7f 100644 --- a/src/renderer/style.css +++ b/src/renderer/style.css @@ -175,7 +175,7 @@ body:focus-visible, flex-direction: column; gap: 8px; pointer-events: auto; - z-index: 2147483647; + z-index: 2147483647 !important; } .overlay-notification-stack.position-top-left {