Uh oh!
There was an error while loading. Please reload this page.
ReportView reads only the declared dataSource.object key - #5488
Merged
Conversation
…` key
`ReportView` accepted `resource` as a second spelling of `object` on a
report's `dataSource` binding, in two places, and NAMED that spelling in a
user-facing warning:
:171 liveReport?.objectName || liveReport?.dataSource?.object
|| liveReport?.dataSource?.resource
:273 dataFetchSource.dataSource.object || dataFetchSource.dataSource.resource
:275 console.warn('ReportView: dataSource missing object/resource property')
`resource` is not on this contract. `ElementDataSourceConfig` declares
`object` / `view?` / `filter?` / `sort?` / `limit?`, its spec twin
`ElementDataSourceSchema` is a strict object (an extra `resource` key is
rejected, not ignored), and `isElementDataSourceConfig` decides on `object` —
so a `resource`-only binding was never a binding anywhere else. `resource` is
a real key on OTHER surfaces (`CRUDSchema.resource`, the `DataSource` adapter's
first parameter, `LiveExportOptions.resource`); none of them is this one.
Per AGENTS.md #0.1 an off-spec spelling is fixed at the producer, never as a
renderer-side alias — and a producer census found nothing to fix: no site in
this repo or in the `objectstack` framework repo writes `resource` onto a
report `dataSource`. The limb was speculative in the commit that added it.
Measured by rendering, per input shape (before -> after):
object only queries `acct` -> queries `acct` (unchanged)
resource only queries `acct` -> not queried, warns (REMOVED)
object+resource queries `acct` -> queries `acct` (unchanged)
neither not queried -> not queried, warns (unchanged)
A `resource`-only binding now fails loudly (named warning, empty rows,
fallback field list) instead of rendering off-spec metadata as if it were
valid. The `:275` wording names only `object`, so the diagnostic no longer
promises a key the contract does not declare.
The local `resource` variable at the fetch site is renamed `objectName` — it
was the last in-code echo of the non-contract spelling at the very line being
fixed, and an open invitation to re-add the alias. The adapter's own parameter
is still called `resource`; a comment records where the two vocabularies meet.
Fixes#5116
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkEBehaviour removal, declared honestly: a `resource`-only report binding used to render and now does not. Marked `minor` per AGENTS.md (objectui's own breaking semantics never take `major` — that would drag the whole fixed group off the `@objectstack` major it tracks); the breaking semantics are spelled out in the changeset body along with the per-shape before/after table. Part of #5116 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
`tsc -p tsconfig.test.json` rejected three spots in the new pin: an untyped `vi.fn()` gave `mock.calls` an empty tuple type, so reading the captured first argument was both an impossible cast and an out-of-range index, and the warn spy's callback parameter was implicitly `any`. The spy now declares the real `DataSource.find(objectName, params)` signature, which makes the captured argument a `string` with no cast at all — the assertion reads the query the way the adapter would receive it. Part of #5116 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
Contributor
✅ Console Performance Budget
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
Size Limits
|
os-support-ai
marked this pull request as ready for review
August 21, 2026 03:27
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#5116
ReportViewacceptedresourceas a second spelling ofobjecton a report'sdataSourcebinding, in two places, and named that spelling in a warning the user could read:resourceis not on this contract.ElementDataSourceConfigdeclaresobject/view?/filter?/sort?/limit?; its spec twinElementDataSourceSchemais a strict object, so an extraresourcekey is rejected there rather than ignored; and the binding's predicateisElementDataSourceConfigdecides onobject. Aresource-only binding was therefore never a binding on any other renderer — it rendered here and silently produced nothing everywhere else, with neither end reporting a problem.resourceis a real key on other surfaces —CRUDSchema.resource, theDataSourceadapter's first parameter,LiveExportOptions.resource— all three untouched. None of them is this one.Per AGENTS.md #0.1 an off-spec spelling is corrected at the producer, never taught a second dialect by the renderer.
Producer census (premise-first), with counter-probe
Triage asked this be re-verified on current
mainbefore deleting: if any producer or authored site suppliesresourceon this binding, the card becomes a migration, not a tolerance deletion. Result: zero producers.dataSourceblock containingresourceobjectinsteadThe counter-probe is what makes the zero a reading rather than a broken search: the identical multiline pattern finds 182 + 15 sites for the key that is produced.
Authored corpora were searched too, not just source — docs (
content/docs/**),skills/**, examples, fixtures, and every.json/.yaml/.md/.mdx. Every authoredresource:key found resolves to a different surface, individually inspected:packages/plugin-report/README.md:412—LiveExportOptions.resource, an argument toexportWithLiveData, beside the runtime adaptercontent/docs/api/schema-reference.md:532—CRUDSchema.resource(type: 'crud')content/docs/guide/objectos-integration.mdx:284—useViewData({ resource })hook optionspackages/core/src/adapters/README.md:33— a sibling key ofdataSourceon adata-tableschema, notdataSource.resourcepackages/permissions/README.md:108—evaluatePermission({ resource })DataSourcemethod parameters, plugin-gantt's resource-workload feature, etc.The two multiline hits inside a
dataSourceblock are both the adapter interface declaringcreate(resource: string, ...)/update(resource: string, ...)— method parameters, not a metadata key.History:
git log -Straced the limb to the commit that first added data loading to this view. It was speculative in that commit — no producer preceded it, and none appeared since. The three report fixtures inexamples/schema-catalogcarry nodataSourceat all.The premise holds, so the deletion proceeds rather than escalating.
Behaviour, measured by rendering
Each input shape was rendered through the real component before and after, reading the actual adapter query, the rows handed to the renderer, the config panel's field list, and the warning. The
resource-only cases put a real object (acct, with real fields) behind the non-contract spelling, so "not queried" proves the spelling was not read, not that there was nothing to read.{ object: 'acct' }acct, 1 row, fieldsindustry{ resource: 'acct' }acct, 1 row, fieldsindustry, no warningReportView: dataSource missing object property{ object: 'acct', resource: 'other' }acct, fieldsindustryresourcewas already inert{}missing object/resource propertymissing object propertyThe behaviour being removed, stated plainly: a
resource-only report binding used to render as if declared. It now fails loudly — a named warning, zero rows, and the fallback field list — instead of appearing to work while every other renderer in the system disagreed with it. Only that one shape moves; the other three are byte-identical readings.The
:275wording now names onlyobject. A diagnostic listing a key the contract does not declare is not cosmetic: it is the system telling an author — increasingly, an author's code generator — that the wrong spelling is supported.Reverse-verification
Both legs were run from the committed state, direction predicted before running.
origin/mainReportView.tsx(both limbs + old wording)resource only,neither,warning names objectexpected 'acct' to be null,missing object/resource property,expected '' to contain 'object'Leg 2 is what separates the two halves of the fix: it shows each assertion is load-bearing for a specific limb, and that
neitheris the assertion pinning the:275reword.Ablation validity: this package's tests resolve the component through a relative source import (
./ReportView) and the root vitest alias table maps every@object-ui/*specifier tosrc/— so the mutation is read straight from source with nodist/in the path. Demonstrated rather than assumed: the source-only edit moved the suite red and back green with no rebuild between.Restored afterwards and proven clean by blob hash, not by eyeball — worktree
13466eff4fc346c70267b5c2f44a3a9c910062b1equals the committed blob,git statusempty.Verification at
d8a61a5ceThe gate union below was run after the final commit, on that sha.
pnpm exec vitest run packages/app-shell/src/views/— 285 files, 2817 passed, 1 skipped (the skip is a pre-existing spec-versionskipIfinflow-node-config.spec-reconciliation.test.ts, untouched)pnpm exec vitest run packages/app-shell/src/console/ packages/app-shell/src/__tests__/— 59 files, 500 passed (the route + barrel that consumeReportView)ReportView.dataSourceObjectKey.test.tsx— 5/5pnpm --filter @object-ui/app-shell type-check— clean (tsc --noEmit && tsc -p tsconfig.test.json, script name echoed; 3 real type errors in the new test were found and fixed here, not suppressed)eslinton both changed files — 0 errors.ReportView.tsxwarning count is 24 before and 24 after, measured against anorigin/maincopy — zero introducedcheck:control-bytes,check:esm-specifiers,check:self-import,check:phantom-deps,check:doc-types— passcheck:doc-snippets— pass, after building the packages it resolves against; its own sentinel/positive controls are green, so this is a real reading rather than a skipped onecheck:eager-closure(ratchet) — pass: 3792.5 KB gzipped, budget 3867.2 KB, 74.7 KB headroom. Required buildingapps/consoleand its closure;ReportViewstays lazily routed, and no import statement changedcheck-changeset-presence,check-changeset-no-major— passNo test skipped, disabled, or quarantined.
Notes
minor, declaring the removal honestly with the per-shape table. Notmajor— per AGENTS.md that would drag the whole 39-package fixed group off the@objectstackmajor it tracks.resourcevariable at the fetch site is nowobjectName. It was the last in-code echo of the non-contract spelling on the very line being fixed, and an open invitation to re-add the alias. The adapter's own parameter is still calledresource; a comment records where the two vocabularies meet.#5203is in flight in this same package but confined tolayout/andhooks/— neither directory is touched, verified against the merge base. No governed surface (AGENTS.md,CLAUDE.md,.claude/**,docs/adr/**,skills/**) is touched.Generated by Claude Code