feat(stats): add Hide Kana filter and fix vocabulary exclusion matching

- Remove overlay mining image toast; OSD card notifications no longer flash a frame screenshot
- Add Hide Kana toggle to frequency rank table to filter kana-only headwords
- Fix vocab exclusions to deduplicate and match token variants (e.g. ない / 無い) under one exclusion entry
- Skip cover image fetching when the overview tab is inactive
This commit is contained in:
2026-06-06 00:08:49 -07:00
parent 10c99b526b
commit e18ccfe288
25 changed files with 304 additions and 241 deletions
-41
View File
@@ -406,47 +406,6 @@ test('AnkiIntegration marks partial update notifications as failures in OSD mode
assert.deepEqual(osdMessages, ['x Updated card: taberu (image failed)']);
});
test('AnkiIntegration emits a mining image data URL to the overlay for OSD notifications', async () => {
const osdMessages: string[] = [];
const overlayImages: string[] = [];
const integration = new AnkiIntegration(
{
behavior: {
notificationType: 'osd',
},
},
{} as never,
{ currentVideoPath: '/tmp/video.mkv', currentTimePos: 12 } as never,
(text) => {
osdMessages.push(text);
},
);
integration.setMiningImageOverlayCallback((image) => {
overlayImages.push(image);
});
const internals = integration as unknown as {
mediaGenerator: {
generateNotificationIcon: (path: string, timestamp: number) => Promise<Buffer>;
};
showNotification: (
noteId: number,
label: string | number,
errorSuffix?: string,
) => Promise<void>;
};
internals.mediaGenerator = {
generateNotificationIcon: async () => Buffer.from('frame-bytes'),
} as never;
await internals.showNotification(7, 'taberu');
assert.deepEqual(osdMessages, ['✓ Updated card: taberu']);
assert.deepEqual(overlayImages, [
`data:image/png;base64,${Buffer.from('frame-bytes').toString('base64')}`,
]);
});
test('FieldGroupingMergeCollaborator keeps SentenceAudio grouped without overwriting ExpressionAudio', async () => {
const collaborator = createFieldGroupingMergeCollaborator();