fix(live): preserve channels after empty projection rebuild (#18)
Treat successful but empty live projections with existing live input as stale, reject them on the frontend, and keep the previous visible channel state during rebuild failures. Add DOM coverage for the Settings analysis flow and backend serialization coverage for empty projection state. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -5,9 +5,10 @@ const liveProjection = require('../services/liveProjectionService');
|
||||
const router = express.Router();
|
||||
|
||||
function serializeState(state) {
|
||||
const emptyProjectionWithLiveInput = state.total_count > 0 && state.projected_count === 0;
|
||||
return {
|
||||
status: state.status,
|
||||
stale: state.status !== 'success',
|
||||
stale: state.status !== 'success' || emptyProjectionWithLiveInput,
|
||||
startedAt: state.started_at,
|
||||
completedAt: state.completed_at,
|
||||
inputHash: state.input_hash,
|
||||
|
||||
Reference in New Issue
Block a user