Route OSD notifications through overlay with mpv fallback

- Add main/renderer overlay notification pipeline with loading-state support
- Preserve notificationType semantics across osd/system/both/none routing
- Update plugin fallback behavior, docs/config examples, and regression tests
This commit is contained in:
2026-03-16 00:52:13 -07:00
parent e35aac6ee0
commit fbfd688109
30 changed files with 882 additions and 81 deletions

View File

@@ -10,17 +10,14 @@ import {
test('notify anilist setup main deps builder maps callbacks', () => {
const calls: string[] = [];
const deps = createBuildNotifyAnilistSetupMainDepsHandler({
hasMpvClient: () => true,
showMpvOsd: (message) => calls.push(`osd:${message}`),
showDesktopNotification: (title) => calls.push(`notify:${title}`),
showConfiguredNotification: (title, payload) =>
calls.push(`configured:${title}:${payload.kind}:${payload.message}`),
logInfo: (message) => calls.push(`log:${message}`),
})();
assert.equal(deps.hasMpvClient(), true);
deps.showMpvOsd('ok');
deps.showDesktopNotification('SubMiner', { body: 'x' });
deps.showConfiguredNotification('SubMiner', { kind: 'success', message: 'ok' });
deps.logInfo('done');
assert.deepEqual(calls, ['osd:ok', 'notify:SubMiner', 'log:done']);
assert.deepEqual(calls, ['configured:SubMiner:success:ok', 'log:done']);
});
test('consume anilist setup token main deps builder maps callbacks', () => {