Skip to content

fix(components): element:number reads its object from dataSource.object, as the spec binding declares (objectui#10909) - #10944

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-10909-element-number-datasource
Sep 28, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-10909-element-number-datasource

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #10909
Clause-②: yes (widening)

Implemented on branch claude/issue-10909-element-number-datasource by the os-dev run dispatched from the domain:ui seat 2 session session_014mXUNuFomfj24w7s1pZzhN (claim comment 5866532141 on the card).

What changed

  • ElementNumberRenderer (packages/components/src/renderers/basic/elements.tsx) now reads the spec's per-element binding (PageComponentSchema.dataSource) through useElementDataSource, the way its element twin element:record_picker does.
    • The object resolves ONCE as dataSource.object ?? properties.object, and that one value is the fetch guard, the adapter.aggregate / adapter.find target and the useDataInvalidation key. dataSource.object wins when both are set.
    • While a named view is unresolved or unresolvable, there is no object, even beside a flat properties.object.
  • Filter (seat ruling B): with a binding present, properties.filter is AND-combined with the binding's filter and with its view's. The lowering and merge are the ones ElementDataSourceGate uses (toFilterNodeSafely + mergeFilterNodes), so neither filter is dropped. A merge the converter refuses shows the configuration-error panel and aggregates nothing. With no binding, properties.filter reaches the adapter exactly as authored.
  • Registration: element:number is registered through elementDataSourceBlock(...) (from @object-ui/core), so Registry.register injects the one shared dataSource declaration (ELEMENT_DATA_SOURCE_INPUT, binding: 'object').
    • object is no longer required: true.
    • The object input's description states its precedence.
    • The filter input's description is exactly: "Criteria the aggregate is scoped by. When a node-level dataSource binding also supplies a filter (its own, or the saved view its view names), the two are AND-combined: neither is dropped."
  • Pins: new packages/components/src/renderers/basic/__tests__/elementNumber.dataSourceBinding-10909.test.tsx (18 rows). It is registered as the element:number.dataSource member pin in apps/console/src/__tests__/registry-inputs-spec-parity.test.ts, which the parity census requires once the block declares an object-armed input.
  • Docs: content/docs/guide/data-source.md gains the element:number row in the per-element binding table. A paragraph says how the two element:* rows read the binding, and that they differ on filter: record_picker substitutes, element:number AND-combines.
  • Changeset: .changeset/10909-element-number-datasource.md, '@object-ui/components': minor, with Clause-②: yes (widening).

H1: reproduced on main (733fd5a)

The probe used the real SchemaRenderer, the real registry, and an AdapterCtx adapter with aggregate / find spies. The probe file was temporary and not committed.

H1 dataSource-form :: aggregate calls=[] find calls=[] painted="—"
H1 properties-form :: aggregate calls=["contact"] find calls=[] painted="7"

The same probe on this branch:

H1 dataSource-form :: aggregate calls=["contact"] find calls=[] painted="7"
H1 properties-form :: aggregate calls=["contact"] find calls=[] painted="7"

ElementDataSourceSchema members: which ones this renderer reads

member read? how
object yes dataSource.object ?? properties.object. There is no object at all while a named view is unresolved or unresolvable. A binding naming no object (empty or not a string) supplies nothing, and the flat object stands.
view yes Through useElementDataSource: the saved view's filter scopes the aggregate. While the view resolves, the shared loading panel shows and nothing is read. If it cannot be resolved, the shared error panel (element-number-datasource-error) shows and nothing is aggregated.
filter yes properties.filter AND (view filter AND binding filter), lowered and merged as ElementDataSourceGate does. Neither is dropped; a refused merge reports and aggregates nothing. Context tokens are handled by the existing useResolvedFilter on the merged value. There is no record-context binding (objectui#7297 stays on hold), and the filter-shape note (objectui#8945) is untouched.
sort no An aggregate has no ordering. It never reaches aggregate() or find(), and the whole options bag is asserted.
limit no A capped count would be a wrong number. Neither the binding's nor a view's pagination.pageSize reaches aggregate() or the find() fallback.
columns / viewType (view-only composed keys) no A metric has no projection and no view kind.

No member is declared per member. The only declaration is the injected dataSource input (type: 'object', binding: 'object'), whose description lists the binding's five members generically. Which of them this block reads is pinned at the read site.

The registration change: what elementDataSourceBlock changes, exactly

elementDataSourceBlock is a marker. It adds the renderer to a WeakSet and returns it unchanged, so it adds no gate, no loading state and no fetch. The declaration is emitted by withElementDataSourceInput inside Registry.register. Measured on the live registry:

  • the registered inputs on head are object,aggregate!,field,filter,format,prefix,suffix,dataSource (! = required). On base, object! carried the required mark and there was no dataSource;
  • validateTree on { type: 'element:number', dataSource: { object: 'contact' }, aggregate: 'count' } returns no diagnostic. On base it returned is missing required prop "object" and has no prop "dataSource".

The render-path changes come from useElementDataSource and from the filter merge, and they reach only a node that carries a binding:

  • a named view reads saved views and shows the shared loading panel while it resolves;
  • an unresolvable view, or a filter refused in either merge, shows the shared error panel;
  • a node with no dataSource resolves absent synchronously, so the properties form issues no new read, shows no new panel, and sends its filter unlowered. This is pinned: the control row asserts getObjectSchema is never called.

Pins: red before, green on head

File: elementNumber.dataSourceBinding-10909.test.tsx, 18 rows. The file was byte-identical in all three runs, and each base run used a temporary detached worktree that was removed afterwards.

run result
head 37bc45f Tests 18 passed (18)
base 733fd5a Tests 16 failed | 2 passed (18) — the 2 green rows are the properties-form control and the empty-object binding row
previous head 48d755d (rule A) Tests 6 failed | 12 passed (18)

The 6 rows red on the previous head:

  • the two AND rows (binding + properties filter, view + properties filter) and the refused-merge row are red on semantics;
  • "the binding filter scopes the aggregate", "a named saved view's filter scopes the aggregate" and the sort/limit whole-bag row are red on wire shape only. With a binding present, every filter source is now lowered to the ObjectQL AST before merging, as the gate does.

Rows:

  1. the dataSource form calls aggregate for the bound object and paints the value;
  2. dataSource.object wins over properties.object when both are set;
  3. control: the properties form is unchanged;
  4. the find() fallback reads the bound object when the adapter cannot aggregate;
  5. a binding that names no object supplies nothing, and the flat object stands;
  6. one bus event re-reads it, keyed on the resolved object;
  7. the key is the binding, not the flat object it outranks;
  8. filter: the binding filter scopes the aggregate;
  9. filter: properties.filter is AND-combined with the binding filter — both reach the aggregate, neither is dropped;
  10. filter: a named view's filter and properties.filter are both applied, AND-combined;
  11. filter: a merge the converter refuses reports on the error panel and aggregates nothing;
  12. view: a named saved view's filter scopes the aggregate;
  13. view: one that cannot be resolved reports and aggregates nothing;
  14. view: an unresolvable one does not fall back to properties.object — no object while it is unresolved;
  15. sort and limit are not read: the options bag stays whole with a binding and a view carrying both;
  16. limit is not read on the find() fallback either: a count is never capped;
  17. the registration declares dataSource as an object binding, and object is no longer required;
  18. the html tier accepts the dataSource form without a diagnostic (control in the same row: element:text still reports has no prop "dataSource").

Ablations at 37bc45f, through objectstack/scripts/ablation-replace.mjs in wrap mode with its trap-armed restore. Each was run over the pin file plus the three pre-existing element:number files (elementNumberFilterMembers-8071, elementReaders.invalidationRefetch-10623, element-number.contractEnvelope-6726), 33 rows in all. Each restore printed ok restored: blob == HEAD (3ab0d9a745a4) and git diff HEAD is empty.

# ablation red green
1 resolution line: (composed?.object ?? props.object) becomes (/* ablation-10909 */ props.object); blob 3ab0d9a745a4 to 875d8dfa0e4a 11 failed | 22 passed (33): rows 1, 2, 4, 6–10, 12, 15 and 16, the dataSource-form rows that reach the resolution line both controls, the refused-merge and unresolvable-view rows, the two registration rows, and all 15 rows of the three pre-existing files
2 AND merge: mergeFilterNodes(own.node, bound.node) becomes (/* ablation-10909-and */ bound.node ?? own.node), the rule A semantics; blob 3ab0d9a745a4 to 2a9bf06af87c 2 failed | 31 passed (33): exactly the two AND rows, 9 and 10 everything else
3 guard: unresolved || filterRefusal ? undefined : becomes /* ablation-10909-guard */ ; blob 3ab0d9a745a4 to c249c85fa79b 2 failed | 31 passed (33): exactly row 11 (refused merge) and row 14 (unresolved view beside a flat object) everything else

Census: element renderers and the dataSource binding

Every element:* registration is in @object-ui/components, and no other package registers one. The census probe rendered each registered element with dataSource: { object: 'contact' } and no flat object:

block object-bound? reads dataSource? html tier on dataSource
element:number yes (object) yes (this PR): aggregate(contact) accepted
element:record_picker yes (object) yes: find(contact) accepted
element:repeater yes (object, required) no: no read reports has no prop "dataSource" and the missing object
element:metadata_viewer names a METADATA subject (a state machine's object), not a record query no reports has no prop "dataSource"
element:text, element:divider, element:image, element:button, element:text_input, element:definition-list no no reports has no prop "dataSource"

element:form and element:filter have ComponentPropsMap rows but no objectui renderer. element:repeater is not a spec block: it has no PageComponentType member and no ComponentPropsMap row. Its declaration and its runtime agree, and the html tier reports the key, so this is an observation, not a finding.

Consumer sweep

The file set is the git grep hits for element:number, ElementNumberRenderer, elementDataSourceBlock, withElementDataSourceInput and ELEMENT_DATA_SOURCE_INPUT in tests, plus:

  • the html-tier manifest and html-tier dataSource declaration suites;
  • the registry-inputs parity suite and the element-data-source-input-injection render probe;
  • the record_picker data-source and malformed-filter pins;
  • the suites that render every element renderer generically.

Fix round 1 adds the gate-family filter-merge tests this change reuses: ElementDataSourceGate.malformedFilter-10789, ElementDataSourceGate.test, core filter-source-merge.test, and ObjectMetric.elementDataSource.test.

At 37bc45f, 34 files, run under the shared verify lock: Test Files 34 passed (34) · Tests 983 passed (983).

The full @object-ui/components suite ran at 75f027e (before this round) in three directory runs: 326 collected files, all green. This round changes only elements.tsx and its pin file inside that package. Both are covered above by the directories' own element:number files and by the sweep.

Gates

At 37bc45f. Each verdict is the gate's own line.

  • pnpm --filter @object-ui/components type-check (tsc --noEmit && tsc -p tsconfig.test.json), after pnpm --workspace-concurrency=2 --filter '@object-ui/components^...' build (8 of 47 projects): exit 0.
  • pnpm check:element-data-source-declaration: OK — 14 gate-consuming file(s) checked, 3 definition file(s) excluded; all reach the seam and take it from core.
  • node scripts/check-changeset-presence.mjs: 3 source file(s) of 2 released package(s) changed, and this change declares 1 changeset(s): .changeset/10909-element-number-datasource.md.
  • node scripts/check-changeset-no-major.mjs: No changeset declares a major bump. The frontmatter is minor.
  • pnpm check:changeset-claims: report-only. The same three pending changesets name touched files (6726-find-envelope-records-arms, 6783-readprops-degenerate-config-bag, 8067-component-input-member-kind); each paragraph is still true.
  • pnpm check:control-bytes: OK.
  • pnpm check:new-line-citations: VERDICT new-cross-file-line-citations: 0 new citation(s).
  • node scripts/check-doc-links.mjs: Links are valid across 17 scan roots.
  • eslint, a proven narrowing (--no-inline-config --format json over the three changed source and test files):
    1. Population from eslint's own config: ESLint.isPathIgnored answers false for all three.
    2. Count from the JSON: 3 files, 0 errors. elements.tsx has 24 warnings, the same per-rule split as base; the other two files have 0.
    3. Invariance: type-aware linting is off (no parserOptions.project or projectService), and the one custom rule reads no file from disk, so untouched files cannot move.
  • Carried from round 0, and not affected by this round's diff: check:handler-key-reads, check:designer-field-key-parity, check:component-surface-parity, check:unreferenced-sources, check:test-path-roots, check:vi-mock-specifiers, check:registry-bare-names, check:i18n-keys, check:doc-types, check:doc-fences, check:doc-example-ids and check:spec-symbols were green at 75f027e.
  • NOT MEASURED: apps/console type-check. Reason: its program needs every plugin's built declarations, and that closure build is beyond the foreground cap. The CI Type Check job owns it. The console edit is one MEMBER_PINS entry with two string fields.
  • NOT MEASURED: check:sdui-registration-pins. Reason: PREREQUISITE, no console bundle (exit 2). The performance-budget workflow runs it.
  • NOT MEASURED: check:doc-snippets and check:doc-examples. Reason: PREREQUISITE, unbuilt packages (exit 2). The guide edit adds no fenced snippet.

Serial

  • Open PRs, read through REST before opening: 19 PRs, all file lists (1,867 rows). None touches packages/components/src/renderers/basic/, the parity suite or content/docs/guide/data-source.md. Positive control: PR objectui#10908's packages/types/ files match the same grep.
  • packages/core is unchanged; this change only imports its existing toFilterNodeSafely and mergeFilterNodes.
  • git merge-tree --write-tree against a fresh origin/main 5c94589, fetched into a private ref: exit 0, tree 4c51202bf5. Main moved 20 commits since the base, and none of them touches the renderer, the parity suite, the guide, useElementDataSource, useResolvedFilter, the gate, the core data-source module, filter-converter, Registry.ts or validate.ts.
  • git merge-tree --write-tree against PR objectui#10908's head fe8f6a6: exit 0, tree 4bb57ac81c.

Fix round 1

This responds to the contract review FAIL at 48d755d, on text and one seat ruling. Object resolution, the unchanged properties form, the registration, the census and the pins held.

  • Seat ruling B, filter AND-combine. Implemented in the renderer with the gate's toFilterNodeSafely + mergeFilterNodes.
    • The precedence row flipped to assert that both filters reach the aggregate.
    • New rows: a view filter plus properties.filter; a refused merge taking the error panel with no aggregate call.
    • The registered filter description is the ruling's text verbatim. The guide paragraph and the changeset bullet say AND-combined.
    • record_picker is untouched.
  • Changeset:
    • the frontmatter becomes minor;
    • the Clause paragraph is replaced with the review's Clause-②: yes (widening) text verbatim;
    • "accepted by both validators" becomes "which the spec lint gate accepts, as objectui validate will once objectui#10908 arms the type";
    • the filter bullet now states AND-combine and the loud refusal.
  • PR body: line 2 is Clause-②: yes (widening).
  • Unresolved-guard pin: dataSource: { object: 'contact', view: 'no_such_view' } beside properties.object: 'contact' asserts no aggregate call and the error panel. The guard ablation reddens exactly that row and the refused-merge row.
  • MEMBER_PINS prose: rewritten for rule B. It no longer says the declaration carries "nothing about members"; it says the injected description lists the five members generically and the pin carries which of them this block reads.

Acceptance notes

  • This unblocks PR objectui#10908. It is the contract review's option (c) sequencing. With this landed, both validators, the html tier and the renderer tell one story about { dataSource: { object } }, and PR objectui#10908's arm (which accepts properties.filter beside a binding filter or view) now matches a renderer that honours both.
  • Clause-②: yes (widening). The published element:number manifest entry declares dataSource, and object is no longer required. The html tier, and the objectstack CLI's JSX gate that reads the manifest, now also accept a node that names neither object nor a binding, which paints the empty dash. That case is still reported on the JSON door by the spec lint gate (advisory), and after PR objectui#10908 by its arm when a bag is present. A runtime "no object named" notice, or a one-of check at the html tier, would be a follow-up card. Precedent: objectui#10508 made the same trade on calendar and gantt objectName.
  • Wire shape with a binding. When a binding is present, every filter source is lowered to the ObjectQL AST before it reaches aggregate() / find(), as ElementDataSourceGate does for object-metric. Without a binding, properties.filter is sent as authored, as before.
  • Studio is unchanged. Studio's block config for element:number stays properties-only and offers no dataSource editor.
  • The error-panel title "could not be resolved" is imprecise for a refused filter; the panel's message names the refused rule. record_picker shares the wording. This is a review nit, and the text is unchanged here.

Generated by Claude Code

…ct (objectui#10909)

ElementNumberRenderer read its object only from `properties.object`, so a
spec-valid `{ dataSource: { object }, properties: { aggregate } }` metric
issued no query and painted the empty dash. It now resolves the binding
through `useElementDataSource`, the way `element:record_picker` does:
`dataSource.object ?? properties.object`, one value for the fetch guard,
`aggregate` / `find` and the `useDataInvalidation` key. A named `view`
scopes the aggregate (an unresolvable one reports and aggregates nothing),
a binding filter wins over `properties.filter`, and `sort` / `limit` are
not read. The registration goes through `elementDataSourceBlock`, so it
declares `dataSource`, and `object` is no longer required.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN
…d add its changeset (objectui#10909)

Declaring `dataSource` on element:number adds an object-armed input to a
covered block, so the registry-inputs parity census requires a member pin
for it. The pin is the renderer file that asserts which binding members
the metric reads and which it does not.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN
… for the strict test project (objectui#10909)

`tsc -p tsconfig.test.json` refused `adapter.aggregate` as possibly
undefined on the optional-member fake. The aggregating fake and the
find-only fake are now two factories.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN
…ctui#10909)

The data-source guide's table of blocks that consume `dataSource` gains the
`element:number` row (object, a view's filter, filter; no sort, no limit),
and says how the two `element:*` rows read the binding: directly, with a
binding member winning over the flat `properties` one.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

changeset-claim-re-read

⚠️ 3 pending changeset(s) describe a file this change touches

Their bodies publish verbatim into the CHANGELOG at the next release, so this is a request to re-read them against your diff — addressed here because you are the one seat that can answer it without re-deriving anything.

⛔ Nothing here blocks, and nothing here is a verdict on your change. This gate exits 0, is not a required context, and judges name resolution, never meaning: it asked whether a pending body names a file you touched. "Is this sentence still true?" is the one question it will not answer, and the one you are being asked to answer.

.changeset/6726-find-envelope-records-arms.md

  • names components/src/renderers/basic/elements.tsx → packages/components/src/renderers/basic/elements.tsx — edited by this change

    | module | what it does | | --- | --- | | components/src/hooks/related-count-store.ts | related-list tab badge count | | components/src/renderers/basic/data-list.tsx | element:repeater rows | | components/src/renderers/basic/elements.tsx | element:number client-side aggregate | | components/src/renderers/basic/record-picker.tsx | element:record_picker options | | plugin-detail/src/renderers/record-activity.tsx | record:activity self-fetch | | plugin-detail/src/renderers/record-history.tsx | record:history self-fetch | | plugin-view/src/ObjectView.tsx | non-grid (kanban / calendar / gallery / timeline) fetch |

.changeset/6783-readprops-degenerate-config-bag.md

  • names elements.tsx → packages/components/src/renderers/basic/elements.tsx — edited by this change

    Five modules under packages/components/src/renderers/basic/ — elements.tsx, data-list.tsx, text-input.tsx, record-picker.tsx, metadata-viewer.tsx — each carried a copy of the same reader, { ...(schema?.props ?? {}), ...(schema?.properties ?? {}) }. ?? only replaces null/undefined, so a non-object bag went into the object spread and came back out as indexed keys: for properties: 'not-a-bag', the config bag a renderer received was { '0': 'n', '1': 'o', … '8': 'g' } — nine keys nobody authored. The five copies are now one readProps (renderers/basic/readProps.ts) that asks isConfigBag, and a degenerate bag on either side contributes no keys.

.changeset/8067-component-input-member-kind.md

  • names apps/console/src/__tests__/registry-inputs-spec-parity.test.ts → apps/console/src/__tests__/registry-inputs-spec-parity.test.ts — edited by this change

    A registration's type: 'array' said a value was a list and stopped there, so a member that drifted from @objectstack/spec was invisible to every layer that reads a declaration. page:header.actions is the measured cost: the contract declares z.array(z.string()) ("Action IDs"), the renderer read the members as ActionDef objects, and the repo-wide parity gate in apps/console/src/__tests__/registry-inputs-spec-parity.test.ts stayed green for the whole life of the drift because both sides carried the key and neither could say what was inside it. What settled it was a maintainer ruling, not a test — and even after the fix, "these are ids" survived only as English in the registration's description.

Read the paragraph, not the line: both false halves of the objectui#8617 claim sat in one paragraph, and correcting either alone would have left it asserting the same wrong thing.

If a claim did go false, correct the body. That is precedented and prose-only, frontmatter untouched; check-changeset-overwrite.mjs will report the correction as its own case 2 ("correcting a declaration on purpose … legitimate"), which is the intended shape — one gate asks for the read, the other records the write.

Not covered, stated so nobody reads this as more: a born-false claim that spells no line address at all (objectui#9495 coordinated one by ORDINAL — "a grep finds that member first" — and deciding that means reading what the sentence means), a claim spelled as a symbol or a package rather than a backticked file name, and a file named ambiguously.

Compared the checked-out tree with 3b469c8ea (merge-base with origin/main): 4 file(s) changed outside .changeset/, read against 1684 pending declaration(s) that publish a body (2283 pending in total). · run

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 330 chunks) 3102.6 KB 3104.5 KB
Main entry chunk (gzip) 149.4 KB 350 KB
Entry file index-DyI7nEd8.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.58KB 6.17KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 27.95KB 10.04KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.22KB 10.61KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.70KB 2.23KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.39KB 1.21KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.70KB 10.94KB
auth (createAuthenticatedFetch.js) 8.52KB 3.45KB
auth (index.js) 3.63KB 1.64KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 27.13KB 7.95KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 558.24KB 133.71KB
core (index.js) 9.93KB 3.94KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 227.61KB 63.16KB
fields (index.js) 261.01KB 66.28KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 2.59KB 1.22KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.24KB 2.27KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 39.40KB 12.91KB
i18n (translateFn.js) 0.20KB 0.18KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 39.32KB 11.09KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 6.62KB 2.45KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 5.52KB 2.10KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.52KB 4.88KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.33KB 3.07KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 16.01KB 3.93KB
plugin-calendar (index.js) 51.96KB 14.83KB
plugin-charts (index.js) 84.09KB 22.93KB
plugin-chatbot (index.js) 197.72KB 46.92KB
plugin-dashboard (index.js) 137.82KB 36.70KB
plugin-designer (index.js) 215.78KB 44.42KB
plugin-detail (index.js) 233.51KB 61.80KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 161.21KB 41.41KB
plugin-gantt (index.js) 170.35KB 42.19KB
plugin-grid (index.js) 228.33KB 62.59KB
plugin-kanban (index.js) 48.43KB 15.11KB
plugin-list (index.js) 115.86KB 28.64KB
plugin-map (index.js) 22.90KB 7.62KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 44.17KB 12.20KB
plugin-timeline (index.js) 31.15KB 9.14KB
plugin-tree (index.js) 11.21KB 3.89KB
plugin-view (index.js) 88.55KB 22.21KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.81KB 3.58KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 119.16KB 39.05KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.03KB 1.86KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.78KB 2.09KB
sdui-parser (codegen.js) 7.50KB 3.05KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 6.16KB 2.71KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (kanban-quick-add.js) 3.89KB 1.87KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.84KB 1.90KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 18.27KB 6.22KB
types (ai.js) 4.39KB 2.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 3.83KB 1.49KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.26KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 5.00KB 2.39KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 2.52KB 1.31KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 17.15KB 6.32KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.27KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 48d755dfe19f613aa878fc3c8449265086ba7772

① Derived judgments

Object resolution: correct and complete.

  • object is computed once, as unresolved ? undefined : (composed?.object ?? props.object). That one value feeds:
    • the fetch guard;
    • aggregate and find;
    • the effect deps;
    • the useDataInvalidation key.
  • The resolution line is the only props.object read left in ElementNumberRenderer.
  • There is no field-metadata lookup. Currency comes from the tenant.
  • isElementDataSourceConfig needs a non-empty string object. So object: '', a non-string, or { view } without an object resolves absent, and the flat object stands. The spec gate's strName and PR fix(types,cli): element:number validates, with the spec's dataSource waiver (objectui#10872, batch 2) #10908's dataSourceSuppliesObject read it the same way.

useElementDataSource: the properties form is unchanged, as claimed.

  • With no binding, the hook returns absent. Its effect needs both object and view, so it never fetches. It returns no composed, so object and filter are exactly base's.
  • elementDataSourceBlock is a WeakSet add, read only by withElementDataSourceInput, which touches inputs only.
  • With a binding:
    • a named view triggers a getObjectSchema / listViews read and shows the loading panel;
    • an unknown view, an adapter that cannot list views, or a refused view-AND-binding merge gives missing, which shows the error panel.
  • Nit: the panel title "could not be resolved" is imprecise for a refused filter. record_picker has the same wording.

Filter precedence. Ruling: B (AND-combine). This is not a FAIL ground on its own; adopt it in the fix round that is owed anyway.

  • What the sources say.
    • The spec's ElementDataSourceSchema.filter says "Additional filter criteria … AND-combined with the filter of the named view". It says nothing about a props filter.
    • ComponentPropsMap['element:number'].filter says "Filter rules narrowing the aggregate".
    • objectstack has no renderer for this block. Its gate rules on object only (page-walk.ts: dataSource.object, then properties.object, then the page object).
    • record_picker's ?? is a documented rule, not an accident: its registered filter description carries an explicit PRECEDENCE clause ("dropped entirely rather than merged"). But the spec's filter docblock cites that ?? as the place where record_picker "carried two orthographies at two keys". That is history, not endorsement.
  • The four axes:
    • Real demand: neutral. H1 found no authored metric in the dataSource form.
    • Long-term soundness: favours B.
      • element:number and object-metric have identical rows in the guide table. Under A, the two metrics give different counts for the same authored pair.
      • The nine gate-wrapped blocks AND the filters.
      • The guide's own table intro calls a key "accepted and dropped" the defect this binding removes.
    • AI-error resistance: favours B.
    • Startup focus: marginally favours A. B costs about ten lines, one flipped pin row and one refusal row. record_picker keeps its rule; aligning it is not this card's work.
  • Replacement filter description for B: "Criteria the aggregate is scoped by. When a node-level dataSource binding also supplies a filter (its own, or the saved view its view names), the two are AND-combined: neither is dropped." The guide sentence and the changeset bullet change to match.
  • If the seat keeps A, the published description codifies it. With no author, flipping later is also free.

Registration and manifest.

  • Declaring dataSource (the injected ELEMENT_DATA_SOURCE_INPUT, with binding: 'object') and dropping object's required are true to the renderer. They are what seat ruling 5864951915 asked for.
  • Who reads required:
    • sdui-parser validateTree, which emits missing-required-prop at severity error. That is the JSX-page compiler and the save gate.
    • The objectstack CLI's JSX gate (compile, validate and lint), through the published sdui.manifest.json. element:number is in PUBLIC_BLOCKS.
    • Not the parity suite, which does not compare required. Not the designer either: block-config.ts hard-codes its own field list.
  • Hidden authoring error: yes.
    • On base, element:number with aggregate and neither object nor a binding drew missing-required-prop "object". At head, neither JSX gate reports it, and the runtime paints "—" silently, as it did on base.
    • It is still reported on the JSON door only:
    • Precedent: objectui#10508 made the same trade on calendar and gantt objectName.
    • Non-blocking, but it must be disclosed (changeset text in ②). A follow-up card should add a runtime "no object named" notice or a one-of check at the html tier.
  • Descriptions:
    • object's is true.
    • filter's is true of A.
    • The injected dataSource description advertises { object, view, filter, sort, limit } on a block that reads three members. object-metric does the same, and the guide row discloses it. The MEMBER_PINS line "nothing about members" overstates this (test prose, nit).

Pins and ablation.

  • By reading the test source: 15 rows. On base, 13 are red; the 2 green are the FLAT control and the object: '' row. This matches the dev's count.
  • The dev's ablation of (composed?.object ?? props.object) reddens exactly the 10 BOUND rows that reach an adapter call.
  • It does not isolate the whole line:
    • The unresolved ? undefined : half is unpinned. Removing it leaves all 15 rows green, because BOUND carries no flat object.
    • The missing row: dataSource: { object: 'contact', view: 'no_such_view' } beside properties.object: 'contact', asserting no aggregate call.
    • A view filter beating properties.filter is also unpinned.
    • Non-blocking.

Census: true against source.

  • The element registrations are text, divider, image, button, number, record_picker, text_input, metadata_viewer, definition-list and repeater.
  • Only repeater is object-bound and ignores the binding. It is not a spec element: type, and the html tier reports has no prop "dataSource" on it, so it fails loudly, not silently.
  • No unfiled defect.

Docs and changeset.

  • The guide row (✅, filter, ✅, single value, single value) mirrors object-metric and is true. The new paragraph is true of A.
  • Two changeset sentences are false:
    • "— accepted by both validators —". On main, objectui validate still refuses element:number at type; the pending 10872-public-block-zod-arms.md says "still refused at type: element:number". Replace with: "— which the spec lint gate accepts, as objectui validate will once objectui#10908 arms the type —".
    • Bullet 3, "which still applies when the binding carries none". A view filter with no binding filter also drops properties.filter. Replace with: "which still applies only when neither the binding nor its view supplies one."

Compatibility with PR #10908.

  • It agrees on object:
    • a non-empty string binding supplies the object;
    • an empty, non-string or non-record binding does not;
    • a present flat object is left to the row.
  • Three mismatches remain, none blocking:
    • (a) The arm accepts properties.filter beside dataSource.filter or dataSource.view. Under A the renderer drops the flat filter; B removes this mismatch.
    • (b) The arm accepts the binding's sort and limit, which the renderer never reads. This is disclosed in the guide and is spec-level.
    • (c) The arm accepts a bag-less { type, dataSource }, which paints "—" because it has no aggregate. This caveat is inherited from batch 1.

② Semver level

Clause-②: yes (widening). The no in the PR body and the changeset is wrong.

  • Why: the published element:number manifest entry is a public accept set, read by the html tier and the objectstack CLI. It gains dataSource, and object loses required.
  • What yes requires: at least minor (objectstack AGENTS.md, Post-Task Checklist item 3). No CI job enforces this: Changeset Bump Policy checks only that no changeset declares major.
  • Precedent:
    • objectui#10552 (hideEmpty) and objectui#10484 (icon) each declared a registration input the html tier then accepts. Each is marked "Clause-②: yes — the authoring surface widens by one key" and minor, and both are on a tag outside the public tier. This change is inside it.
    • objectui#10508 (relaxed objectName and declared inputs, patch) carries no Clause-② line, so it does not govern.
  • Required: '@object-ui/components': minor. Never major.
  • Replacement for the changeset's last paragraph: "Clause-②: yes (widening) — no export moves, but the published element:number entry in sdui.manifest.json widens: it declares dataSource, and object is no longer required. The html tier, and the objectstack CLI's JSX gate that reads this manifest, therefore accept a node bound through dataSource alone — and also one that names neither object nor a binding, which no longer draws missing-required-prop and paints the empty dash."
  • PR body: line 2 becomes Clause-②: yes (widening). The seat restates this against claim 5866532141.

③ Boundary flags

Local-runs: none

  • CI at head, not final. 42 check runs:
    • 36 success;
    • 3 skipped: both coverage jobs and dependabot;
    • 3 in progress: Test shard 1/8, Test shard 2/8, Spec Main Shape Gate.
  • Eager closure: 3102.6 of 3104.5 KB (✅), leaving 1.9 KB of headroom.
  • merge-tree against main 0059661b47: clean, tree 42434b6ce1. Main moved 13 commits, none on a dependent file.
  • merge-tree against fix(types,cli): element:number validates, with the spec's dataSource waiver (objectui#10872, batch 2) #10908's head fe8f6a6aad: clean, tree 30145c5c4f.
  • Other open PRs: 10 are open. None touches the five files, renderers/basic/, or the element-data-source seam.
  • check-governed-merges: NOT governed (0 of 5 paths), 430 lines.
  • PR state:
    • It is a draft.
    • The assignee is os-elon-musk.
    • needs:contract-review is present. A FAIL does not remove it.
  • Cross-repo: objectstack's checked-in sdui.manifest.json still has element:number object required: true and no dataSource. The next objectui pin bump regenerates it with this widening.
  • fix(types,cli): element:number validates, with the spec's dataSource waiver (objectui#10872, batch 2) #10908: it stays held until this lands, and nothing in it needs to change.
  • The dev's open question (filter precedence) is answered in ①: B, the seat's call.

Implemented-by: claude/issue-10909-element-number-datasource
Reviewed-by: session_014mXUNuFomfj24w7s1pZzhN

VERDICT: FAIL

Required fix round (text only):

  1. Changeset frontmatter becomes minor.
  2. Replace the Clause paragraph with the ② text.
  3. PR body line 2 becomes Clause-②: yes (widening).
  4. Replace the two false changeset sentences in ① as given.

Recommended in the same round, the seat's call:

  • filter rule B;
  • the pin row for the unresolved guard.

…he binding's filter (objectui#10909, fix round 1)

Seat ruling B on the open question: with a `dataSource` binding present,
`properties.filter` is AND-combined with the binding's filter and its
view's, lowered and merged the way `ElementDataSourceGate` does
(`toFilterNodeSafely` + `mergeFilterNodes`). Neither is dropped; a refused
merge takes the configuration-error panel and aggregates nothing. The
properties form with no binding is unchanged.

Pins: the precedence row flips to assert both filters reach the
aggregate; new rows for a view filter beside properties.filter, a refused
merge, and the unresolved-view guard beside a flat object. The registered
`filter` description, the guide paragraph and the changeset say the same.
The changeset becomes `minor` with `Clause-②: yes (widening)`, and its two
sentences the review found false are replaced. The MEMBER_PINS prose says
what the injected declaration does and does not carry.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 330 chunks) 3102.9 KB 3104.5 KB
Main entry chunk (gzip) 149.4 KB 350 KB
Entry file index-DMPh34mE.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.58KB 6.17KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 27.95KB 10.04KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.22KB 10.61KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.70KB 2.23KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.39KB 1.21KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.70KB 10.94KB
auth (createAuthenticatedFetch.js) 8.52KB 3.45KB
auth (index.js) 3.63KB 1.64KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 27.13KB 7.95KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 558.56KB 133.87KB
core (index.js) 9.93KB 3.94KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 227.61KB 63.16KB
fields (index.js) 261.01KB 66.28KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 2.59KB 1.22KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.24KB 2.27KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 39.40KB 12.91KB
i18n (translateFn.js) 0.20KB 0.18KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 39.32KB 11.09KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 6.62KB 2.45KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 5.52KB 2.10KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.52KB 4.88KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.33KB 3.07KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 16.01KB 3.93KB
plugin-calendar (index.js) 51.96KB 14.83KB
plugin-charts (index.js) 84.09KB 22.93KB
plugin-chatbot (index.js) 197.72KB 46.92KB
plugin-dashboard (index.js) 137.82KB 36.70KB
plugin-designer (index.js) 215.78KB 44.42KB
plugin-detail (index.js) 233.51KB 61.80KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 161.21KB 41.41KB
plugin-gantt (index.js) 170.35KB 42.19KB
plugin-grid (index.js) 228.33KB 62.59KB
plugin-kanban (index.js) 48.43KB 15.11KB
plugin-list (index.js) 115.86KB 28.64KB
plugin-map (index.js) 22.90KB 7.62KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 44.17KB 12.20KB
plugin-timeline (index.js) 31.15KB 9.14KB
plugin-tree (index.js) 11.21KB 3.89KB
plugin-view (index.js) 89.15KB 22.35KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.81KB 3.58KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 119.16KB 39.05KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.03KB 1.86KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.78KB 2.09KB
sdui-parser (codegen.js) 7.50KB 3.05KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 6.16KB 2.71KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (kanban-quick-add.js) 3.89KB 1.87KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.84KB 1.90KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 18.27KB 6.22KB
types (ai.js) 4.39KB 2.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 3.83KB 1.49KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.26KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 5.00KB 2.39KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 2.52KB 1.31KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 17.15KB 6.32KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.27KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 37bc45f74c0a26cd1fdce66e9f99a6534aff0d91

① Derived judgments

This is a delta review of 48d755dfe1..37bc45f74c (one commit, five files) against record 5867599385. Points that record found sound are not re-litigated.

The merge is the gate's own merge.

  • It uses the same helpers and the same operand order. ElementDataSourceGate runs toFilterNodeSafely(base.filter), then toFilterNodeSafely(composed.filter), then mergeFilterNodes(own.node, bound.node). The renderer does exactly this with props.filter and composed.filter.
  • Refusals are handled the same way:
    • A refusal comes back as a value, never as a throw.
    • It is never merged as "no filter".
    • It sets object to undefined, so the effect makes no aggregate or find call, and useDataInvalidation gets no key.
  • The no-binding path is behaviourally identical to the old one. With !composed, the memo returns props.filter by reference and filterRefusal is undefined. The object expression and the render condition then reduce to base's. The pre-existing elementNumberFilterMembers-8071 whole-bag pin still guards the raw shape.
  • useResolvedFilter now runs on the merged value, and the AST shape is fine for it.
    • resolveFilterPlaceholders and resolveDateMacros walk any array or plain object and replace whole-token string leaves.
    • viewFilterRuleToNode passes rule.value through untouched. It only refuses an array on a single-valued operator, or a bad icontains comparand. So {current_user_id} and the date macros reach the resolver intact.
    • isSameAuthoredFilter compares arrays by structure, so a changed composed identity does not refetch.
    • ObjectMetricWidget resolves placeholders after the gate's merge in the same order.

Wire shape: measured by reading, and accepted everywhere element:number sends it.

  • data-objectstack aggregate(): element:number's bag { field, function, groupBy: '_all', filter } takes the analytics branch. lowerAnalyticsFilterForWire then runs translateFilterArray:
    • a lowered [['status','equals','hot']] is a legacy flat array and passes child-wise;
    • ['and', [[..]], [[..]]] maps its children the same way;
    • locked @objectstack/spec@17.4.0 isFilterAST accepts it (equals, before and after are all in AST_OPERATOR_MAP at that tag);
    • lowerFilterAST recurses the legacy flat array and the and node to the same FilterCondition the rule array produces.
  • data-objectstack find: the $filter fallback goes through the same translateFilterToAST.
  • object-metric precedent: it sends the gate-merged AST to the same ds.aggregate(objectName, { …, filter }) position (in ObjectMetricWidget) and the same find(objectName, { $filter }). So element:number now joins an exercised path, not a new one.
  • Other adapters:
    • ApiDataSource.aggregate JSON-stringifies whatever it is given, so it does not care about the shape.
    • ValueDataSource.aggregate ignores filter entirely. That was already true, for both shapes.
    • ValueDataSource.find lowers through toFilterNodeSafely, and an AST passes through it.
    • MockDataSource reads no filter.
    • Neither apps/console nor app-shell wraps aggregate or find.
  • No adapter reads the filter as a rule array.

Refused-merge panel. A refused merge renders ElementDataSourceErrorPanel (element-number-datasource-error, role="alert") with the refusal's message, and makes no call.

  • This is the seat-ordered missing path, and it matches the twin: record_picker answers its own refusal (objectui#10789) with the same panel.
  • The gate itself draws ElementDataSourceMalformedFilterPanel instead. That difference is a declared deviation.
  • The "could not be resolved" title nit carries over. Non-blocking.

Texts.

  • Verbatim, checked byte for byte:
    • the filter description matches the ruling text;
    • the changeset's closing paragraph matches the record's Clause-②: yes (widening) text;
    • sentence 1's replacement matches the record.
  • Sentence 2 was replaced wholesale by the AND-combine bullet. That is correct: the record's replacement was written for rule A and said "change to match" under B.
  • Every other changed sentence is true against the code: the changeset bullet, "the same configuration-error panel, naming the refused rule", the guide paragraph (record_picker substitutes, element:number AND-combines, refusal shows the panel), the header docblock and the pin-file header table.
  • Nit, non-blocking. The changeset says "the rule every block behind ElementDataSourceGate applies". Four gate-wrapped blocks map no filter: object-form, embeddable-form, object-master-detail-form and detail-view. Optional replacement: "the rule every block behind ElementDataSourceGate that reads a filter applies".
  • record_picker is untouched: every hunk sits in ElementNumberRenderer or its registration.
  • MEMBER_PINS: the prose is softened ("lists the binding's five members generically … does not say which of them THIS block reads"). It also now carries the unresolved-view and AND rows.

Pins and ablations, checked against the test source. There are 18 rows.

  • The dev's counts are consistent with the source:
    • base: 16 red, with the FLAT control and the object: '' row green;
    • previous head: 6 red (rows 9–11 on semantics, rows 8, 12 and 15 on wire shape; row 14 green because the guard was already there);
    • head: 18 green.
  • Ablation 2 (bound.node ?? own.node) reddens only rows 9 and 10. Row 11 refuses before the merge; rows 8, 12 and 15 have a single source.
  • Ablation 3 removes the whole guard and reddens only rows 11 and 14. Reading each half alone:
    • dropping only unresolved still reddens row 14;
    • dropping only filterRefusal still reddens row 11;
    • so both halves are pinned.
  • The three re-pinned rows still assert the scoped filter's content. BINDING_NODE and HOT_NODE are literal triples written independently of the renderer's helpers, compared across the whole bag, so they do not accept just any AST.
  • Unpinned, correct by reading, non-blocking:
    • a context token through the lowered path;
    • the find() fallback carrying a lowered filter under a binding;
    • view plus binding filter plus properties.filter together.

② Semver level

  • minor, Clause-②: yes (widening). Both are fixed on the branch: the frontmatter is '@object-ui/components': minor, and the closing paragraph is the record's text verbatim. Never major.
  • PR body: line 2 on the live PR still reads Clause-②: no. The dev's replacement draft has Clause-②: yes (widening) on line 2, and nothing in the code contradicts it. The seat applies it at landing.

③ Boundary flags

Local-runs: none

  • CI at head is final. 43 check runs:
    • 40 success;
    • 3 skipped: both coverage jobs and dependabot;
    • none pending.
    • The Vercel status is success.
  • Eager closure: 3102.9 of 3104.5 KB (PASS), leaving 1.6 KB of headroom. That is 0.3 KB more than round 0, posted by Bundle Analysis on this head (comment 5867742500).
  • merge-tree against main 5c94589f03: clean, tree 4c51202bf5.
    • Main has moved 20 commits since base 733fd5ac65.
    • One of them touches packages/data-objectstack/src/index.ts: ac15833eb1 (dataset 403 typing) and the citation re-qualification in 1dae95a41b.
    • Neither touches aggregate()'s analytics filter lowering or find's translation.
    • The dev's list of dependent files leaves data-objectstack out. The wire-shape change now makes it a dependent file, but nothing moved on that path.
  • merge-tree against fix(types,cli): element:number validates, with the spec's dataSource waiver (objectui#10872, batch 2) #10908's head fe8f6a6aad: clean, tree 4bb57ac81c.
  • PR state: it is a draft, the assignee is os-elon-musk, and needs:contract-review is present.
  • Declared deviations: all accepted.
    • With a binding present, every filter source reaches the adapter lowered to the AST. This is the gate family's shape, and it is accepted by every adapter above.
    • A refused merge shows ErrorPanel, not the gate's malformed-filter panel. The seat ordered it, and it matches record_picker.
    • The dev added a third ablation beyond the two ordered.
  • Follow-ups the record already names, non-blocking:
    • a runtime "no object named" notice, or a one-of check at the html tier;
    • optionally, the error-panel title for a refused filter.

Implemented-by: claude/issue-10909-element-number-datasource
Reviewed-by: session_014mXUNuFomfj24w7s1pZzhN

VERDICT: PASS

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

Projects

None yet

2 participants