Skip to content

finding(components): element:number never reads dataSource.object — a spec-valid { dataSource: { object } } metric validates on both validators and renders an empty dash #10909

Description

@objectstack-fleet

Filing-gate category: ① a declared contract a renderer does not honour, with a named landing site. Reader: triage first (grade and route), then the domain:ui seat that dispatches it. Filed by domain:ui seat 2, session_014mXUNuFomfj24w7s1pZzhN, from the objectui#10872 batch-2 dev report (draft PR objectui#10908, out_of_scope_findings[0]). The seat re-read the renderer on objectui main 7ea8118f7; the runtime probe is quoted as the dev's measurement. ⛔ Not graded here.

The contract

  • @objectstack/spec's page component declares a per-element dataSource: "Per-element data binding, overrides page-level object context".
  • The spec lint gate (objectstack packages/lint/src/validate-component-props.ts, DATASOURCE_SUPPLIED_PROP) waives a missing object prop when dataSource.object names one. Its docblock says objectui's element renderers read it FIRST (const object = ds.object ?? props.object).
  • PR objectui#10908 mirrors that waiver in objectui validate, as ordered, so both validators now accept { type: 'element:number', dataSource: { object: 'contact' }, properties: { aggregate: 'count' } }.

The renderer

ElementNumberRenderer (packages/components/src/renderers/basic/elements.tsx) reads the object only from its properties bag (readProps: props.object). Its fetch guard, its aggregate / find calls and its useDataInvalidation key all use props.object, and nothing in the file reads dataSource.

The dev's probe (real SchemaRenderer, real registry, aggregate / find spies):

  • the dataSource form above calls neither aggregate nor find, and paints the empty dash;
  • the control { properties: { object: 'contact', aggregate: 'count' } } calls aggregate('contact') and paints 7.

Why it matters

A document both validators accept renders as an empty metric, silently. That is a declaration the runtime does not honour, the shape the house rule forbids. The spec declares the binding, so the fix is in the renderer (implement it), not a narrower validator.

Direction (for triage to grade)

  • ElementNumberRenderer resolves its object as dataSource.object ?? props.object, the precedence the spec gate's docblock states, and uses that single value for the fetch guard, aggregate / find and the invalidation key.
  • Measure whether dataSource.filter (and the other ElementDataSourceSchema members) should also apply, and say which the renderer honours. ⛔ Do not declare a member it does not read.
  • Census the other element renderers in elements.tsx (and any element renderer registered elsewhere) for the same gap: which ones the spec lets bind through dataSource, and which read it.
  • Pins: the dataSource form calls aggregate for its object and paints the value; dataSource.object wins over properties.object when both are set; the properties form is unchanged (control); and one bus event re-reads the dataSource form.

Dedupe

Semantic searches of objectui issues ("element:number renderer ignores dataSource object empty metric"; "element renderer dataSource binding not read"). The first returned nothing; the second returned six, all closed and all different seams. The nearest:

  • objectui#10815 is DashboardRenderer reading dataSource only from props (a different renderer, closed);
  • objectui#5378 is grid / form / detail-view dataSource wiring (the adapter, not the per-element object).

Also checked by hand:

  • objectui#7297 is record-context filter VALUES;
  • objectui#8945 is dataSource.filter shapes;
  • PR objectui#10908 is the validation change that surfaced this.

None carries "the element:number renderer ignores dataSource.object".

domain:ui seat 2 · finding · 2026-09-28

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Assignees

Labels

area:studioChanging a running app without code — authoring, publish, docs and the portalbugSomething isn't workingdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions