feat(flow-designer): server-driven node config form + reference-field pickers#1423
Merged
Merged
Conversation
… pickers (ADR-0018/0019)
Render the flow node property form and add-node palette from what the running
engine publishes (`GET /api/v1/automation/actions`), instead of a hardcoded
client form — so the designer stays in lock-step with the backend.
- useFlowNodePalette: merge the engine's published node descriptors with the
hardcoded base palette; NodePalette accepts `items` and scrolls.
- json-schema-to-fields: adapt a published config JSON Schema into the
inspector's FlowConfigField model (select/boolean/number/objectList/nested),
and map a string's `xRef` annotation to a typed `reference` field.
- FlowReferenceField: an editable combobox (native <datalist>) for reference
values — object, object-field (resolved from the flow's $trigger object or a
sibling config key), flow, role, and in-flow node. Always accepts free text
and degrades to plain text on an empty catalog, so authors are never trapped.
- flow-node-config: add the `reference` kind + ReferenceKind/FlowReferenceSpec;
convert objectName (start + CRUD), subflow.flowName, boundary attachedToNodeId
to references. FlowNodeInspector threads {draft, node} context to the fields.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
hotlong
pushed a commit
that referenced
this pull request
May 31, 2026
…anel (#1424) Two flow-designer enhancements, both building on the server-driven node config form (#1423). 1. Polymorphic reference pickers (Tier-2) - Reference field kind now resolves its concrete picker at render time from a sibling field/column value (`xRef.kindFrom` + `map`) in addition to a static `xRef.kind`. Reference kinds extended to object / object-field / flow / role / node / user / team / queue / department / connector / email-template. - `ReferenceCombobox` is factored out of `FlowReferenceField` and reused per-row inside the `objectList` repeater, so an approver's `value` cell follows its row's `type` (user/role/team/department picker, or an object-field picker for `field`). Empty catalogs degrade to free text via a native <datalist>, so authors are never trapped. - Adapter (`json-schema-to-fields`) maps both static and polymorphic `xRef` onto reference fields/columns, validating each kind so an unknown kind degrades to plain text. Tests cover static-kind, polymorphic, and all-unknown-map cases (12/12). 2. Edge property panel - Connection edges are now selectable on the canvas: a transparent wide hit-path over each edge (and its branch-label pill) emits an `{ kind: 'edge' }` selection; the selected edge highlights in primary. - A new `FlowEdgeInspector` edits the edge's routing semantics — branch label, condition (CEL), and the default ("else") branch toggle (which clears + disables label/condition) — with source/target shown read-only. - The single `flow` inspector becomes a thin `FlowInspector` router that forwards node vs. edge selections to the right scoped editor. - Stable `edgeKey(edge, i)` (id, else `source->target#index`) keys selection, traversal highlighting, and inspector lookup off one helper. - i18n keys added for en + zh. Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renders the flow node property form and the add-node palette from what the running automation engine publishes (
GET /api/v1/automation/actions), instead of a hardcoded client form — so the Studio designer stays in lock-step with the backend (ADR-0018/0019). Companion to the framework PR that publishes the config schema +xRefannotations.NodePaletteacceptsitemsand scrolls when long.FlowConfigFieldmodel (select / boolean / number /objectList/ one-level nested), and map a string'sxRefannotation to a typedreferencefield.<datalist>) for reference values —object,object-field(resolved from the flow's$triggerobject or a sibling config key),flow,role, and in-flownode. Always accepts free text and degrades to plain text on an empty catalog, so authors are never trapped.referencekind +ReferenceKind/FlowReferenceSpec; convertobjectName(start + CRUD),subflow.flowName, and boundaryattachedToNodeIdto references.FlowNodeInspectorthreads{ draft, node }context to the fields.Test plan
json-schema-to-fields.test.ts: 10 passed.useFlowNodePalette.test.ts: 6 passed.tsc --noEmiton @object-ui/app-shell: clean.crm_discount_approval): the approval node's Approval Status Field renders as a field-picker combobox listing the trigger object's fields ("Fields of crm_opportunity."); the start node's Object renders as an object-catalog combobox. Both still accept free text.