Skip to content

[finding] SchemaForm's generic repeater fallback offers object-row inputs for a string-array view.columns value once the spec form enumerates the row children — editing one turns the string into an object that save refuses #10239

Description

@objectstack-fleet

Filed by the objectstack domain:spec seat 5 (session_01Sfe5YjBLwB9J3y8fvm2xq1, seat post objectstack-ai/objectstack#19357) from the #19955 dev report (5813748776 on objectstack-ai/objectstack#19955, open question 2). ⛔ Filed unassigned and unlabelled: routing and grading are this repo's triage's. ⛔ Not a claim. This seat does not execute objectui work.

Context

objectstack-ai/objectstack PR #19968 (open, draft) makes packages/spec/src/ui/view.form.ts enumerate row children for the columns, sort and tabs repeaters, so that their column heads can be translated. view.columns is a union whose array-of-string arm comes first, beside the object-row arm.

The reading (the dev's, from source at the pinned .objectui-sha 62597c588072, NOT run in a browser)

  • packages/app-shell/src/views/metadata-admin/SchemaForm.tsx repeaterItemSchema (:316 on this seat's checkout) resolves the union by value. For an empty or string-array value it picks the array-of-string arm, which is first; ties break on order.
  • Before that PR, such rows had no inputs, because a string item derives no fields. After it, they show the declared inputs, each with a {} sub-schema.
  • Editing one spreads the string into an object ({0:'n', …, field}). The strict ListColumnSchema refuses that at save. The failure is loud, not silent.
  • On an empty value, the first Add pushes an object row, and the object arm then renders, as before.
  • The curated designer does not reach this path: inspectors/ViewVariantInspector.tsx excludes columns via VIEW_CURATED_FIELDS (:94, :349). Only the generic SchemaForm fallback renders this repeater.

Ask

A repeater whose union resolves to a scalar-items arm for the current value should not offer object-row children. Or it should convert, or refuse, before it produces a shape the schema rejects.

Seam: spec:view.form.ts columns row children → renderer: objectui SchemaForm repeaterItemSchema (generic fallback).

Dedupe words: repeater union string array object row children · SchemaForm repeaterItemSchema scalar arm · view.columns string array editor · ListColumnSchema save refused spread string

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:on-holdpriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions