Admit Scenario layout through the ordinary source parser inventory

This commit is contained in:
2026-09-23 00:51:05 -07:00
parent ffa7b16003
commit 846cae81e7
2 changed files with 16 additions and 3 deletions
+7 -1
View File
@@ -52,7 +52,13 @@ pub(crate) fn parser_fields(context: Context) -> Map<String, Value> {
_ => &["source", "target"],
}
}
Context::Diagram => &[],
Context::Diagram => {
// Admit the optional payload without restoring a synthetic null in
// CompleteForEdit: absence there distinguishes a real layout clear
// from an unrelated edit beside an authored explicit `layout none`.
fields.insert("layout".into(), Value::Null);
&[]
}
Context::Node => &["element"],
Context::Artifact => &["owner"],
Context::Trace => &["oa", "sa"],