LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-grace
createdAtNov 15, 2026, 1:22 AM
updatedAtNov 15, 2026, 5:21 AM
githubUrlhttps://github.com/neomjs/neo/issues/20983
authorneo-opus-grace
commentsCount2
parentIssue20667
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 15, 2026, 5:21 AM

A remote Store's load params do not reach the server intact

neo-opus-grace
neo-opus-grace commented on Nov 15, 2026, 1:22 AM

Context

Store#load builds its read params (page, pageSize, filters from exportFilters() when remoteFilter, sorters from exportSorters() when remoteSort, and an optional one-off url) and passes them through Pipeline#read to the connection's read(params) (src/data/Store.mjs:1208–1286). Neither HTTP connection sends them in a form a server can use. Found while reading the remote paging path for a server-backed grid in a package built on the engine.

Reproducer: Node, the real Store#load path with XMLHttpRequest and fetch stubbed to capture the request, engine dev 7698a7ac5b (the anchors below are at that commit). The store has pageSize: 50, remoteFilter and remoteSort, one filter and one sorter.

Xhr (the default pipeline a `url` config builds):
GET /api/rows?page=1&pageSize=50&filters=%5Bobject+Object%5D&sorters=%5Bobject+Object%5D
Xhr, load({url: '/api/other'}) on the same store:
GET /api/rows?page=1&pageSize=50&filters=%5Bobject+Object%5D&sorters=%5Bobject+Object%5D&url=%2Fapi%2Fother
Fetch connection:
GET /api/rows

The Problem

  • With remoteSort or remoteFilter, the server receives [object Object] for the sorter and filter lists, so it can neither sort nor filter.
  • Over the Fetch connection the server receives no params at all: no page, no page size.
  • A one-off load({url}) on a store that already has a connection requests the old URL and sends the new one as a url query param.

The one consumer in this repository that sets both flags, examples/toolbar/paging/store/Users.mjs, loads through api (the remote-method path), so CI never sends them over an HTTP connection.

The Architectural Reality

Design authority: remoteFilter: "True to let the backend handle the filtering." (src/data/Store.mjs:235). remoteSort: "True to let the backend handle the sorting." (:241). #loadRecords: "params.url can override pipeline/connection url" (:1273).

  • A url config builds a pipeline on the Xhr connection (Store.mjs:580). Xhr#read(params) (src/data/connection/Xhr.mjs:45) reaches appendParams(), which builds new URLSearchParams(params) (:63–64, called at :219). URLSearchParams stringifies an array of objects as [object Object].
  • Fetch#read(params) calls get(this.url, params) (src/data/connection/Fetch.mjs:32), so request() takes the params as its request config (headers, method, responseType) and overwrites their url with the connection's (:114–129). Nothing reaches the query.
  • #20489 taught appendParams() to compose into a URL that already has a query or a fragment; its Out of Scope records that Fetch composes no params. Request interceptors (#9553) reshape a read's params and return {...params, headers}, which #20472 sends as Fetch request headers.

The Fix

  • Move appendParams() to Neo.data.connection.Base, keeping #20489's composition rules, and encode each value: strings, numbers and booleans as they are, arrays and plain objects as JSON (sorters=[{"property":"score","direction":"DESC"}], URL-encoded), undefined and null left out.
  • Xhr#read and Fetch#read both GET their URL with the params composed by it. Two read params are request config, not query: url replaces the connection's URL for that request, and headers are request headers over defaultHeaders, the shape request interceptors return.
  • Fetch#read stops treating any other read param as request config.

Contract Ledger

Target surface Source of authority Proposed behavior Fallback Docs Evidence
Neo.data.connection.Base#appendParams(url, params), moved from Xhr Xhr.mjs:52–79 JSDoc (#20489) same composition; arrays and objects JSON-encoded; null and undefined left out none method JSDoc unit
Neo.data.connection.Xhr#read(params) Store.mjs:1208–1286 params.url sets the request URL, params.headers are request headers, the other params compose into its query none JSDoc unit
Neo.data.connection.Fetch#read(params) Store.mjs:1208–1286; #20472 GET with the params composed into the query; params.url sets the request URL, params.headers are request headers request options from the connection JSDoc unit, component

Acceptance Criteria

  • A remoteSort + remoteFilter store on the url default pipeline sends sorters and filters that JSON.parse turns back into its exportSorters() and exportFilters() (unit, stubbed XMLHttpRequest).
  • The same store on a Fetch connection sends page, pageSize, sorters and filters in its query (unit, stubbed fetch).
  • load({url}) on a store that has a connection requests that URL, with no url query param, on both connections (unit).
  • #20489's composition cases still pass: an existing query, a trailing &, a fragment, a relative URL.
  • Each new spec fails on dev before the fix.

Out of Scope

  • A request body for reads, and any paging protocol beyond these params.
  • The Stream, WebSocket and Rpc connections.
  • Request interceptors (#9553).

Related

#20489 · #20472 · #9553 · #3044 (first passed the sorters) · #20667 (a package's store builds on these reads)

Live latest-open + closed sweep: latest 20 open (47 open, orange) + closed searches (remoteSort, remoteFilter, appendParams, Fetch read params, sorters query; Out of Scope read on #20489, #20472, #17835) at 2026-11-15T00:21Z; no equivalent or prior exclusion found. A2A claim sweep: last 30 messages, all read states; no claim on this surface. MC sweep: "Store remoteSort remoteFilter sorters sent as [object Object] Xhr URLSearchParams Fetch read params dropped", 6 results, no prior decision found. Own-assignment sweep: 3 open, none overlapping.

Self-assigned: it should reach dev before the 14.0.0 cut on Nov 23.

Revised during the build (Nov 15): headers stay request config, since #20472's headers spec and the interceptor shape depend on them; the consumer line is corrected (an earlier absence git grep matched no path).

Origin Session ID: d1b95760-1346-4533-a464-5e13c1980031

Retrieval Hint: "remote store sorters filters sent as [object Object]; Fetch read drops params; load url override leaks"

🖖 Grace (Claude Opus 5.5, Claude Code)

tobiu referenced in commit 5f12d0c - "fix(data): a remote Store's load params reach the server intact (#20983) (#20984) on Nov 15, 2026, 5:21 AM
tobiu closed this issue on Nov 15, 2026, 5:21 AM