mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-07-31 19:21:33 -07:00
fix(immersion): use localtime rollup keys and guard sentence search limi
- Remove UTC-based UNION branch from getRollupGroupsForSessions; keep only localtime rollup - Add resolveSentenceSearchLimit to clamp/sanitize infinity and negative limit values - Switch onMiningImageEvent from queued to latest-value IPC listener (drop stale frames) - Add regression tests for rollup key locality and sentence search limit edge cases
This commit is contained in:
@@ -34,6 +34,15 @@ test('overlay preload buffers only latest subtitle state until renderer listener
|
||||
assert.match(source, /onSubtitle:\s*\(callback:[\s\S]+?onSubtitleSetEvent\(callback\);/);
|
||||
});
|
||||
|
||||
test('overlay preload buffers only latest mining image payload before listener registration', () => {
|
||||
const source = fs.readFileSync(path.join(process.cwd(), 'src', 'preload.ts'), 'utf8');
|
||||
|
||||
assert.match(
|
||||
source,
|
||||
/const onMiningImageEvent =\s*createLatestValueIpcListenerWithPayload<MiningImagePayload>\(\s*IPC_CHANNELS\.event\.miningImage,/,
|
||||
);
|
||||
});
|
||||
|
||||
test('overlay preload exposes queued pointer recovery requests', () => {
|
||||
const source = fs.readFileSync(path.join(process.cwd(), 'src', 'preload.ts'), 'utf8');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user