LearnNewsExamplesConnect
Frontmatter
assigneesneo-gemini-maryam
createdAtNov 4, 2026, 8:36 PM
updatedAtNov 5, 2026, 11:49 AM
githubUrlhttps://github.com/neomjs/neo/issues/20284
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[x] 20275 Resolve dotted property paths in collection.Sorter, collection.Base, and data.TreeStore sorting
blocking[]
closedAtNov 5, 2026, 11:49 AM

A filter on a dotted path never matches raw items or undeclared paths

Closed v13.4.0/archive-v13-4-0-chunk-3 buggood first issueaicoregrid
neo-opus-ada
neo-opus-ada commented on Nov 4, 2026, 8:36 PM

Context

Found while reviewing neomjs/neo#20276, the sorting fix for #20275. The probe ran the engine's own unit setup against dev (3ed29de673) and against #20276's head (59e702372f). Both give the same rows. The filter is {operator: '>=', property, value: 30} over two items scoring 20 (id 1) and 50 (id 2), so every row should keep [2]:

property                         owner                      kept   expected
tp (flat; the probe's control)   Collection, Store R/T      [2]    [2]
stats.score (path into Object)   Collection                 []     [2]
stats.score (path into Object)   Store, Records             []     [2]
stats.score (path into Object)   Store, Turbo               []     [2]
user.score (declared nested)     Store, Records             [2]    [2]
user.score (declared nested)     Store, Turbo               []     [2]

R = autoInitRecords: true, T = autoInitRecords: false (Turbo Mode).

The Problem

A filter whose property is a dotted path keeps nothing unless the item itself exposes that dotted key. Only a Record with a declared nested field does. Turbo Mode stores, plain items in a Collection, and paths into Object fields filter out every item. The grid header's inline filter takes the column's dataField as its property. A dotted column in a Turbo Mode grid therefore filters out every row. After #20276, sorting resolves these paths, but filtering still reads the key directly.

The Architectural Reality

  • Neo.collection.Filter#decide reads recordValue = item[property] (src/collection/Filter.mjs). Every operator uses that one direct read, typedIncluded and its typedKeys set included.
  • Neo.data.Record#get(field) resolves an undeclared dotted path through Neo.ns(field, false, this[dataSymbol]) (src/data/RecordFactory.mjs). A declared nested field exposes its dotted getter (record['address.city'], learn/guides/datahandling/Records.md).
  • grid/header/Button.mjs builds its inline filter as store.getFilter(me.dataField, 'header-inline').
  • #20276 adds Neo.collection.Sorter.getValue(item, property). It reads the key directly first, then, for a dotted string path whose value is undefined, tries item.get(path) and then Neo.ns(path, false, item). The same PR makes Store#resolveField hydrate the declared root of an undeclared dotted path in Turbo Mode without stamping the dotted key.
  • Design authority: learn/guides/datahandling/Grids.md configures columns with dotted dataFields ({text: 'Firstname', dataField: 'user.firstname'}). The header filter takes that dataField as its property, and #20275 treats a dotted property that sorts as a no-op as a bug.

The Fix

Filter#decide reads recordValue through the resolver sorting uses after #20276: Neo.collection.Sorter.getValue(item, property), or a neutral static that both classes import if review prefers that. Flat properties keep their one-read fast path. The dotted fallback runs only when the direct read is undefined.

Acceptance Criteria

  • AC-1: A filter on a dotted path matches plain items in a Collection and raw items in a Turbo Mode Store and TreeStore: the table's empty rows keep [2]. Flat-property filters are unchanged.
  • AC-2: A declared nested field filters the same in Record and Turbo Mode (user.score keeps [2] in both).
  • AC-3: Unit specs cover AC-1 and AC-2, each red on dev before the fix: test/playwright/unit/collection/ for Filter, test/playwright/unit/data/ for Store and TreeStore. The existing suites pass.

Out of Scope

  • Sorting by dotted paths: #20275, PR #20276.
  • Remote filtering, which the server applies.

Related

#20275 (sorting, same resolution rule) · PR #20276 (the resolver this builds on) · examples/grid/nestedRecordFields.

unowned-rationale: Ready for a contributor; maintainers provide planning and review. It starts once #20276 merges, since that PR carries the resolver.

Live latest-open + closed sweep: checked the latest 20 open issues plus closed searches ("filter dotted path", "filter nested field property"; no same-surface hit) at 2026-11-04T19:35Z. No equivalent or prior exclusion found. A2A sweep (last 30, all read-states): no claim on this scope. Memory Core sweep: earlier soft-hydration work covered calculated fields in Turbo filtering, not dotted paths. Own-assignment sweep: no same-surface ticket.

Retrieval Hint: "Filter dotted property path never matches Turbo Mode raw items or undeclared Object field paths"

Origin Session ID: 2171b2cd-e447-4cac-8b9f-ccadc6e20db5