fix(live): expose full refresh busy and phase progress

Ensure full refresh marks the live projection as building before source refresh awaits, and expose phase-specific counters so language detection progress is determinate.

Covers #40 and #41.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
blomios
2026-10-08 16:20:36 +02:00
parent 09bdaa3ec1
commit ddd7a3f295
7 changed files with 139 additions and 25 deletions

View File

@ -78,4 +78,25 @@ test('projection status exposes phase-specific Laya progress separately from cat
assert.equal(state.total, 12);
assert.equal(state.layaProcessed, 1);
assert.equal(state.layaTotal, 2);
assert.equal(state.phaseProcessed, 1);
assert.equal(state.phaseTotal, 2);
});
test('projection status exposes generic phase progress outside Laya analysis', () => {
const state = serializeState({
status: 'building',
phase: 'projecting',
started_at: 100,
completed_at: null,
input_hash: null,
projected_count: 0,
processed_count: 7,
total_count: 12,
laya_processed_count: 0,
laya_total_count: 0,
error: null
});
assert.equal(state.phaseProcessed, 7);
assert.equal(state.phaseTotal, 12);
});