fix: disable macOS mpv menu shortcuts, buffer latest subtitle IPC state

- Pass --macos-menu-shortcuts=no on Darwin so SubMiner bindings reach mpv
- Replace queued IPC listener with latest-value variant for subtitle channels
- Skip JSONC line/block comments in duplicate-key offset helpers
- Preserve configured Anki note model name in selectPreferredNoteFieldModelName
- Guard known-words deck rename against collision; add chooseKnownWordsDeckRenameValue
- Apply asCssColor on hover token CSS compat reads
This commit is contained in:
2026-05-18 16:03:16 -07:00
parent ff4d38e5be
commit 06d0e3ed18
12 changed files with 208 additions and 35 deletions
+2 -2
View File
@@ -23,12 +23,12 @@ test('settings preload exposes Anki lookup helpers', () => {
}
});
test('overlay preload queues subtitle updates until renderer listener registration', () => {
test('overlay preload buffers only latest subtitle state until renderer listener registration', () => {
const source = fs.readFileSync(path.join(process.cwd(), 'src', 'preload.ts'), 'utf8');
assert.match(
source,
/const onSubtitleSetEvent =\s*createQueuedIpcListenerWithPayload<SubtitleData>\(\s*IPC_CHANNELS\.event\.subtitleSet,/,
/const onSubtitleSetEvent =\s*createLatestValueIpcListenerWithPayload<SubtitleData>\(\s*IPC_CHANNELS\.event\.subtitleSet,/,
);
assert.match(source, /onSubtitle:\s*\(callback:[\s\S]+?onSubtitleSetEvent\(callback\);/);
});