Commit e7a8de7
feat(flow-designer): schema-driven keyValue + numberList mapping (#3304) (#2708)
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.
Claude-Session: https://claude.ai/code/session_01VuvxWgoadqryqBcjs7TpVi
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0318118 commit e7a8de7
3 files changed
Lines changed: 108 additions & 1 deletion
File tree
- .changeset
- packages/app-shell/src/views/metadata-admin/inspectors
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
Lines changed: 54 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
| |||
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
58 | 71 | | |
59 | 72 | | |
60 | 73 | | |
| |||
287 | 300 | | |
288 | 301 | | |
289 | 302 | | |
| 303 | + | |
| 304 | + | |
290 | 305 | | |
291 | 306 | | |
292 | 307 | | |
| |||
322 | 337 | | |
323 | 338 | | |
324 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
325 | 351 | | |
326 | 352 | | |
327 | 353 | | |
| |||
0 commit comments