|
| 1 | +--- |
| 2 | +"@objectstack/spec": minor |
| 3 | +--- |
| 4 | + |
| 5 | +feat(spec)!: the binding-level `dataSource.filter` and the four `object-*` `filter` doors converge onto the `ViewFilterRule` array form — one filter orthography platform-wide reaches the family (#15442, #15449; objectui#6206-B, decision batch #55 option A) |
| 6 | + |
| 7 | +<!-- adr-0087: registered element-data-source-and-object-block-filter-rule-array --> |
| 8 | + |
| 9 | +**BREAKING** accept-set change at five doors — `ElementDataSourceSchema.filter` |
| 10 | +(the `dataSource` binding every data-bound page component carries) and |
| 11 | +`ComponentPropsMap['object-grid' | 'object-metric' | 'object-kanban' | |
| 12 | +'object-calendar'].filter` — shipped as `minor` under the repo's launch-window |
| 13 | +convention for breaking changes; the migration prescription is registered under |
| 14 | +protocol major 18 as ONE entry for the family. |
| 15 | + |
| 16 | +One filter orthography platform-wide (maintainer batch adjudication 2026-08-25, |
| 17 | +verbatim 「同意」; reached these two locations on 2026-09-06, decision batch #55, |
| 18 | +verbatim 「同意」, option A: converge family-wide). Until this release the |
| 19 | +binding alone declared the MongoDB-style record (`FilterConditionSchema`) — so it |
| 20 | +refused the array the consumer's own pins author at that key, and |
| 21 | +`element:record_picker` carried two orthographies at two keys resolved through |
| 22 | +one `??` in the renderer — while the four `object-*` doors declared `z.unknown()` |
| 23 | +and took the record, the ObjectQL AST tuple array and the rule array alike, |
| 24 | +silently. All five now declare `z.array(ViewFilterRuleSchema)`, the form every |
| 25 | +other `filter` door in the map already carried; the `FilterConditionSchema` |
| 26 | +import that existed in `page.zod.ts` for this one site leaves with it. |
| 27 | + |
| 28 | +Sequenced measurement-first, as the family had to be: at the objectui pin |
| 29 | +`a472b07` the `object-metric` aggregate path posted an array `where` that |
| 30 | +`POST /analytics/query` refused (400 on every array form, #15828), so the |
| 31 | +converge was parked behind the pin bump #16626. At the pin this repo builds |
| 32 | +against (`53ded82b`, objectui#7754) the adapter lowers an authored array through |
| 33 | +`translateFilterArray` and the spec's own `parseFilterAST` sink before the |
| 34 | +wire; `ObjectGrid` lowers a rule array through `toFilterNode`; `ObjectKanban` / |
| 35 | +`ObjectCalendar` hand it verbatim to `$filter`, where `convertQueryParams` |
| 36 | +lowers it; the binding's composition seam AND-combines it with the named view's |
| 37 | +rules through `mergeFilterNodes`. Nothing on those paths parses the value |
| 38 | +against the installed spec. |
| 39 | + |
| 40 | +**Migration** (`element-data-source-and-object-block-filter-rule-array` — |
| 41 | +listed by `os migrate meta --from 17` once the protocol major is 18): a |
| 42 | +record-form `filter: { status: 'active' }` becomes |
| 43 | +`filter: [{ field: 'status', operator: 'equals', value: 'active' }]`; an |
| 44 | +operator object `{ status: { $ne: 'done' } }` becomes |
| 45 | +`[{ field: 'status', operator: 'not_equals', value: 'done' }]`; several keys |
| 46 | +become several rules (they AND); an AST tuple array |
| 47 | +`[['owner_id', '=', '{current_user_id}']]` becomes |
| 48 | +`[{ field: 'owner_id', operator: 'equals', value: '{current_user_id}' }]` — |
| 49 | +placeholders and date macros are unchanged. The record form is refused at |
| 50 | +`filter` (`invalid_type`, expected array); the tuple array is refused at |
| 51 | +`filter.0` (expected object). The dashboard widget `filter` |
| 52 | +(`dashboard.zod.ts`) is a different family and is unchanged by this release |
| 53 | +(#15829); `object-grid.defaultFilters` is a different key, not named by the |
| 54 | +ruling, and is unchanged. |
| 55 | + |
| 56 | +In-repo authors migrated in the same change: four spec test fixtures at the |
| 57 | +binding, five showcase authors (`my-work.page.ts`, `index.ts`) and three lint |
| 58 | +fixtures. Type aliases: `ElementDataSourceParsed`, `ObjectMetricPropsParsed`, |
| 59 | +`ObjectKanbanPropsParsed` and `ObjectCalendarPropsParsed` are declared (ADR-0122: |
| 60 | +`operator` normalizes on parse, so input ≠ infer at these five schemas now). |
0 commit comments