fix(settings): keep full refresh busy across phases
Centralize persisted full-refresh phase detection so the Settings rebuild button stays in its refreshing state during Laya, projection, writing, and EPG phases. Refs #44 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -1,6 +1,16 @@
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const { layaFallbackMessage, present } = require('../public/js/services/liveAnalysisPresentation.js');
|
||||
const { isFullRefreshPhase, layaFallbackMessage, present } = require('../public/js/services/liveAnalysisPresentation.js');
|
||||
|
||||
test('classifies every persisted full refresh phase centrally', () => {
|
||||
const phases = [
|
||||
'refreshing_live_sources', 'laya_identity', 'laya_language', 'projecting', 'writing',
|
||||
'refreshing_epg_sources', 'matching_epg', 'laya_epg_matching', 'writing_epg_matches'
|
||||
];
|
||||
assert.ok(phases.every(isFullRefreshPhase));
|
||||
assert.equal(isFullRefreshPhase('complete'), false);
|
||||
assert.equal(isFullRefreshPhase(''), false);
|
||||
});
|
||||
|
||||
test('presents determinate channel analysis progress', () => {
|
||||
const view = present({ status: 'building', phase: 'projecting', processed: 25, total: 100 });
|
||||
|
||||
Reference in New Issue
Block a user