fix(confidence-engine): align empty done and reopen state
- Empty Done immediate transition now sets node.status to resolved alongside resolvedNodeIds/doneForNowIds — same canonical parked shape as populated Done (no server call required) - Clarified-question Re-open removes target from doneForNowIds so the question visibly returns to Open Questions - Immediate graph mutation creates new node objects immutably (React state semantics), touching only the target node
This commit is contained in:
@@ -359,7 +359,14 @@ export default function ScenarioForm() {
|
||||
* activity boundary. Delegates to the exported executeEpisodeDone pipeline.
|
||||
*/
|
||||
async function handleDoneForNowPromotion(targetNodeId, onImmediateGraphUpdate) {
|
||||
if (!targetNodeId || !findings?.length) return;
|
||||
if (!targetNodeId) return;
|
||||
|
||||
// Gate: only invoke episode processing when the active target has focused contributions.
|
||||
// Scenario-wide findings no longer determine whether an empty target enters episode processing.
|
||||
const hasActiveTargetContent = (focusedContributions ?? []).some(
|
||||
(c) => c.targetNodeId === targetNodeId || c.originatingTargetNodeId === targetNodeId,
|
||||
);
|
||||
if (!hasActiveTargetContent) return;
|
||||
|
||||
// In-flight guard: exactly-once enforcement
|
||||
if (doneInProgressRef.current) return;
|
||||
|
||||
Reference in New Issue
Block a user