fix(startup): release autoplay gate before first subtitle line

- Send synthetic `__warm__` payload when no current subtitle exists so the gate can release without waiting for a subtitle event that can't fire while paused
- Visible-overlay readiness accepts `__warm__` once the overlay is content-ready, rejects it otherwise
- Autoplay gate self-retries via scheduled polling when signal target isn't ready, removing reliance on an external flush event
- Skip duplicate desktop notification when overlay or startup sequencer already delivered it
This commit is contained in:
2026-06-06 01:55:12 -07:00
parent ef914a321f
commit 501304e451
11 changed files with 205 additions and 22 deletions
@@ -35,6 +35,8 @@ export function notifyCharacterDictionaryAutoSyncStatus(
): void {
const type = deps.getNotificationType() ?? 'overlay';
if (type === 'none') return;
let overlayShown = false;
let startupSequencerShown = false;
if (shouldShowOverlay(type)) {
if (deps.showOverlayNotification) {
@@ -45,6 +47,7 @@ export function notifyCharacterDictionaryAutoSyncStatus(
variant: overlayVariantForPhase(event.phase),
persistent: !isTerminalPhase(event.phase),
});
overlayShown = true;
} else if (!shouldShowDesktop(type)) {
deps.showDesktopNotification('SubMiner', { body: event.message });
}
@@ -52,7 +55,7 @@ export function notifyCharacterDictionaryAutoSyncStatus(
if (shouldShowOsd(type)) {
if (deps.startupOsdSequencer) {
deps.startupOsdSequencer.notifyCharacterDictionaryStatus({
startupSequencerShown = deps.startupOsdSequencer.notifyCharacterDictionaryStatus({
phase: event.phase,
message: event.message,
});
@@ -61,7 +64,7 @@ export function notifyCharacterDictionaryAutoSyncStatus(
}
}
if (shouldShowDesktop(type)) {
if (shouldShowDesktop(type) && !overlayShown && !startupSequencerShown) {
deps.showDesktopNotification('SubMiner', { body: event.message });
}
}