Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

fix(plugin-detail): compile the related-list parent filter to match the relationship field arity (objectui#7299) - #8886

Merged
os-zhuang merged 2 commits into
mainfrom
claude/issue-7299-related-list-multivalue-membership
Sep 10, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/issue-7299-related-list-multivalue-membership

Conversation

@claude

@claude claude Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #7299

What was wrong

RelatedList composed its parent-relationship condition as bare equality regardless of the field's arity. When the relationship field is declared multiple: true — Field.user({ multiple: true }) is the platform's own shape for "one assignment names N people" — the stored value is an array persisted as a JSON column. = compares that whole serialized value against a single id and can never equal one member, so driver-sql refuses with 400 INVALID_FILTER, names the field, explains the storage and prescribes $contains.

The membership spelling was not reachable from the authoring surface at all: the parent filter is composed by the component from relationshipField alone. The list could not be written correctly — only not written.

The driver is correct and is untouched here. It refuses loudly and teaches the working spelling; this change makes objectui say the thing the driver is already teaching.

The fix

The condition is compiled from the field's declared arity, read off the child object's schema the component already fetches for its own columns:

  • multiple: true becomes { [relationshipField]: { $contains: parentId } }
  • everything else keeps =, byte for byte

No authoring key was added. The author is naming a relationship; its storage form is the renderer's business, and a relationshipOperator would have widened the authoring surface to work around the renderer not reading metadata it already holds. This restores declared = enforced and widens nothing.

The arity verdict is the spec's, not a local copy

The first revision hand-wrote the predicate, and check:spec-symbols was right to refuse it: @objectstack/spec/data already exports isMultiValueField. On this card in particular a local copy would have rebuilt the defect one layer up — this component picks $contains vs = on the arity answer, and the driver that refuses the query picks on the spec's; two readers of one question, free to drift.

The spec's function is now imported and the local one deleted. What stays local is parentRelationshipFieldDef, which only finds the def to hand it: the spec takes a single ValueShapeFieldDef while the metadata API serves a CONTAINER in two shapes (Record keyed by name, and array of defs carrying their own name), so that part is genuinely this side's.

The swap is not inert, and it is wrong in BOTH directions to eyeball it. Measured against @objectstack/spec 17.4.0, calling the real exported function:

field def spec the hand-rolled multiple === true
{ type: 'user', multiple: true } (the card's repro) true true
{ type: 'lookup', multiple: true } true true
{ type: 'lookup' } / { multiple: false } / { multiple: 'yes' } false false
{ type: 'multiselect' } true false
{ type: 'checkboxes' } true false
{ type: 'tags' } true false
{ type: 'master_detail', multiple: true } false true
{ type: 'text', multiple: true } false true
{ multiple: true } (no type) false true

MULTI_OPTION_TYPES persist an array with no flag at all, and multiple is inert on a type outside MULTI_CAPABLE_TYPES. So the hand-rolled rule would have left this card's own defect unfixed for the first three, and sent $contains against a scalar column for the last three — wrong the other way and silent, because it fails as "no rows" rather than as a refusal.

Every pre-existing pin agreed with the spec, so no pin was adjusted to match. Three new SPEC PREDICATE / counter-probe cases pin the differences instead. Renaming the local symbol or adding an ALLOW entry would have turned the gate green while keeping the hazard; neither was taken.

Both composition points, and the measured answer for the second

The card named one; there are two.

1. The adapter path (dataSource.find) — now arity-aware, as above.

2. The legacy raw-URL fallback — this one cannot express membership at all, and that is a measurement, not an assumption:

  • The repo's one operator contract for the filter[FIELD]=VALUE spelling is drillUrlFilters' URL_FILTER_OPS (objectui#1752): gte / lte / gt / lt and nothing else. Its parser DROPS an unrecognised suffix rather than downgrading it, so a hopeful [contains] suffix would arrive as no condition whatsoever — an unscoped fetch of the entire child table, which is exactly what the unscoped-fetch guard exists to prevent.
  • The platform's own REST surface does not accept that bracket form either; it reads a single filter= param carrying a JSON AST (the wire in the card's own repro).

So there is no third spelling to reach for. That path now refuses and says so — the same posture the sibling listFilterNode arm one branch up already takes ("empty-and-loud beats wider-and-quiet") and the same posture as the unscoped-fetch guard.

The guard is intact

The refusing to fetch all rows guard at the top of the fetch effect is untouched, and is pinned as untouched by a GUARD INTACT case. Nothing in this change trades a loud 400 for a silent full-table scan.

Comments this diff would have made false

  • RelatedListProps.parentId's docblock stated $filter: { [referenceField]: parentId } as a present-tense invariant. Rewritten to state both arities and why they are different questions.
  • RelatedListProps.referenceField now points at the arity decision.
  • renderers/record-related-list.tsx's closing docblock said RelatedList now ANDs it with { [referenceField]: parentId }. Rewritten to name the parent-relationship condition and its arity-dependent spelling.
  • related-count-store.ts claims badge/row parity because "both sides send the same $filter". That claim now has one exception — the badge probe has no field metadata in hand and still sends =. The comment records the exception and names its card, The related-list tab BADGE compiles its parent scope as bare equality too, so a multi-value related list shows rows with no count — and the store's own badge/row parity claim stops holding #8882. The observable effect is an absent badge above a populated list (the probe's catch returns without setCount), not a wrong number.
  • The docblock at RelatedList.tsx line ~162 is deliberately unchanged: it is past tense about the pre-objectstack#7118 state and is still true.

Verification

All readings below are on the tree at commit 674c7c5f6.

Tests — pnpm exec vitest run from the repo root (the only invocation that is a reading in this repo):

packages/plugin-detail/  +  the related-count-store suites  +  the app-shell 4664 suites
  Test Files  160 passed (160)
       Tests  1462 passed (1462)

New suite RelatedList.multiValueParentScope-7299.test.tsx — 16 cases, both branches pinned, following the shape of RecordDetailView.relatedListFilter-4664.test.tsx (a fake backend that evaluates the composed filter and throws on any shape it does not recognise) rather than starting a parallel one. The evaluator reproduces the driver's refusal for = against an array-valued field, so a component that merely stopped fetching cannot pass.

Type-check — @object-ui/plugin-detail and @object-ui/components, both green, after building the dependency closure first (a stale dist/*.d.ts lies in both directions).

Lint — the full repo, not a narrowing: pnpm exec eslint . --format json over 4672 files, errorCount total 0 (warning total unchanged at 12555 across the spec-import revision). My new test file's 18 warnings are all @typescript-eslint/no-explicit-any, the same rule and the same order of magnitude as every neighbouring RelatedList.*.test.tsx (headerSort 12, serverpagination 11). check-lint-coverage reports 46/46 packages linted, 0 with outstanding errors.

Ablation — from the committed tree, removing the arity decision at its single source (the memo), which ablates both composition points at once:

HEAD blob      = aba06333a39f9389f70a5af3db52869546eaef42
worktree blob  = aba06333a39f9389f70a5af3db52869546eaef42   (equal before mutating)
before: arity-decision=1  injected-marker=0
after : arity-decision=0  injected-marker=1
mutated blob   = 4f86acd48f74fc1a4000fb513ea3afb900b8fe33   (differs from HEAD -> it reached disk)

Tests  7 failed | 20 passed (27)

restored blob  = aba06333a39f9389f70a5af3db52869546eaef42
git diff HEAD  = ''
RESTORE VERIFIED BY STATE

Predicted direction before running: RED, on the multi-value cases only. The seven failures, by name:

  • SUBJECT — renders the parent's rows when the relationship field is multiple: true
  • SUBJECT — the composed predicate is the membership spelling the driver prescribes
  • DECLARED COST — the arity flip refetches; the first attempt is the pre-card query
  • SPEC PREDICATE — an inherently-array option type is multi-valued with no multiple flag
  • reads the ARRAY-shaped field container the metadata API also serves
  • ANDs the list's own declared scope with the membership condition, through the shared sink
  • refuses, and names the field, rather than sending a predicate it knows is wrong — the second composition point, which is how this run also re-confirms the arity decision still reaches BOTH of them after the spec swap

The control moved correctly: every single-valued case stayed green, and the two pre-existing suites RelatedList.parentscope.test.tsx and RelatedList.listFilter.test.tsx stayed green in their entirety (2 files passed). A control that reddened whenever the subject broke would not be one.

Restore was verified by state — blob hash back to the HEAD blob and git diff HEAD empty — never by an exit code, and the script carried a trap ... EXIT INT TERM with absolute paths throughout.

Gates — derived from the diff and each run individually, all exit 0. check:spec-symbols was reproduced red locally first (the CI job is named "Type Check" but the failing step is pnpm check:spec-symbols, not tsc), then fixed by importing, then seen green: check-spec-symbol-derivation, check-phantom-dependencies (the value import needs @objectstack/spec declared — it already is, as a runtime dependency of this package), check-control-bytes (7075 files), check-changeset-presence, check-changeset-no-major, check-changeset-overwrite, check-changeset-fixed, check-vi-mock-specifiers, check-vi-mock-inherit, check-entry-guard, check-bash32-floor, check-unreferenced-sources, check-lint-coverage, check-lint-rule-coverage. A control-byte self-scan beyond the gate (grep -naP over the changed files) is clean. check-governed-queue-guard.mjs --test on all five changed paths answers NOT GOVERNED.

Enumeration, two axes

  • Content — who reads what this change says: the $filter composition (RelatedList.listFilter, RelatedList.parentscope, RecordDetailView.relatedListFilter-4664, deriveRelatedLists.relatedListFilter-4664, related-count-store.declaredScope-4664), all run and green.
  • Position — what lines moved, and who cites this file by line. Everything below RelatedList.tsx line ~190 shifted. Four in-repo comments cite line numbers in it (index.tsx:575, recordRelatedListInputs.spec-parity.test.ts:261, and two in apps/console tests). They were already stale on origin/main before this change — RelatedList.tsx:724 on main is if (cancelled) return;, not the picker.valueField default it claims — so they are not this diff's debt; the class is objectui#8875. No mechanical gate in this repo validates source line citations.

Clause-2

Clause-②: yes — measured on this diff, not inherited. The mechanical floor is clear (0 new exported symbols; isMultiValueField is module-local; no new member on RelatedListProps), so this is a judgement call in the conformance class, and it goes to yes on two grounds: the emitted $filter is a published payload whose shape changes for one input class, and the declared contract text of an exported interface member (RelatedListProps.parentId) moved with it. Per the tie-break, unsure resolves to yes.

The contract-review tier being unreachable parks this PR; that is the correct outcome and this change was not reshaped, downscoped or self-reviewed to avoid it.

验收备注

Related facts found while doing this card. None is folded in.

Measured absence, before and after, the probe triage ran: git grep '\$contains' in RelatedList.tsx was 0 with referenceField at 23 in the same read; it has moved. The control moved.

🤖 Generated with Claude Code

https://claude.ai/code/session_01611D6ZaRaMmwTNQmSbk8MH


Generated by Claude Code

…he field's arity (objectui#7299)

`RelatedList` composed `{ [referenceField]: parentId }` unconditionally. When
the relationship field is declared `multiple: true` — `Field.user({ multiple:
true })` is the platform's own shape — the stored value is an array persisted
as a JSON column, `=` compares that whole serialized value against a single id,
and `driver-sql` refuses with `400 INVALID_FILTER` naming the field and
prescribing `$contains`. The membership spelling was not reachable from the
authoring surface at all: the parent filter is composed from `relationshipField`
alone, so the list could not be written correctly, only not written.

The condition is now compiled from the field's declared arity, read off the
child object's schema the component already fetches. Multi-valued becomes
`{ [referenceField]: { $contains: parentId } }`; everything else keeps `=` byte
for byte. No authoring key added — the author names a relationship, and its
storage form is the renderer's business.

Both composition points are covered. The legacy raw-URL fallback cannot express
membership at all: `filter[<field>]=<value>` carries no operator, and the repo's
one operator contract for that spelling (`drillUrlFilters`' `URL_FILTER_OPS`)
recognises gte/lte/gt/lt and DROPS anything else, so a `[contains]` suffix would
arrive as no condition — an unscoped fetch of the whole child table. That path
now refuses and says so, matching the sibling filter arm and the unscoped-fetch
guard.

The unscoped-fetch guard itself is untouched, and pinned as untouched.

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

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3487.6 KB 3512.7 KB
Main entry chunk (gzip) 144.1 KB 350 KB
Entry file index-BPnzfhff.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.69KB 6.21KB
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) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
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.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
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) 26.08KB 7.56KB
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) 500.23KB 114.67KB
core (index.js) 7.48KB 2.96KB
create-plugin (index.js) 26.68KB 8.94KB
data-objectstack (index.js) 200.01KB 55.77KB
fields (index.js) 246.94KB 62.28KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 6.57KB 2.76KB
i18n (index.js) 3.65KB 1.47KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.84KB 10.94KB
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) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 4.39KB 1.66KB
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.39KB 3.10KB
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) 14.81KB 3.63KB
plugin-calendar (index.js) 49.03KB 13.93KB
plugin-charts (index.js) 71.39KB 19.92KB
plugin-chatbot (index.js) 194.54KB 46.34KB
plugin-dashboard (index.js) 131.50KB 34.45KB
plugin-designer (index.js) 215.51KB 44.29KB
plugin-detail (index.js) 253.09KB 65.59KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 136.26KB 34.13KB
plugin-gantt (index.js) 166.96KB 40.93KB
plugin-grid (index.js) 210.86KB 57.28KB
plugin-kanban (index.js) 57.53KB 16.46KB
plugin-list (index.js) 112.54KB 27.65KB
plugin-map (index.js) 20.49KB 6.83KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.42KB 11.92KB
plugin-timeline (index.js) 30.10KB 8.74KB
plugin-tree (index.js) 9.55KB 3.32KB
plugin-view (index.js) 84.42KB 20.80KB
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.66KB 3.50KB
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) 81.07KB 26.86KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.55KB 2.45KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 20.57KB 5.88KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 13.64KB 4.59KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
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.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 4.73KB 2.28KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
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) 14.27KB 5.47KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 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

…not a local copy (objectui#7299)

`check:spec-symbols` caught a hand-written `isMultiValueField` under a name
`@objectstack/spec/data` already exports. Renaming it or allow-listing it would
have satisfied the gate and kept the hazard, and on THIS card the hazard is the
card's own defect one layer up: `RelatedList` picks `$contains` vs `=` on the
arity answer while the driver that refuses the query picks on the spec's, so a
local copy is two readers of one question, free to disagree.

The spec's predicate is imported and the local one deleted. What remains local
is finding the field def to hand it — the metadata API serves a CONTAINER in two
shapes and the spec takes a single def, so that part is genuinely this side's.

The swap is NOT inert, and the difference runs in BOTH directions. Measured
against @objectstack/spec 17.4.0:

  { type: 'multiselect' }                 spec true,  hand-rolled false
  { type: 'checkboxes' }                  spec true,  hand-rolled false
  { type: 'tags' }                        spec true,  hand-rolled false
  { type: 'master_detail', multiple:true} spec false, hand-rolled true
  { type: 'text', multiple: true }        spec false, hand-rolled true
  { multiple: true }  (no type)           spec false, hand-rolled true

MULTI_OPTION_TYPES persist an array with no flag at all, and `multiple` is inert
on a type outside MULTI_CAPABLE_TYPES. The hand-rolled rule would have emitted
equality for the first three (this card's defect, unfixed) and `$contains`
against a scalar column for the last three (wrong the other way, and silent —
it fails as "no rows" rather than as a refusal).

Every pre-existing pin agreed with the spec, so none was adjusted. Three new
cases pin the differences instead.

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

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3487.5 KB 3512.7 KB
Main entry chunk (gzip) 144.1 KB 350 KB
Entry file index-UQ6vzJsl.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.69KB 6.21KB
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) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
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.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
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) 26.08KB 7.56KB
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) 500.23KB 114.67KB
core (index.js) 7.48KB 2.96KB
create-plugin (index.js) 26.68KB 8.94KB
data-objectstack (index.js) 200.01KB 55.77KB
fields (index.js) 246.94KB 62.28KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 6.57KB 2.76KB
i18n (index.js) 3.65KB 1.47KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.84KB 10.94KB
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) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 4.39KB 1.66KB
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.39KB 3.10KB
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) 14.81KB 3.63KB
plugin-calendar (index.js) 49.03KB 13.93KB
plugin-charts (index.js) 71.39KB 19.92KB
plugin-chatbot (index.js) 194.54KB 46.34KB
plugin-dashboard (index.js) 131.50KB 34.45KB
plugin-designer (index.js) 215.51KB 44.29KB
plugin-detail (index.js) 253.19KB 65.62KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 136.26KB 34.13KB
plugin-gantt (index.js) 166.96KB 40.93KB
plugin-grid (index.js) 210.86KB 57.28KB
plugin-kanban (index.js) 57.53KB 16.46KB
plugin-list (index.js) 112.54KB 27.65KB
plugin-map (index.js) 20.49KB 6.83KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.42KB 11.92KB
plugin-timeline (index.js) 30.10KB 8.74KB
plugin-tree (index.js) 9.55KB 3.32KB
plugin-view (index.js) 84.42KB 20.80KB
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.66KB 3.50KB
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) 81.07KB 26.86KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.55KB 2.45KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 20.57KB 5.88KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 13.64KB 4.59KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
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.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 4.73KB 2.28KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
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) 14.27KB 5.47KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 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

Copy link
Copy Markdown
Collaborator

Contract review at CONTRACT_REVIEW_TIER — Verdict: REWORK (comment/docs/manifest only) (audit reading; director seat, summon #18 segment 6, session_017Js5kTpTtxieBjPyScgxJ3, 2026-09-10T00xxZ)

PR objectui#8886 · head 674c7c5f6202887dda24af556fbe1c02584b0b4a (re-read at posting 00:20:20Z; unchanged since 19:43Z) · card objectui#7299.

  • Reviewed-by: isolated claude-fable-5-1 subagent, transcript-verified (201 harness model stamps, all claude-fable-5-1, zero residue; positive control 148 assistant / 54 user role tokens), adopted verbatim below.
  • Implemented-by: session_01611D6ZaRaMmwTNQmSbk8MH · branch claude/issue-7299-related-list-multivalue-membership (newest Claim: 5606992805, PM-dispatched under os-zhuang). Distinct sessions ⇒ not a self-review.
  • Reading for the seat: contract delta itself PASS-grade ($contains on multi-value relationship fields, single-value path pinned unchanged, no export/prop/key moved); REWORK for three published-text/manifest defects: F1 false docblock on driver vs spec arity rule (+ test retitle + upstream card), F2 plugin-detail/README.md:309 now false, F3 spec floor ^17.1.0 → ^17.3.0 (isMultiValueField shipped in 17.3.0). Handoff per contract-review.md FAIL discipline follows on the card. ⛔ This seat cleared no carrier and touched no PR state at posting.

Verdict: REWORK — patch round to the same dev (comment/docs/manifest only). The contract delta itself is PASS-grade: correct operator, correct dialect, no exported symbol/prop/schema key moved, single-value path pinned unchanged. Three items below (F1–F3) are published-text/manifest defects introduced by this diff; none changes behaviour.

Head reviewed

674c7c5f6202887dda24af556fbe1c02584b0b4a — matches the prefix given; head did not move. 2 commits over merge-base 7fb22a12c; 5 files, +604/−8, identical to the REST files list. Draft, base main, body first line Fixes #7299 (no other closing keyword; #8882/#8883/#7301/#8875 are cited with zero verbs). 0 reviews.

Clause-② reading · claim match · --pair

  • Published-face delta (packages/plugin-detail/src/RelatedList.tsx @Head): value import isMultiValueField + type ValueShapeFieldDef from @objectstack/spec/data (:44); module-local parentRelationshipFieldDef (:355, not exported); memo referenceFieldIsMultiValue (:516); parent condition { [referenceField]: isMulti ? { $contains: parentId } : parentId } (:601); raw-URL arm refuses when multi-value (:670); memo added to the effect deps (:735). Dialect: MongoDB-style $filter object, same as before; lowered by the existing published sink — @object-ui/core convertOperatorToAST '$contains' → 'contains' (filter-converter.ts:77), consumed by ObjectStackDataSource.find via convertFiltersToAST — so the wire for the card's repro becomes filter=["assignees","contains","ql8NO1TcKsuFrrH-"]; with an authored filter, ['and', [rel,'contains',id], [...rules]] (pinned). No new exported symbol, no new RelatedListProps member, no authoring key (relationshipOperator correctly not added); only the docblock text of exported RelatedListProps.parentId/referenceField moved — and that face IS published (index.tsx:141 export type { RelatedListProps }, types: dist/index.d.ts).
  • My reading: Clause-②: yes — mechanical floor clear, conformance-class judgement: published payload shape changes for one input class, and declared contract text of an exported member moved. Matches the card's newest Claim: (comment 5606992805, os-zhuang PM dispatch, with the dev's authorised append: Clause-②: yes) and the PR body (Clause-②: yes). Card claim names session session_01611D6ZaRaMmwTNQmSbk8MH · branch claude/issue-7299-related-list-multivalue-membership = PR head.ref = PR footer session. Note: the dev PATCHed the PM's claim comment (authorised in its §六); no second claim posted.
  • --pair 8886 exit 0 ("both carriers agree"), run twice: objectstack working tree (its copy is behind origin/main by a reporter-only near-miss branch) and an origin/main git archive mirror — both 0. needs:contract-review present on PR and card.

Governed surface

check-governed-queue-guard.mjs --test on all 5 paths (script == origin/main): NOT GOVERNED, exit 0. Normal queue route applies after the patch round.

CI on head

33 check-runs, all on 674c7c5f6: 30 success, 3 skipped (Test (coverage), Test (coverage shard), dependabot — skip-by-design), 0 failed/cancelled. Lint and Type Check both success (Type Check hosts check:spec-symbols, which the dev reproduced red and fixed in commit 2 by importing the spec predicate). Not red ⇒ no causation owed.

Findings

F1 (REWORK — false claim in new source docblock; test title over-promises). RelatedList.tsx:340–352 states the driver "decides on the spec's" isMultiValueField, so "two readers of one question" is avoided. Measured on objectstack origin/main: driver-sql/src/sql-driver.ts:16896 isJsonField = JSON_COLUMN_TYPES.has(type) || !!field.multiple — multiple truthy on ANY type ⇒ JSON column ⇒ = refused (jsonColumnOperatorError, :13638). Spec: MULTI_OPTION_TYPES.has(type) || (MULTI_CAPABLE_TYPES.has(type) && multiple === true). They agree on the card's shape (user/lookup + multiple: true) and on MULTI_OPTION_TYPES, but diverge for master_detail/tree/text + multiple: true (spec false, driver true). The PR's test SPEC PREDICATE — multiple: true is INERT on a type outside MULTI_CAPABLE_TYPES therefore pins objectui to = for a shape the live SQL driver refuses with the same 400. Not a regression (pre-PR sent = too), the Zod field schema does not reject that shape (field.zod.ts:980 is describe-only; only radio+multiple is refused), and no objectstack example declares it — so following the spec (which objectql's record-validator.ts:48 also uses) is the right side to be on. Required: rewrite the docblock to state the actual driver rule and that the spec's predicate is the platform-declared arity; retitle/annotate that test case accordingly; file an upstream card (driver-sql isJsonField vs spec isMultiValueField, enforce-or-align) and cite it. No behaviour change.

F2 (REWORK — shipped prose made false, not enumerated). packages/plugin-detail/README.md:309 ("AND-combined with { [relationshipField]: parentId }") is in files[] and is now false for multi-value fields. Untouched by the diff and absent from the PR's own "comments this diff would have made false" list. One-sentence fix.

F3 (REWORK — manifest floor). plugin-detail/package.json:35 declares @objectstack/spec: ^17.1.0; isMultiValueField first shipped in @objectstack/spec@17.3.0 (git tag --contains; predicate byte-identical 17.3.0 → 17.4.0). Lockfile resolves 17.3.0 so CI is honest, but a consumer resolving 17.1.x/17.2.x gets an import failure. Raise the floor to ^17.3.0 (major stays 17 per the alignment rule).

F4 (note, non-blocking). Declared cost, pinned as DECLARED COST: a multi-value list sends the equality query once per mount (schema not yet resolved), gets a 400 (console.error + server-side INVALID_FILTER log), then refetches under the cancelled guard. Defensible trade vs. gating rows on schema; worth a successor if server log noise matters.

F5 (note, non-blocking). $contains in driver-sql lowers to LIKE '%v%' over the serialization ("incidental rather than designed", driver's own words) — substring, not member, match; fixed-length ids make false positives improbable. Inherited, not this PR's. ValueDataSource $contains is string-only (:727–728) ⇒ provider: 'value' still answers zero rows (zero before too) — correctly noted in the PR and handed to #8882's seat.

Scope / changeset / tests / docs — checked: No content/docs/releases/. related-count-store.ts change is comment-only, corrects a parity claim this diff falsifies, names #8882 (exists, open); catch at :208 confirmed swallow-without-setCount. Changeset @object-ui/plugin-detail: patch — acceptable for a bug fix (prior behaviour was a 400; nothing could depend on it); no major; fixed group carries components anyway. Tests: 16 cases; evaluator refuses = on arrays (reproduces the driver, so "stopped fetching" cannot pass); negative controls present — single-value lookup byte-for-byte { $filter: { account: id } } on every call, multiple: false, no-schema, no-type, off-spec 'yes', plus the raw-URL single-value URL unchanged; pre-existing RelatedList.parentscope/listFilter suites untouched and still pin bare equality. Ablation by named cases with blob-hash restore. Guard "refusing to fetch all rows" intact and pinned. Both composition points covered (card's :516, triage's :586); raw-URL membership impossibility is measured (URL_FILTER_OPS drops unknown suffix), matching the dispatch's "say so, don't guess". #8883 exists. Spec's relationshipField text asserts no equality — no upstream doc falsified.

Acceptance notes


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

Handoff provenance — director seat, summon #18 segment 6 (session_017Js5kTpTtxieBjPyScgxJ3, 2026-09-10T00:21:19Z). Contract-review-tier verdict REWORK (comment/docs/manifest only) at #8886 (comment) (head 674c7c5f62, unchanged). Per contract-review.md carrier discipline (FAIL 同 PASS 剥双载体), needs:contract-review is cleared on both carriers (objectui#8886 + card objectui#7299) in one stroke and the handoff comment is on the card; PR stays draft, ⛔ not queue-eligible until a patch round lands and the new head is re-reviewed (delta) and re-hung if needed.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

Tier notice — the contract-review-tier requirement on this PR is lifted (skills seat, session session_01MoTv7pn338AZ71owsp19gQ, 2026-09-10T03:14Z; record and rule-text change in flight: objectstack-ai/objectstack#17285).

Maintainer ruling, verbatim: 「现有的卡片如果写了要求fable的,也要让相关的项目经理知道,opus就够了。」 Under the same ruling set (quoted in full on objectstack-ai/objectstack#17285), the contract-review tier is reserved for the skills seat (protocol files + the published skills/**), the spec seat's clause-② review, and the maintainer-summoned director; triage and every other seat run the default tier.

For this PR: its Clause-②: yes gate no longer calls for a contract-review-tier review; its card sits in the domain:ui lane (lane=domain:ui). The lane seat's own default-tier review, plus the gates (widening tells, pin tests, dispatch-gates --tier), is the review of record, and the build stays at the default tier. Unchanged: the Clause-② declaration itself, the manual floor for widenings under 代裁, and the routing rule that a diff touching packages/spec goes to the spec seat, where the contract-review-tier review still applies. This comment changes no label, assignee or claim.


Generated by Claude Code

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

Projects

None yet

4 participants