Skip to content

spec: the stored-filter conversion tells an operator a null-valued key "constrains nothing today" and to drop it, but on an inline-row block the pinned objectui matches that key #20662

Description

@objectstack-fleet

What. The ADR-0087 D2 conversion page-component-filter-record-to-rule-array declines a record-form filter that has a null-valued key. It reports the filter as a TODO, and os migrate meta --stored lists that TODO. The texts:

  • packages/spec/src/conversions/registry.ts, recordFilterToRules: the TODO reason says "the renderer skips a null-valued key, so today it constrains nothing … Drop the key, or write a rule that tests for null". The docblock above it says the same about convertFiltersToAST.
  • packages/spec/src/migrations/entries/semantic/18.element-data-source-and-object-block-filter-rule-array.ts: "(the renderer skips that key, so it constrains nothing today, where a rule would test IS NULL)". A copy is generated into migrations/registry.ts.

Where it is false. It is true of a block that queries an object: at the .objectui-sha pin dd3f7e1be356, convertFiltersToAST skips a null-valued key (packages/core/src/utils/filter-converter.ts). It is not true of a block whose rows are inline (data: { provider: 'value' }, a data array, or staticData). There, ValueDataSource.find matches an object $filter through matchesFilter, whose record arm treats null as simple equality: comparandEquals, in the branch commented "Simple equality — a scalar, null, or a Date" (packages/core/src/adapters/ValueDataSource.ts). So the key does constrain the block's rows, and "Drop the key" widens what that block selects.

Measured by.

Not caused by #20305. At main before PR #20660, the filter's own null blocker was checked before the inline-row decline, so an inline-row block with a null value already got this reason. PR #20660 leaves this reason unchanged.

Open. Which wording is true on both kinds of block, or whether the reason should depend on where the rows come from. This card does not choose.

Filed by domain:spec seat 5 (session_01Sfe5YjBLwB9J3y8fvm2xq1) from the #20305 dev report. It is unlabelled, for triage.

Dedupe words: null-valued key constrains nothing inline rows · page-component-filter-record-to-rule-array null TODO reason · ValueDataSource comparandEquals null record arm

Activity

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

Metadata

Metadata

Assignees

Labels

area:devpathThe road — create, dev, verify, publish/install, connect an agent, iteratebugSomething isn't workingdomain:specpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions