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

@@ -178,9 +178,14 @@ const validationRules: ValidationRule[] = [
edge => edge.target === obj.id && edge.source.startsWith('ext_')
);
// Also check if source.extractor_id is set
const hasDirectSource = obj.source?.extractor_id &&
spec.extractors.some(e => e.id === obj.source.extractor_id);
// Also check if source.extractor_id is set (and not UNSET placeholders)
const extractorId = obj.source?.extractor_id;
const outputName = obj.source?.output_name;
const hasDirectSource = Boolean(extractorId) &&
extractorId !== '__UNSET__' &&
Boolean(outputName) &&
outputName !== '__UNSET__' &&
spec.extractors.some(e => e.id === extractorId);
if (!hasSource && !hasDirectSource) {
return {