feat: split live analysis actions and page catalog loading
Separate incremental live checks from full catalog rebuilds and page projected channel/variant loading so first live-list display stays bounded. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -327,7 +327,8 @@ test('full catalog listing skips synchronous per-channel enrichment', () => {
|
||||
epgMatching: { findBestMatch: () => { epgCalls += 1; return null; } }
|
||||
});
|
||||
|
||||
assert.equal(page.channels.length, 500);
|
||||
assert.equal(page.channels.length, 100);
|
||||
assert.deepEqual(page.page, { page: 1, limit: 100, offset: 0, total: 500, hasMore: true, nextOffset: 100 });
|
||||
assert.equal(standardCalls, 0);
|
||||
assert.equal(epgCalls, 0);
|
||||
assert.ok(Date.now() - started < 1000);
|
||||
@ -342,6 +343,8 @@ test('broad searches above the enrichment guard remain bounded', () => {
|
||||
iptvOrgCatalog: { findMatch: () => { calls += 1; return null; } },
|
||||
epgMatching: { findBestMatch: () => { calls += 1; return null; } }
|
||||
});
|
||||
assert.equal(page.channels.length, 300);
|
||||
assert.equal(page.channels.length, 100);
|
||||
assert.equal(page.page.total, 300);
|
||||
assert.equal(page.page.hasMore, true);
|
||||
assert.equal(calls, 0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user