feat(flow-designer): schema-driven keyValue + numberList mapping (#3304)#2708
Merged
Merged
Conversation
Extends the server-first form generator (jsonSchemaToFlowFields, ADR-0018) so the previously schema-less flow nodes can be given a configSchema whose online form matches their hardcoded one — the objectui half of framework #3304 (descriptor counterpart to #2670 Phase 3). • an object with `additionalProperties` (a value schema, or `true`) and no fixed `properties` → a `keyValue` field (the flat `{ var: value }` editor). The object-with-`properties` case still flattens to sub-fields and `continue`s before this branch, so it is never mis-mapped; an opaque object or `additionalProperties: false` still falls through to the Advanced block. • an array of number / integer → `numberList` (sibling of array-of-string → `stringList`). This unblocks the keyValue-heavy nodes (assignment, the CRUD quartet, script, subflow, screen) — the framework side can now publish their configSchemas without objectui dropping the keyValue editor to raw Advanced JSON. Pure capability addition: inert until a node publishes such a schema, so no existing form changes and zero regression. Tests: additionalProperties (value schema + `true`) → keyValue; fixed-properties object still flattens (not keyValue); opaque / `additionalProperties: false` → Advanced; number/integer arrays → numberList while string arrays stay stringList. type-check + eslint clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VuvxWgoadqryqBcjs7TpVi
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 20, 2026 01:13
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
The objectui half of framework #3304 — the adapter extension that unblocks giving the previously schema-less flow nodes a server-driven config form. Follows objectui #2670 Phase 3 (#2699, merged) and framework #3313 / #3321 (loop + map configSchemas, both merged).
What
The server-first form generator (
jsonSchemaToFlowFields, ADR-0018) had no way to render two editor kinds from a JSON Schema, so any node config using them could only be driven from a publishedconfigSchemaby dropping to raw Advanced JSON. Now:additionalProperties(a value schema, ortrue) and no fixedproperties→ akeyValuefield (the flat{ var: value }editor). The idiomatic JSON-Schema shape for a string-keyed map.numberList(sibling of the existing array-of-string →stringList).Discrimination is unambiguous: the object-with-
propertiescase is handled first andcontinues, so it never reaches the keyValue branch; an opaque object (no properties, noadditionalProperties) oradditionalProperties: falsestill falls through to the Advanced block.Why
This is the blocker I flagged on framework #3321: nodes like
assignment(assignments), the four CRUD nodes (fields/filter),script(variables),subflow, andscreen(defaults) all lean on thekeyValueeditor. Until the adapter could produce it, shipping theirconfigSchemas would make objectui prefer the server schema and drop the keyValue editor — a regression. With this in place, the framework side can publish those schemas and the online form will match the hardcoded one.Pure capability addition — inert until a node publishes such a schema. No existing form changes, zero regression.
Verification
additionalProperties(value schema +true) → keyValue; a fixed-propertiesobject still flattens to sub-fields (not keyValue); an opaque object /additionalProperties: false→ Advanced; number/integer arrays → numberList while string arrays stay stringList (json-schema-to-fields.test.ts, 26 pass).turbo type-check(app-shell) clean; eslint clean.Next (toward #3304 "all 11")
With this merged, a follow-up framework PR authors the
configSchemas for the keyValue-heavy nodes (the same wayloop/mapwere done). Thedecisionnode (its virtualtargetcolumn is derived from edges, not config) andwait(its fields live in a top-levelwaitEventConfigblock, notconfig) are genuinely objectui-specific and can stay on their hardcoded forms — they have no online/offline divergence today, since a node with noconfigSchemaalready renders identically from the hardcoded fallback.🤖 Generated with Claude Code
https://claude.ai/code/session_01VuvxWgoadqryqBcjs7TpVi
Generated by Claude Code