fix: address PR review feedback (#1424)

- restore customFields on unarchive; reconcile all occupants on field-schema edits (store.ts)
- serialize per-field saves + controlled inputs in TaskFieldsSection (race fixes)
- fn_workflow_get includes layout; Array.isArray guards in validateCodeNodeSources
- per-instance graphStepActiveContext keying; rebase in instance worktree; clear run-once memo on RETHINK
- GET /api/step-parsers + registry-backed parser select (plugin parsers reachable from editor)
- translate new workflowNodes/workflowFields strings across all 5 non-en locales

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-06-04 16:16:50 -07:00
parent 2471eb6c6f
commit 6f7f6860be
21 changed files with 996 additions and 381 deletions

View File

@@ -401,9 +401,15 @@ export async function validateCodeNodeSources(
// Recurse into any foreach templates (code nodes are legal inside them, KTD-15).
for (const node of ir.nodes) {
if (node.kind !== "foreach") continue;
const template = (node.config as { template?: { nodes?: WorkflowIrNode[] } } | undefined)?.template;
if (template?.nodes) {
failures.push(...(await validateCodeNodeSources({ nodes: template.nodes })));
const template = (node.config as { template?: { nodes?: unknown } } | undefined)?.template;
// Guard with an explicit array check: a malformed config where `nodes` is a
// non-array truthy value would otherwise break the `for...of` inside the
// recursive validateCodeNodeSources call and bubble as a 500 rather than a
// clean validation failure.
if (Array.isArray(template?.nodes)) {
failures.push(...(await validateCodeNodeSources({ nodes: template.nodes as WorkflowIrNode[] })));
} else if (template?.nodes != null) {
failures.push({ nodeId: node.id, error: "foreach template.nodes must be an array" });
}
}
return failures;