test: cover the popup blacklist UI, tighten audit findings

The delta model was only covered at module level; the popup wiring around
it was not exercised at all. Seven specs now drive the real settings UI in
the packed extension, including the migration path: a pre-v3.1.0 snapshot
is converted on open, the legacy key is removed, and a default missing
from that snapshot is delivered again.

Also from the audit pass:
- await the blacklist read in init instead of firing a floating promise
- unify the debug report on the finder's own candidate list, which the
  separate traversal missed shadow-DOM videos from
- assert that a single candidate is always returned regardless of its
  ranking signals, so no scoring signal can regress a single-player site

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
KoalaDev
2026-08-14 07:39:41 +02:00
parent 36e1291d2c
commit 66971150c7
6 changed files with 265 additions and 48 deletions
+3 -11
View File
@@ -685,16 +685,6 @@
hcmDeferredSnapBack(); // buffering → wait for ready, then snap once (#3)
}
return;
}
// Deliberate: offer the choice (Teleparty-style), default = snap back.
hcmShowDesyncDialog(action, target);
}
return;
@@ -1332,7 +1322,9 @@
src.connect(dryGain);
dryGain.connect(outputGain);
src.connect(compressor);
compressor.connect(compGain);
compressor.connect(compGain);
compGain.connect(outputGain);
outputGain.connect(limiter);
limiter.connect(ctx.destination);
dryGain.gain.value = 1;
+1 -1
View File
@@ -392,7 +392,7 @@ async function init() {
elements.username.value = username;
syncDevToolsVisibility();
if (elements.filterNoise) elements.filterNoise.checked = localData.filterNoise !== false;
readBlacklistOverrides().then(overrides => renderBlacklistEditor(overrides));
renderBlacklistEditor(await readBlacklistOverrides());
if (elements.autoSyncNextEpisode) elements.autoSyncNextEpisode.checked = localData.autoSyncNextEpisode !== false;
if (elements.chatEnabled) elements.chatEnabled.checked = localData.chatEnabled === true;
if (elements.chatNotifications) elements.chatNotifications.checked = localData.chatNotifications !== false;