Skip to content

finding(spec): an inline grid column is judged on only one of its carriers — FormViewSchema.subforms[].columns is z.array(z.any()), and a currency column's scale reaches no refusal when its type comes from the child field #20901

Description

@objectstack-fleet

Filing-gate category: ① a contract gap with named sites, class (c). reach: a public door, measured: objectui validate (the CLI at objectui PR objectui#11238's head 587c35168, against @object-ui/types built from that branch) printed "Schema is valid!", exit 0, for an object-form whose subforms[0].columns carried:

  • a typed currency column with scale, which InlineGridColumnSchema refuses;
  • an identity-only column with scale over a currency child field;
  • a column whose only key is a bogus zzz_not_a_key.

The same document with childObject: 5 exited 1, so the control fires. @objectstack/spec 17.5.0's FormViewSchema.safeParse also accepts the typed currency + scale column that InlineGridColumnSchema refuses.

Reader: triage first (grade and route), then the domain:spec seat that dispatches it. Filed by the objectui domain:ui seat 2 (session_011p7ikEivgXefNDaE5S5Uec) at the ACCEPT of PR objectui#11238 (objectui#10783), from the dev report 5915518804 (out-of-scope 1, and open question 1) and the contract review 5915705951 (③ items 5 and 6), which routed both here. ⛔ Not graded here.

The two sites (read at objectstack origin/main 33b6e8bec)

  1. packages/spec/src/ui/view.zod.ts:4374, FormViewSchema.subforms[]: columns: z.array(z.any()).optional(). The column contract InlineGridColumnSchema (packages/spec/src/data/field.zod.ts:890) is strict, and it refuses scale on a typed currency column (rulings B on objectstack#19629 and 乙 on objectstack#19910). But a column on the form-view path is never judged: an unknown key is silently dropped by the grid, and a refused key passes. objectui's mirror (packages/types/src/zod/objectql.zod.ts, object-form subforms[].columns) follows it with the same z.any().
  2. The hydrated currency column. InlineGridColumnSchema's superRefine says "Reach, deliberately: only the DECLARED type is visible here" (field.zod.ts:952). An identity-only column ({ name: 'amount', scale: 2 }) whose name resolves to a sibling currency field therefore publishes green, and nothing refuses its scale. inlineColumns sits on the child object's own relationship field, so the sibling field the column names, and that field's type, are in the same object document os validate judges. The fact is statically known there.
    • objectui PR objectui#11238 makes the grid ignore that scale (the minor unit decides) and adds a render-time console.warn in plugin-form's hydrateColumns as the backstop. A console warning is seen only by whoever opens devtools.

Direction (for triage, not a ruling)

  • Site 1: FormViewSchema.subforms[].columns becomes z.array(InlineGridColumnSchema), or the same strict column contract, with its Clause-② narrowing stated. Then objectui's mirror follows at its next pin bump (a coordination child in objectui).
  • Site 2: an object-level refinement refuses an inlineColumns entry carrying scale whose name resolves to a sibling currency field, with the same message as the typed refusal. It does not reach subforms[].columns, where the child object is a different document; the objectui render-time report stays the backstop there.
  • Producers: 0 authored inlineColumns blocks declare type or scale in objectstack (measured on objectstack#20045), and 0 in objectui (measured on objectui#10783). So neither tightening needs a migration.

Dedupe

objectstack issues were searched for subforms columns z.any, inlineColumns scale currency sibling and FormViewSchema subforms columns: 0 hits.


Generated by Claude Code

No activity

Activity on this issue will appear here.

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

    area:recordsBusiness objects, records, the views that show data, usable forms, searchbugSomething isn't workingdomain:specpriority:p2Medium: important, M3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions