feat(notifications): add overlay notifications with position config (#110)

This commit is contained in:
2026-06-10 22:46:52 -07:00
committed by GitHub
parent c09d009a3e
commit 7be1843c41
177 changed files with 7524 additions and 440 deletions
+13
View File
@@ -51,6 +51,7 @@ function makeArgs(overrides: Partial<CliArgs> = {}): CliArgs {
playNextSubtitle: false,
shiftSubDelayPrevLine: false,
shiftSubDelayNextLine: false,
playbackFeedback: undefined,
cycleRuntimeOptionId: undefined,
cycleRuntimeOptionDirection: undefined,
anilistStatus: false,
@@ -252,6 +253,9 @@ function createDeps(overrides: Partial<CliCommandServiceDeps> = {}) {
showMpvOsd: (text) => {
osd.push(text);
},
showPlaybackFeedback: (text) => {
calls.push(`feedback:${text}`);
},
log: (message) => {
calls.push(`log:${message}`);
},
@@ -493,6 +497,15 @@ test('handleCliCommand reports async mine errors to OSD', async () => {
assert.ok(osd.some((value) => value.includes('Mine sentence failed: boom')));
});
test('handleCliCommand routes playback feedback through configured feedback surface', () => {
const { deps, calls, osd } = createDeps();
handleCliCommand(makeArgs({ playbackFeedback: 'You can skip by pressing TAB' }), 'initial', deps);
assert.deepEqual(calls, ['initializeOverlayRuntime', 'feedback:You can skip by pressing TAB']);
assert.deepEqual(osd, []);
});
test('handleCliCommand applies socket path and connects on start', () => {
const { deps, calls } = createDeps();