fix(oracle-r4): curation contradiction + wizard view enrichment

Oracle round-7 remediation, items 2 + 7:

- flowCuration.NON_BUSINESS_SOURCE_CONTEXTS no longer lists
  EA2_DRAFT_PROCESS:process_creation (it's in STARTABLE_SOURCE_CONTEXTS).
  Adds CANVAS_AGENT_MEMORY + CANVAS_AGENT_VAULT_ROOT to NON_BUSINESS so
  vault docs never leak into hubs / catalogue.
- wizardApi.createView now accepts a fields list and emits proper field
  defs (name slug, label, type from {string,number,boolean,textarea}).
- Wizard.handleDataSave rebuilds every step's view with the user's
  draft.fields after Generate phase, then rewires the presentation
  edges to the new views. Steps now expose real business fields, not a
  generic 'Notes' textarea.
This commit is contained in:
2026-06-14 15:07:57 +04:00
parent 810d011b80
commit cc037a149e
3 changed files with 30 additions and 11 deletions
+13 -7
View File
@@ -139,9 +139,20 @@ export const wizardApi = {
},
};
},
createView(node: { display_name: string }): CreateOp {
createView(node: { display_name: string; fields?: { name: string; type: string }[] }): CreateOp {
const slug = node.display_name.toLowerCase().replace(/[^a-z0-9]+/g, "_").slice(0, 30) || "view";
const name = `${slug}_view_${Date.now().toString(36)}${Math.random().toString(36).slice(2, 6)}`;
const TYPE_MAP: Record<string, string> = { string: "string", number: "number", boolean: "boolean", textarea: "textarea" };
const fieldDefs =
node.fields && node.fields.length > 0
? node.fields
.filter((f) => f.name && f.name.trim())
.map((f) => {
const fieldSlug = f.name.toLowerCase().replace(/[^a-z0-9]+/g, "_").slice(0, 40);
const label = f.name.charAt(0).toUpperCase() + f.name.slice(1);
return { name: fieldSlug, label, type: TYPE_MAP[f.type] || "string", required: true, description: label };
})
: [{ name: "notes", label: "Notes", type: "textarea", required: false, description: "Notes for this step" }];
return {
op: "create",
coll: "view",
@@ -153,12 +164,7 @@ export const wizardApi = {
description: null,
source_context: null,
channel: "web",
layout: {
layout: "form",
fields: [
{ name: "notes", label: "Notes", type: "textarea", required: false, description: "Notes" },
],
},
layout: { layout: "form", fields: fieldDefs },
actions: [{ label: "Submit", action: "submit" }],
},
};