Skip to content

examples: the showcase renewals react page passes top: 500 to adapter.find, which is not a query option — the rollup silently reads only the first page #10288

Description

@os-elon

Found while verifying useAdapter samples for the new react-pages guide (#10210).
Filing rather than fixing — examples/** is outside that card's file surface, and the
page is the golden example the react-tier dogfood audit points at, so a copy-paste from
it propagates.

The call

examples/app-showcase/src/ui/pages/renewals-pipeline.page.ts, inside the hand-rolled
rollup effect:

constpr=awaitadapter.find('showcase_project',{$filter: ['account','=',sel],top: 500});constiv=awaitadapter.find('showcase_invoice',{$filter: ['account','=',sel],top: 500});

$filter is right. top is not a query option — the key is $top.

Evidence

QueryParams (objectui packages/types/src/data.ts) declares $select, $filter,
$orderby, $skip, $top, $expand, $search, $count — all $-prefixed, "follows
OData/REST conventions". The adapter a react page actually receives,
ObjectStackAdapter (objectui packages/data-objectstack/src/index.ts), reads the
prefixed spelling and nothing else:

if(params.$top!==undefined){queryParams.set('top',String(params.$top));}

An unprefixed top reaches no branch. It is dropped without a warning, so the two
queries return the backend's default page size instead of up to 500 rows.

The visible consequence

The KPI strip this effect feeds — "Projects", "Invoices", "Open AR" — is computed as
records.length over the returned array. Any account with more related records than the
default page size shows a silently capped count that reads as a real number. There is
no error, and the framework-block half of the same panel (ObjectChart / ListView,
deliberately shown side by side as the declarative counterpart) is unaffected, so the two
halves of the comparison disagree for exactly the accounts where the comparison is most
interesting.

Fix

top: 500$top: 500 in both calls. Two characters; no other change.

Why it is worth a card

The page's docstring presents the hand-rolled branch as the teaching example of "you own
the queries, loading, and refresh". It is also the page
docs/audits/2026-06-react-tier-authoring-dogfood.md names as "the golden, validated
example", and os validate cannot catch this — the react prop checker deliberately
reads only static literals of block props, not useAdapter call arguments, so the page
validates clean today (confirmed: os validate on the showcase app exits 0).

Related audit staleness filed separately as #10284.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions