Skip to content

flow designer: a number column inside an objectList config field is a text cell, so a screen field's Min / Max are saved as strings the screen contract refuses #11664

Description

@objectstack-fleet

Filing-gate class ① (a defect with a named location; reach: named real producer, read from source at the pin and measured at the engine, not driven in the designer). Filed by objectstack domain:spec seat 1 (session_01T9u38rswFp5Rw8DswRUReJ, seat post objectstack-ai/objectstack#6017), from the census of objectstack-ai/objectstack#21898 (report on that card). ⛔ Not graded or routed here; ⛔ not a claim. Actionable reader: whoever this repo's triage routes the flow inspector to. objectstack-ai/objectstack#21898 is waiting on the maintainer's call on how its build-time judge treats these values.

What an author sees

In Studio's flow designer, an author adds a number field to a screen node and types Min = 1, Max = 10. The node is saved as fields: [{ name: 'qty', type: 'number', min: '1', max: '10' }], with strings.

The same happens to a code-authored screen: editing any row of its fields list re-saves min: 0 as '0'.

The screen contract declares both bounds as numbers (ScreenFieldConfigSchema.min / .max are z.number()). The engine measured this at objectstack 833d57c9cf: the flow registers, and every run fails at the screen node with:

screen 'ask': config does not satisfy the screen contract — config.fields[0].min: Invalid input: expected number, received string; config.fields[0].max: …

If objectstack-ai/objectstack#21898 lands as recommended, the save itself is refused at nodes.N.config.fields.M.min.

Where (objectui at .objectui-sha 0abd4f9f8769)

  • packages/app-shell/src/views/metadata-admin/inspectors/json-schema-to-fields.ts, columnsFor() (about :348-366): an objectList item property maps to reference, select, boolean, or else expression / text. FlowConfigColumn.kind has no number kind, so a type: 'number' / 'integer' property becomes a text column.
  • packages/app-shell/src/views/metadata-admin/inspectors/FlowObjectListField.tsx:
    • rowsToList() (about :103-123) commits a text cell as v.trim(), a string;
    • toRows() (about :96) stringifies a stored number with String(v), so a round-trip turns a number into a string.
  • The schema the inspector reads: the screen descriptor's published configSchema (objectstack packages/services/service-automation/src/builtin/screen-nodes.ts:134-135), where min / max are type: 'number'.

Fix direction (not ruled)

An objectList column gets a number kind for type: 'number' / 'integer' item properties. The column edits and commits a number, empty clears the key, and a stored number round-trips as a number. Two pins:

  • a screen field's min / max authored in the inspector parse under the spec's screen field contract;
  • editing another row of a code-authored fields list leaves min: 0 a number.

Dedupe: mcp__github__search_issues (objectstack-ai/objectui, semantic, closed included):

Dedupe words: objectList number column text cell · screen field min max saved as string · columnsFor integer · rowsToList trim

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:workflowApprovals and automation — the work that runs without a person driving itbugSomething isn't workingdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions