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

feat(detail): derived related lists consume the FK's relatedListFilter — AND-composed query, badge counts the same set - #6946

Merged
os-sam merged 2 commits into
mainfrom
claude/issue-4664-relatedlistfilter-consumption
Aug 31, 2026
Merged

os-sam merged 2 commits into
mainfrom
claude/issue-4664-relatedlistfilter-consumption

Conversation

@claude

@claude claude Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fixes #4664

Auto-derived related lists now consume the field-level relatedListFilter
declaration: the list query is the declared filter AND-composed with
{ [referenceField]: parentId }, and the related-list tab badge counts the
same composed predicate
, so the badge and the rows answer one question.

Scope guard — condition 2, measured before any code

The card refuses to start unless the pinned @objectstack/spec actually
carries the key. Measured, not assumed:

reading value
manifest pin root package.json "@objectstack/spec": "^17.0.0"
lockfile resolution 17.2.0 (30 entries, one resolution)
installed package node_modules/.pnpm/@objectstack+spec@17.2.0_.../package.json → 17.2.0
key on the FIELD shape relatedListFilter?: FilterCondition | undefined, beside relatedList / relatedListTitle / relatedListColumns
key name relatedListFilter — exactly as the card assumed, no drift
shape FilterConditionSchema.optional(), i.e. the canonical Query-DSL FilterCondition (same dialect as a query where)

The installed key's own describe() text is the contract this PR implements:

Declarative default filter for the detail-page related list: AND-composed
with the parent-relationship condition { [referenceField]: parentId } — an
authored constraint, never a user-editable suggestion. The related-list tab
badge count honors the same composed filter, so counts match the visible
rows.

Premise holds. No spec pin was touched.

What changed

Five source files, one value, one read site — no new dialect:

  1. app-shell/src/utils/deriveRelatedLists.ts — reads relatedListFilter off
    the FK onto the derived descriptor. A plain non-empty object is a
    declaration; an array, a string, null, a number, {} are silence. Not a
    tolerant reader: nothing is aliased, coerced or defaulted (AGENTS.md #0.1),
    the same declared-vs-absent discrimination relatedListTitle and
    relatedListColumns already do next to it.
  2. app-shell/src/views/RecordDetailView.tsx — forwards it into the page
    synthesizer's related shape.
  3. plugin-detail/src/synth/buildDefaultPageSchema.ts — emits it onto the
    record:related_list node's existing filter key.

That key is where the reuse is honest and where it stops. filter has had a
read site since objectstack#7118: RelatedList lowers it through the repo's one
filter sink and ANDs it with the parent scope, wrapping both sources under a
single and rather than letting either replace the other. The derived producer
lands on the same key as the component-level authored filter and as a
dataSource binding's composed filter — three producers, one read site, one
lowering. Nothing was added to the list path; it already did the right thing
with a value it never received.

The badge half needed new code, because the tab strip's probe read only
objectName and relationshipField off the node it was badging:

  1. components/src/renderers/layout/containers.tsx — the page:tabs count
    probe now also reads the node's filter.
  2. components/src/hooks/related-count-store.ts — composes it with the parent
    scope through the same mergeFilterNodes sink the row query uses, so the
    two $filter values are one composition used twice rather than two
    implementations that agree by luck. Cache identity gains the scope, placed
    INSIDE the relField segment so invalidate's two structural reads on these
    keys (startsWith(object::), endsWith(::parentId)) keep working — a scope
    segment appended after the parent id would have orphaned the entry, and its
    failure mode is a badge that never refreshes after a write, with no error to
    notice.

With nothing declared, the synthesized node, the row query and the badge probe
are byte-identical to before ({ [referenceField]: parentId }, the untouched
MongoDB-style object — not a freshly lowered AST that means the same thing).

Consumption only. No authoring UI for the filter, as the card requires.

Verification

Every exit code below was captured before any pipe, and each gate is quoted by
the line the gate itself printed.

Proving the AND, not just the filter. The page test's fake backend
EVALUATES the composed predicate over a four-row fixture built so each conjunct
alone admits a row the other excludes:

row parent status parent scope declared filter AND
Live Item tv-1 open yes yes yes
Archived Item tv-1 archived yes no no
Other Parent Item tv-2 open no yes no
Other Parent Archived tv-2 archived no no no

Parent scope alone answers 2, the declared filter alone answers 2, the
conjunction answers 1 — so dropping either conjunct changes the number the test
reads, in both directions. Those three numbers are asserted from the fixture
itself, so a later edit that flattens it into a single-condition fixture fails
loudly instead of quietly weakening every assertion above it. The evaluator
THROWS on any filter shape it does not recognise: a permissive evaluator would
answer "all rows" for a malformed filter, which is exactly what the
counter-probes would read as a pass.

Proving badge and list agree, in one test, with the unfiltered count
differing from the filtered one: the list renders Live Item and neither
Archived Item (excluded by the declared conjunct) nor Other Parent Item
(excluded by the parent conjunct), while the tab badge reads 1. The
parent-scoped unfiltered count is 2, so a badge ignoring the filter reads 2
there.

Ablation — direction predicted in writing before either run. These tests
resolve through the root vitest.config.mts alias table, which maps every
@object-ui/* specifier to packages/*/src; there is no dist/ seam for a
mutation to be lost behind and therefore no rebuild leg. Each leg proved the
mutation on disk (anchored count of the injected marker AND of the deleted text,
plus git hash-object differing from the HEAD blob) and proved the restore both
ways (git diff HEAD empty AND hash equal to the HEAD blob), under
trap ... EXIT INT TERM with absolute paths from git rev-parse --show-toplevel
and git checkout HEAD -- ABSPATH, never bare.

Leg A — drop the filter from the BADGE path alone (containers.tsx).
Predicted: the two badge legs red, the row leg green, the other three files
green. Observed, exactly:

× SUBJECT — the badge probe sends the SAME composed filter as the rows
  AssertionError: expected { task_version: 'tv-1' } to deeply equal [ 'and', …(2) ]
× PARITY — the badge and the rendered rows agree, and 1 !== the unfiltered 2
  AssertionError: expected '2' to be '1'
Test Files  1 failed | 3 passed (4)
      Tests  2 failed | 25 passed (27)

The second line is the defect this card exists to prevent, reproduced at
fixture scale: the badge said 2 above a list showing 1.

Leg B — the converse: drop it from the LIST path alone
(record-related-list.tsx). Predicted: the row leg red, the badge-equality leg
red as the mirror image of A, parity red the other way round, the other three
files green. Observed, exactly:

× SUBJECT — the row query is the declared filter AND the parent scope
  AssertionError: expected [ 'ci-live', 'ci-archived' ] to deeply equal [ 'ci-live' ]
× SUBJECT — the badge probe sends the SAME composed filter as the rows
  AssertionError: expected [ 'and', …(2) ] to deeply equal { task_version: 'tv-1' }
× PARITY — the badge and the rendered rows agree, and 1 !== the unfiltered 2
Test Files  1 failed | 3 passed (4)
      Tests  3 failed | 24 passed (27)

Gates, all at the final commit 729d29c6c:

  • Root-form vitest, before/after over a set derived by MEASUREMENT (every test
    file that reads one of the five changed modules, by grep, rather than by
    guess): before — 110 files / 1559 tests passed, at BASE 40c479af2 in a
    comparison worktree; after — 114 files / 1586 tests passed. Delta +4
    files / +27 tests, exactly the four test files this PR adds. No pre-existing
    file or test count moved. The reported file count (114) equals the derived
    list's own count (114) — the sanity check against a run that silently
    substitutes another package's suite.
  • type-check (hyphenated) for all three touched packages, script name echoed
    by pnpm as tsc --noEmit && tsc -p tsconfig.test.json, all three Done.
    The .test.ts files are genuinely inside those programs, not excluded:
    tsc -p tsconfig.test.json --listFiles names all four new test files
    (app-shell 2, components 1, plugin-detail 1).
  • pnpm exec eslint ., plain form (no --no-inline-config), whole repo:
    exit 0, ✖ 11554 problems (0 errors, 11554 warnings) — 0 errors; the
    warnings are the repo-wide pre-existing no-explicit-any population.
  • node scripts/check-changeset-presence.mjs: exit 0 —
    ✅ 9 source file(s) of 3 released package(s) changed, and this change declares 1 changeset(s).
  • node scripts/check-changeset-no-major.mjs: exit 0 —
    ✅ No changeset declares a 'major' bump. The changeset is minor on the
    three packages and states the new consumption in words.

Boundaries named rather than forced

  • The reference rail is deliberately NOT wired. record:reference_rail
    renders its own total-count badge from a fixed
    { [relationshipField]: parentId } query, so on a page whose FK declares a
    filter the Related tab badge and the rail card for the same child disagree.
    It is not fixable here: ReferenceRailEntrySchema is strictObject with no
    filter key, and the spec's own guidance on that shape says the rail
    "honours no per-entry filter" and that "record:related_list is the
    component whose filter is real; if the rail is ever granted one, this entry
    shape is where it gets declared and enforced." Granting it is an upstream
    spec decision, not this card. Filed separately.
  • Logical combinators do not survive the shared sink. relatedListFilter
    is typed FilterCondition, whose type explicitly declares $and / $or /
    $not — but convertFiltersToAST in @object-ui/core has no combinator
    branch: { $or: [...] } lowers to ['$or','=',[...]] (a leaf naming a field
    $or) and { $not: {...} } throws FilterOperatorError naming a nonsense
    operator. Pre-existing on every consumer of that sink since
    objectstack#7118; this key newly makes it reachable by an author following
    the spec's own type. Fixing it means changing the shared sink for every
    caller, which is its own card. Filed separately; not patched around here,
    because a renderer-side workaround is exactly the second de-facto contract
    #0.1 forbids.

⛔ Left in draft, not enqueued, no auto-merge — the PM lands it.

Generated by Claude Code


Generated by Claude Code

The spec key `relatedListFilter` (objectstack#8704 / PR #8955, shipped in
@objectstack/spec 17.1.0) declares a related list's own scope on the
relationship. This repo accepted it at every gate and consumed it nowhere.

- deriveRelatedLists reads it off the FK; RecordDetailView forwards it; the
  page synthesizer emits it onto the record:related_list node's EXISTING
  `filter` key, where RelatedList already ANDs it with
  `{ [referenceField]: parentId }` (objectstack#7118). No new dialect.
- The tab badge counts the same composed predicate: page:tabs reads the node's
  filter and the count store composes it with the parent scope through the same
  mergeFilterNodes sink the row query uses. Counts cache per scope, so a
  filtered and an unfiltered probe never badge each other.

With nothing declared, the node, the row query and the badge probe are
byte-identical to before. Consumption only; no authoring UI.
@claude

claude Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

The two boundaries named in the description are now filed, both unassigned and unlabelled for PM triage:

Neither is worked around in this PR. Session: https://claude.ai/code/session_013hfmP9hoMd3dJwTh85J4yB


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 45 chunks) 3179.8 KB 3222.7 KB
Main entry chunk (gzip) 143.6 KB 350 KB
Entry file index-B0Pj123L.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) 12.46KB 4.71KB
app-shell (runtime-config.js) 20.61KB 7.35KB
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) 5.13KB 2.35KB
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) 512.32KB 116.52KB
core (index.js) 5.30KB 2.13KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 175.69KB 48.80KB
fields (index.js) 243.65KB 61.63KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 4.28KB 1.75KB
i18n (index.js) 3.44KB 1.39KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 33.40KB 8.71KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.95KB 10.97KB
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.55KB 0.62KB
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 (useResponsiveConfig.js) 1.37KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 11.71KB 4.29KB
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) 5.12KB 1.74KB
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) 15.75KB 3.80KB
plugin-calendar (index.js) 46.92KB 12.93KB
plugin-charts (index.js) 64.68KB 18.35KB
plugin-chatbot (index.js) 190.53KB 45.18KB
plugin-dashboard (index.js) 133.48KB 34.51KB
plugin-designer (index.js) 212.87KB 43.19KB
plugin-detail (index.js) 247.30KB 63.18KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 133.11KB 32.61KB
plugin-gantt (index.js) 165.21KB 40.37KB
plugin-grid (index.js) 202.08KB 54.61KB
plugin-kanban (index.js) 53.14KB 14.64KB
plugin-list (index.js) 113.15KB 27.59KB
plugin-map (index.js) 20.20KB 6.66KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 43.51KB 11.94KB
plugin-timeline (index.js) 29.05KB 8.37KB
plugin-tree (index.js) 8.98KB 3.08KB
plugin-view (index.js) 85.79KB 21.10KB
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) 76.75KB 25.49KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 3.11KB 1.48KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 5.41KB 2.34KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 4.93KB 2.24KB
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) 10.35KB 3.60KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.74KB 1.41KB
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 (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.72KB 2.24KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 2.59KB 1.31KB
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 (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 3.40KB 1.71KB
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

…rose

The doc-version-claims ratchet (Test shard 4/4) flagged the hard-coded
version this PR's own diff added: a version literal in prose that nothing
in the repo re-verifies. Per the gate's own prescribed remedy (PR #3688 /
PR #3698's precedent), delete the literal and point at the truth instead —
this package's own `@objectstack/spec` dependency in package.json, which
the package manager keeps honest at install time.

Fixes the red `Test (shard 4/4)` check on PR #6946; no other files touched.
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 45 chunks) 3179.8 KB 3222.7 KB
Main entry chunk (gzip) 143.6 KB 350 KB
Entry file index-B0Pj123L.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) 12.46KB 4.71KB
app-shell (runtime-config.js) 20.61KB 7.35KB
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) 5.13KB 2.35KB
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) 512.32KB 116.52KB
core (index.js) 5.30KB 2.13KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 175.69KB 48.80KB
fields (index.js) 243.65KB 61.63KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 4.28KB 1.75KB
i18n (index.js) 3.44KB 1.39KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 33.40KB 8.71KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.95KB 10.97KB
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.55KB 0.62KB
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 (useResponsiveConfig.js) 1.37KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 11.71KB 4.29KB
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) 5.12KB 1.74KB
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) 15.75KB 3.80KB
plugin-calendar (index.js) 46.92KB 12.93KB
plugin-charts (index.js) 64.68KB 18.35KB
plugin-chatbot (index.js) 190.53KB 45.18KB
plugin-dashboard (index.js) 133.48KB 34.51KB
plugin-designer (index.js) 212.87KB 43.19KB
plugin-detail (index.js) 247.30KB 63.18KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 133.11KB 32.61KB
plugin-gantt (index.js) 165.21KB 40.37KB
plugin-grid (index.js) 202.08KB 54.61KB
plugin-kanban (index.js) 53.14KB 14.64KB
plugin-list (index.js) 113.15KB 27.59KB
plugin-map (index.js) 20.20KB 6.66KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 43.51KB 11.94KB
plugin-timeline (index.js) 29.05KB 8.37KB
plugin-tree (index.js) 8.98KB 3.08KB
plugin-view (index.js) 85.79KB 21.10KB
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) 76.75KB 25.49KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 3.11KB 1.48KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 5.41KB 2.34KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 4.93KB 2.24KB
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) 10.35KB 3.60KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.74KB 1.41KB
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 (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.72KB 2.24KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 2.59KB 1.31KB
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 (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 3.40KB 1.71KB
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

Merged via the queue into main with commit d796c8d Aug 31, 2026
31 checks passed
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Oct 7, 2026
…ode (objectui#3906) (objectstack-ai#11162)

Fixes objectstack-ai#3906
Clause-②: no

Phase 2 of the maintainer ruling on objectui#3906 (comment 5230005161,
direction (b)): the PageHeader docs page's author face becomes the
canonical `page:header` node. Phase 1 (the truth banner) landed as PR
objectstack-ai#5922; this is the last phase.

## What changed

- **`content/docs/layout/page-header.mdx`, rewritten.** Every example,
the property table, both layouts, the styling numbers, accessibility and
responsive behaviour are measured against `PageHeaderRenderer` in
`@object-ui/components` and the spec's `PageHeaderProps` (the
`ComponentPropsMap['page:header']` row). No number was carried over from
the old page or from `@object-ui/layout`'s `PageHeader`. The section
"Gating a header action on a relation field" was already canonical-true
and is kept as it was. The Phase-1 banner gives way to the rewritten
page, and the `page-header` / `layout:page-header` alias is named once,
as an alias, in its own short section.
- **`content/docs/guide/layout.md`, the PageHeader section only**, moved
to the same key. The hunk near the page node's button `label` that draft
PR objectstack-ai#11069 edits is untouched.
- **The catalog demo is re-keyed to `page:header`**, with its props in
`properties`, and renamed `layout-page-header/pageheader-with-actions`
to `layout-page-header/basic-page-header` (index regenerated with
`scripts/regenerate-catalog-index.py`, which moved only this entry).
- **The demo's test** re-derives its pins for the canonical node: shape,
a real `SchemaRenderer` render, the contract, and the registration's
declared inputs. The objectui#3787 hand-rolled-copy guard stays, now
checked against the canonical renderer's classes.
- An empty-frontmatter changeset,
`.changeset/3906-page-header-canonical-docs.md`, declares that nothing
is released.

## What the demo became, and why (the dispatch asked me to say which)

The old demo was `page-header` with `icon` and two `button` children. I
measured the canonical node, and neither shape carries over:

- **It draws no `children`.** A real render leaves the buttons out.
objectui's mirror refuses the key on this node (`children:
invalid_type`, objectui#9256), and the manifest reports
`not-a-container`.
- **`icon` is refused by name.** It is an ADR-0087 D2 tombstone on
`PageHeaderProps`.
- **`actions` can't stand in for the buttons.** It holds action IDS, and
those resolve against the object bound to the page. A docs demo has no
bound object, so ids render nothing and the renderer warns once per id.
Inline action objects are refused by the contract (`actions.0: expected
string`).

So the demo shows only title and subtitle, which is the shape the
canonical node accepts and can render here. That is why it no longer
carries "with actions" in its id. The page explains why the live demo
has no actions and links to Slotted pages for the header action row.

## Why `properties`, measured

- The spec's page component shape refuses `title`/`subtitle` written
beside `type` (`unrecognized_keys`).
- objectui's `safeValidateSchema` judges `page:header` props only inside
`properties`. Written beside `type`, even `subTitle` or `icon` goes
through unchecked.
- `SchemaRenderer` moves `properties.*` up onto the node before the
renderer reads it, so both spellings render. Only the `properties`
spelling is validated, so it is the one the page teaches.

## Beyond the claim's file surface (declared, not silent)

The claim lists four paths. Three more files had to move, because my
change turned two tests outside that list red:

- `packages/types/src/__tests__/page-actions-refusal-7926.test.ts`: its
LIT CONTROL scans `guide/layout.md` for a `page-header` JSON fence with
`actions`. Its own comment says it is really looking for the action-id
channel of `page:header`. It now looks for `page:header` with
`properties.actions`. This is the same defect class as this card (the
alias taught as the header's key), in a test that reads the guide.
- `examples/schema-catalog/test/form-control-dom-leak-5632.test.tsx`:
`NODE_CENSUS.button` goes from 118 to 116, because the demo's two
buttons left the catalog. This is the catalog-authored case the table's
header permits, recorded in the table's own format.
- `.changeset/3906-page-header-canonical-docs.md`:
`check-changeset-presence` counts any file under a released package's
`src/`, and the types test is one.

## Tests

Final union at `c79ae7497`, run after the last commit:

- `pnpm exec vitest run` over `examples/schema-catalog/`, every test the
`markdown-test-inputs` ledger lists as reading
`content/docs/guide/layout.md` or `content/docs/**`, the catalog-corpus
walkers, and the three `packages/layout` page-header tests: `Test Files
66 passed (66)`, `Tests 3136 passed (3136)`.
- Type-check, after building the closure: `pnpm --filter
@object-ui/example-schema-catalog type-check` and `pnpm --filter
@object-ui/types type-check` both exit 0. `--listFilesOnly` confirms all
three changed tests are in those programs.
- `check-doc-snippet-types`: exit 0, "Every covered documentation
snippet compiles against the built types." `check-doc-example-types`:
exit 0.
- `check-doc-component-types`: exit 0, "Every documented component type
is registered."
- `check-doc-fence-languages`, `check-doc-example-ids` ("414 real
reference(s) all resolve"), `check-doc-example-shared-reader` and
`check-doc-links` ("Links are valid across 17 scan roots."): all exit 0.
- `check-control-bytes` and `check-new-cross-file-line-citations` ("0
new citation(s)"): exit 0.
- `check-changeset-presence` (empty frontmatter, "a complete answer to
this gate"), `check-changeset-no-major`, `check-changeset-claims`,
`check-pending-changeset-literals`, `check-changeset-fixed`: all exit 0.
- `regenerate-catalog-index.py --check`: exit 0.
- `eslint --no-inline-config` on the four changed code files: 0 errors,
0 warnings. The `.md`, `.mdx`, `.json` and changeset files match no
eslint configuration, so they are not linted. The config has no
type-aware linting (no `projectService` or `parserOptions`), so this
diff cannot change the verdict on any untouched file.
- **Reverse check** (one-off, nothing left in the tree), run with
`ablation-replace.mjs`:
- The mutation re-keyed the demo's `"type": "page:header"` back to
`"type": "page-header"`. The anchor went from 1 hit to 0 and the blob
changed.
- `pageheader-with-actions.test.tsx` turned red: 7 failed, 16 passed.
The failures were the shape, render, styling and mirror pins, plus three
controls built on the demo.
  - Restore: blob equals HEAD and `git diff HEAD` is empty.
- Two demo pins do not look at `type` and stayed green: the spec row's
full parse and the declared-inputs check.

## Acceptance notes (observations, not filed)

- **Stale comments on the alias's `icon` input.** Two comments give "the
docs page publishes the prop, and the docs page's only live demo writes
`icon: users`" as reasons to keep that input: one in
`packages/layout/src/index.ts`, one in
`packages/layout/src/__tests__/page-header-authorable-keys.test.tsx`.
After this PR both clauses are false. The objectui#3829 ruling itself
still holds, because the alias renderer really draws the icon. The same
test file also says the manifest pins run on "the real demo JSON"; they
now run on an inline fixture that is that former demo JSON word for
word. Nothing reads these comments. Carrier: whoever next touches the
alias registration.
- **Stale reason text in the version ledger.** The `doc-version-claims`
row for `guide/layout.md` quotes the icon tombstone as "(objectstack-ai#6946, ADR-0087
D2)". The guide now quotes the installed spec's message exactly,
"(ADR-0087 D2)". The ledger's claim key, `@objectstack/spec 17.0.0`,
still matches, so the test is green; only the row's reason text is out
of date.
- `sdui-parser`'s `validateTree` has no concept of the `properties` bag,
so a `page:header` node spelled the spec's way gets `unknown-prop
"properties"` there. The JSX tier writes attributes, so no author hits
this today. The demo test validates the node in its post-move shape and
says why.
- objectui's `safeValidateSchema` refuses `page-header` and
`layout:page-header` at `type` (`invalid_union`), exactly as it refuses
an unknown type, so the old demo never validated there. Retiring the
alias is not this card.

## Out-of-scope findings (for the seat to file; not filed here)

- **(c)** `content/docs/guide/slotted-pages.md`, "Example: customize
only the header", writes `eyebrow: 'ACCOUNT'` and `icon: 'building-2'`
under `page:header` `properties`. objectui's `safeValidateSchema`
rejects that exact node: `properties.icon: invalid_type` and
`properties: unrecognized_keys [eyebrow]`. The same node without those
two keys validates.
- **(b)** `PageHeaderProps.breadcrumb` is described as "Show breadcrumb"
and defaults to `true`. `PageHeaderRenderer` renders only an empty
element marked `data-page-breadcrumb-slot` and draws no trail. Measured
through a real `SchemaRenderer` render, in both the bare and record
layouts.

Session: `https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec`

---
_Generated by [Claude
Code](https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation Improvements or additions to documentation package: components plugin tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-derived related lists consume the new field-level relatedListFilter declaration — list query AND-composed, tab badge honors the same filter

1 participant