feat(ui): edit objective/constraint source in panel + UNSET wiring

This commit is contained in:
2026-01-29 02:49:04 +00:00
parent e2cfa0a3d9
commit 993c1ff17f
3 changed files with 170 additions and 18 deletions

View File

@@ -560,9 +560,10 @@ function SpecRendererInner({
// clear the target's source to avoid stale runnable config.
if (sourceType === 'extractor' && (targetType === 'objective' || targetType === 'constraint')) {
updateNode(edge.target, {
// Setting to an empty object would violate schema; clear to placeholder
// and let validation catch missing wiring.
source: { extractor_id: '', output_name: '' },
// Objective/constraint.source is required by schema.
// Use explicit UNSET placeholders so validation can catch it
// without risking accidental execution.
source: { extractor_id: '__UNSET__', output_name: '__UNSET__' },
}).catch((err) => {
console.error('Failed to clear source on node:', err);
setError(err.message);