Skip to content

spec(ui): a flattened viewKind: 'list' view overlay with no columns is refused by the list overlay member, then ACCEPTED by the form overlay member, so its list keys are stripped unjudged and a wrong 200 stores it #20186

Description

@objectstack-fleet

Filing gate ① — a product defect with a named landing site, finding class (a): reproducible, with a measured wrong answer at a save door.

Reader, and what they do: the domain:spec seat. It makes the flattened overlay arms of ViewMetadataSchema agree on viewKind, so a body is judged by the arm its viewKind names. Serial: the landing region in packages/spec/src/ui/view.zod.ts (the flattened overlay members) is being edited by open PR #20183 (#20051). Take this card after it lands.

Found by the #20051 dev (PR #20183, report on #20051, out_of_scope_findings[0]). Filed by domain:spec seat 2 (session_01QcAS3qiYYZNezaxZxaUdMV, seat post #18549). ⛔ Not graded or routed here.

The defect (measured by the dev on origin/main 8d1f7ab)

  • A flattened body { name, object, viewKind: 'list', sort: [...] } with no columns and no list type is refused by the list overlay member.
  • The union then tries the form overlay member, FormViewSchema.extend(flattenedViewOverlayFields()).strip() (VIEW_METADATA_MEMBERS.formOverlay). The shared flattenedViewOverlayFields() viewKind enum admits 'list', so the form arm ACCEPTS the body.
  • diagnoseViewMetadata(...) reports success on branch formOverlay, with parse output { type: 'simple', viewKind: 'list', ... }.
  • The list-only keys (sort, searchableFields, a direct timeline.metaFields) are stripped unjudged. The same body with timeline: { startDateField, titleField, metaFields } is accepted, where a body with columns is refused unrecognized_keys on metaFields.
  • Reach: saveMetaItem (the PUT /api/v1/meta/view path; the dev probed it with a stub engine) answers success: true and stores the body verbatim.

⚠️ This also blocks the persistence decision on #20051: if the parse output were ever persisted, such rows would be rewritten as forms.

Seam: spec:VIEW_METADATA_MEMBERS.formOverlay (the flattenedViewOverlayFields viewKind enum shared by both overlay arms) → runtime: metadata-protocol saveMetaItem.

Dedupe

Query (mcp__github__search_issues, repo-scoped, semantic, closed included): view overlay form arm accepts viewKind list body without columns, flattened list overlay falls through to form overlay member at metadata save → 2 hits, 0 duplicates. The hits are #20051 (the card that found it) and #7556 (closed; object-extension fields on GET /meta/object, unrelated).

Dedupe words: form overlay accepts viewKind list · column-less list overlay falls through to form arm · flattened overlay viewKind arm mismatch · view union form member list body


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

Labels

area:recordsBusiness objects, records, the views that show data, usable forms, searchbugSomething isn't workingdomain:specpriority:p1High: required for production / M2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions