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:
+15
-3
@@ -144,13 +144,25 @@ export default function Wizard() {
|
||||
if (!draft.flowKey || !actor) return;
|
||||
setWorking(true);
|
||||
try {
|
||||
// In a real app we'd save proper data models here.
|
||||
// For the spike we just move forward and do a dummy update
|
||||
await wizardApi.updateDraftConfig(draft.flowKey, {
|
||||
config: { wizard: { panelState: { fields: draft.fields } } }
|
||||
});
|
||||
|
||||
if (draft.fields.length > 0 && draft.nodes.length > 0) {
|
||||
const replaceOps: BatchOperation[] = draft.nodes.map(n =>
|
||||
wizardApi.ops.createView({ display_name: n.display_name, fields: draft.fields })
|
||||
);
|
||||
const res = await wizardApi.applyBatch(draft.flowKey, replaceOps, actor);
|
||||
const newViewKeys = (res?.result?.ops || []).map((o: any) => o.key);
|
||||
const wireOps: BatchOperation[] = draft.nodes.map((n, i) =>
|
||||
wizardApi.ops.presentationEdge(n._key, newViewKeys[i])
|
||||
);
|
||||
if (wireOps.length) await wizardApi.applyBatch(draft.flowKey, wireOps, actor);
|
||||
updateDraft({ nodes: draft.nodes.map((n, i) => ({ ...n, viewKey: newViewKeys[i] })) });
|
||||
}
|
||||
|
||||
updateDraft({ step: "Validate" });
|
||||
pushToast("ok", "Data requirements saved");
|
||||
pushToast("ok", `Saved ${draft.fields.length} fields onto every step's form`);
|
||||
} catch (err: any) {
|
||||
pushToast("err", `Save failed: ${err.message}`);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user