Skip to content

docs(guide): objectos-integration.mdx:280 authors object-grid.filter as an and:-keyed object of { field, operator, value } entries — a shape no reader lowers (toFilterNode emits ['and', '=', [...]]) #7713

Description

@claude

Filed unassigned from the objectstack #15442 / #15449 consumer census (PM session session_01M59rPZZFzqhfMUPFqqZTkf, os-dev seat, 2026-09-05). Measured at the pin a472b07.

Measured

content/docs/guide/objectos-integration.mdx:275-286 (fenced example, comment "ObjectQL filter syntax"):

type: 'object-grid',
filter: {
  and: [
    { field: 'status', operator: 'eq', value: 'active' },
    { field: 'created_date', operator: 'gte', value: '2024-01-01' }
  ]
},

None of the three shapes the read path lowers is this one (packages/core/src/utils/filter-converter.ts:285-305: a ViewFilterRule[], an AST node array, or a MongoDB-style record). Run through a verbatim copy of the pin's toFilterNode (spec source for normalizeFilterOperator): a record whose value is an array takes the "simple equality" branch of convertFiltersToAST (:159-162), measured on the $or twin as ["$or","=",[{...},{...}]] — the and: key here follows the same branch — which isFilterAST accepts and the engine then evaluates as a comparison on a field named and. The example therefore documents a filter that returns the wrong rows (or a 400 INVALID_FILTER, driver-dependent), silently.

Prescription

The grid's own registry entry documents the array form (packages/plugin-grid/src/index.tsx:218, "Filter criteria in JSON-rules form"; README.md:468, :528 show [{ field, operator, value }]). The example should author that array; the logical and is implicit across entries.

Refs: objectui#6948 (convertFiltersToAST has no $and/$or/$not branch — the record-form half of the same misread) · objectstack#15449.


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

No one assigned

    Labels

    documentationImprovements or additions to documentationdomain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repofindingpm:queuepriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions