Skip to content

fix(plugin-view): ObjectView forwards the canonical table keys — pagination/selection/filter/sort take effect, legacy spellings stay working aliases (#5102) - #5274

Merged
os-support-ai merged 2 commits into
mainfrom
claude/issue-5102-objectview-canonical-key-forwarding
Aug 18, 2026
Merged

fix(plugin-view): ObjectView forwards the canonical table keys — pagination/selection/filter/sort take effect, legacy spellings stay working aliases (#5102)#5274
os-support-ai merged 2 commits into
mainfrom
claude/issue-5102-objectview-canonical-key-forwarding

Conversation

@claude

@claudeclaudeBot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Fixes#5102

ObjectViewSchema.table is documented as inheriting from ObjectGridSchema, but ObjectView does not spread it — it forwards a hand-written whitelist of keys. That whitelist carried only the deprecated half of four pairs, and their canonical successors had no read point at all in the file:

forwarded (deprecated)canonical successorread points before
pageSizepagination (PaginationConfig)0
selectableselection (SelectionConfig)0
defaultFiltersfilter0
defaultSortsort0

So an author who wrote the shape the type recommends — table: { pagination: { pageSize: 25 } }, having just read @deprecated Use pagination.pageSize instead on the key they were avoiding — got a view that compiled, read correctly, and did nothing. There was no failure signal at any layer: the key is declared on ObjectGridSchema, ObjectGrid already reads it, and only this forwarding hop dropped it on the floor. That silent success is the defect.

The ruling this implements

Maintainer, 2026-08-18, verbatim 「同意」, recorded on the card by the triage seat:

Ruled: direction 3 now, direction 1 deferred to the #5043 family track. Concretely: extend ObjectView's forwarding whitelist so the canonical keys (pagination / selection / filter / sort) take effect, keeping the legacy spellings (pageSize / selectable / defaultFilters / defaultSort) as working aliases — an author writing the canonical shape stops being silently ignored today. The explicit sub-config modeling (direction 1 — replacing the collapsed Omit with real interfaces) and any index-signature surgery (direction 2) belong to the #5043 structural track and are ⛔ not to be attempted inside this card.

Accordingly packages/types/src/objectql.ts is not touched: table is still Partial< Omit< ObjectGridSchema, 'type' | 'objectName' > >, still collapsed to a bare index signature by BaseSchema, so editor completion still offers no keys and a misspelling is still silently accepted. That half stays with the structural track.

Premise re-verified

The card's line numbers had drifted (it cites :833-848 / :856-880 / :666). Re-measured on this branch's origin/main @ bc2922a82 before editing: the canonical keys schema.table?.pagination / ?.selection / ?.filter / ?.sort were 0 hits each; counter-probe schema.table?.fields was 4 hits, so the zero is a real reading rather than an unreachable path. Premise holds.

The forwarding is spread across three clusters, not the one the card quoted — all three are fixed, so the four keys behave the same on every path:

clustersitewhat it feeds
A:603-608the non-grid data fetch ($filter / $orderby) for kanban / gallery / calendar / timeline / gantt / map
B:1041-1073gridSchema, handed to ObjectGrid
C:1163-1173mergedFilters / mergedSort, handed to the delegated renderListView schema

Precedence: canonical wins — and on the grid path it was not mine to choose

ObjectGridalready reads both spellings of all four pairs, and already resolves them canonical-first:

schema.pagination?.pageSize ?? schema.pageSize ObjectGrid.tsx:2647
if (schema.selection?.type) … else if (schema.selectable !== undefined) ObjectGrid.tsx:2354
schemaFilter !== undefined ? … : schema.defaultFilters ObjectGrid.tsx:1098
schemaSort ?? (schema.defaultSort ? [schema.defaultSort] : undefined) ObjectGrid.tsx:2701

So on the grid path the fix is forwarding, not translation: both slots are emitted and ObjectGrid arbitrates. Re-resolving the pair inside ObjectView would have put two layers in a position to disagree, and synthesising a pagination object out of a legacy pageSize would have flipped ObjectGrid's paginationEnabled (schema.pagination !== undefined ? true : …) for every view that only ever wrote the deprecated key. Where ObjectViewdoes resolve the pair itself (clusters A and C) the same canonical-first order is written into the || chains.

Two details worth reviewing:

  • The two segments ahead of table are untouched.currentNamedViewConfig?.X, then activeView?.X, then the table segment — only the last is extended.
  • On the grid path the canonical slot deliberately carries the table segment only (filter: viewFilter ? undefined : schema.table?.filter). A named view's filter keeps riding the legacy slot it rides today, because the two slots are not interchangeable downstream — ObjectGrid lowers the canonical one through toFilterNode and raw-assigns the legacy one, so moving it would change the wire shape of a path this card does not own. Forwarding table.filter unconditionally would also let a table default outrank the view the user is looking at, inverting the precedence those two untouched segments exist to express. Both are pinned.

Tests

New: packages/plugin-view/src/__tests__/ObjectView.canonicalTableKeys.test.tsx — 26 tests. Each canonical key now takes effect; each deprecated spelling still works; the precedence when both are written; the guard that keeps a named view outranking the table segment; and the fact that no canonical value is synthesised when only the alias is written.

Reverse verification (predicted before running, then observed):

blocktestspredicted redobserved red
grid: canonical keys reach ObjectGrid666
grid: deprecated spellings still work500
grid: both spellings written111
grid: named view still outranks table200
non-grid fetch path755
delegated renderListView533
total261515

Predicted and observed match exactly, including which assertions stay green. The two blocks predicted to stay green are the point of the exercise: they pin behaviour this PR must not change. Method: the implementation was committed first, then packages/plugin-view/src/ObjectView.tsx was restored from origin/main with the new tests kept, run, and restored from the branch. No rebuild step is involved or claimed — the test reaches the subject through the relative import ../ObjectView, so it is compiled from src, never from dist.

Verification, all on c2648b494 (the final commit)

pnpm exec vitest run packages/plugin-view/ → 14 files, 153 tests passed
pnpm --filter @object-ui/plugin-view type-check → exit 0
pnpm --filter @object-ui/plugin-view lint → exit 0 (0 errors, 181 warnings, all pre-existing house style)
pnpm --filter @object-ui/plugin-view build → exit 0
pnpm run check:control-bytes → OK (4663 files)
pnpm run check:self-import → OK
pnpm run check:spec-symbols → OK

Downstream: @object-ui/app-shell type-check is green after building the dependency closure (pnpm --filter '@object-ui/app-shell^...' build). Before that build it reports TS2307 on @object-ui/auth / plugin-chatbot / plugin-list — stale-dist noise, unrelated to this change, recorded here so the next reader does not chase it.

Tests were run from the repo root per AGENTS.md; a package-level pnpm --filter … vitest silently runs the console package's suite instead (objectui#3378).

Deliberately out of scope

Generated by Claude Code


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

MetricValueBudget
Main entry (gzip)25.3 KB350 KB
Entry fileindex-MOebo0p4.js
StatusPASS

📦 Bundle Size Report

PackageSizeGzipped
app-shell (index.js)9.83KB3.70KB
app-shell (runtime-config.js)7.42KB2.32KB
app-shell (types.js)0.01KB0.04KB
app-shell (urlParams.js)8.92KB3.41KB
auth (AuthContext.js)0.31KB0.24KB
auth (AuthGuard.js)1.17KB0.53KB
auth (AuthProvider.js)29.33KB7.05KB
auth (AuthShell.js)3.49KB1.40KB
auth (ForgotPasswordForm.js)12.21KB3.45KB
auth (LoginForm.js)18.13KB5.39KB
auth (PreviewBanner.js)0.90KB0.50KB
auth (RegisterForm.js)6.64KB2.21KB
auth (SocialSignInButtons.js)9.60KB3.89KB
auth (UserMenu.js)3.40KB1.22KB
auth (auth-gate-events.js)1.29KB0.66KB
auth (authStyles.js)5.04KB1.72KB
auth (createAuthClient.js)40.21KB10.79KB
auth (createAuthenticatedFetch.js)6.34KB2.43KB
auth (index.js)2.71KB1.22KB
auth (invitation-status.js)1.22KB0.70KB
auth (org-roles.js)6.66KB2.78KB
auth (phone-identifier.js)1.11KB0.66KB
auth (types.js)0.59KB0.35KB
auth (useAuth.js)5.02KB0.88KB
auth (useIsWorkspaceAdmin.js)1.61KB0.85KB
collaboration (CommentThread.js)26.07KB7.56KB
collaboration (LiveCursors.js)3.17KB1.27KB
collaboration (PresenceAvatars.js)6.49KB2.64KB
collaboration (PresenceProvider.js)2.79KB1.13KB
collaboration (index.js)1.65KB0.73KB
collaboration (useCollaborationTranslation.js)6.05KB2.52KB
collaboration (useCommentSearch.js)1.98KB0.88KB
collaboration (useConflictResolution.js)7.75KB1.86KB
collaboration (useMentionNotifications.js)1.81KB0.68KB
collaboration (usePresence.js)6.33KB1.84KB
collaboration (useRealtimeSubscription.js)7.91KB2.01KB
components (index.js)506.17KB113.33KB
core (index.js)4.11KB1.62KB
create-plugin (index.js)10.08KB3.26KB
data-objectstack (index.js)159.03KB44.08KB
fields (index.js)237.07KB59.46KB
i18n (LocalizationContext.js)1.76KB0.96KB
i18n (currency.js)1.22KB0.64KB
i18n (i18n.js)4.28KB1.75KB
i18n (index.js)3.42KB1.39KB
i18n (pickLocalized.js)3.69KB1.73KB
i18n (provider.js)23.13KB7.63KB
i18n (useDisplayLocale.js)2.85KB1.45KB
i18n (useObjectLabel.js)29.43KB7.15KB
i18n (useSafeTranslation.js)7.77KB3.13KB
layout (index.js)39.16KB10.97KB
mobile (MobileProvider.js)0.92KB0.49KB
mobile (ResponsiveContainer.js)0.94KB0.38KB
mobile (breakpoints.js)1.51KB0.70KB
mobile (createOfflineDataSource.js)5.61KB1.74KB
mobile (index.js)1.50KB0.62KB
mobile (offlineQueue.js)3.91KB1.35KB
mobile (pwa.js)0.97KB0.49KB
mobile (serviceWorker.js)1.48KB0.62KB
mobile (serviceWorkerSource.js)3.41KB1.48KB
mobile (useBreakpoint.js)1.54KB0.65KB
mobile (useGesture.js)6.96KB1.98KB
mobile (useOfflineSync.js)1.99KB0.72KB
mobile (usePullToRefresh.js)2.53KB0.85KB
mobile (useResponsive.js)0.71KB0.42KB
mobile (useResponsiveConfig.js)1.36KB0.63KB
mobile (useSpecGesture.js)4.32KB1.64KB
mobile (useTouchTarget.js)1.01KB0.54KB
permissions (MePermissionsProvider.js)9.35KB3.31KB
permissions (PermissionContext.js)0.31KB0.25KB
permissions (PermissionGuard.js)0.89KB0.45KB
permissions (PermissionProvider.js)4.42KB1.42KB
permissions (evaluator.js)5.12KB1.74KB
permissions (index.js)0.91KB0.41KB
permissions (store.js)0.91KB0.42KB
permissions (useFieldPermissions.js)1.28KB0.52KB
permissions (usePermissions.js)1.81KB0.83KB
plugin-ai (index.js)15.75KB3.80KB
plugin-calendar (index.js)46.62KB12.83KB
plugin-charts (index.js)64.75KB18.37KB
plugin-chatbot (index.js)181.21KB43.14KB
plugin-dashboard (index.js)128.04KB32.75KB
plugin-designer (index.js)212.39KB42.83KB
plugin-detail (index.js)241.46KB60.56KB
plugin-editor (index.js)2.46KB1.10KB
plugin-form (index.js)123.77KB30.07KB
plugin-gantt (index.js)164.10KB39.87KB
plugin-grid (index.js)198.22KB53.27KB
plugin-kanban (index.js)52.93KB14.60KB
plugin-list (index.js)111.66KB27.13KB
plugin-map (index.js)19.96KB6.56KB
plugin-markdown (index.js)13.72KB4.69KB
plugin-report (index.js)42.84KB11.77KB
plugin-timeline (index.js)26.68KB7.66KB
plugin-tree (index.js)8.50KB2.88KB
plugin-view (index.js)84.34KB20.61KB
providers (DataSourceProvider.js)0.75KB0.39KB
providers (MetadataProvider.js)1.37KB0.59KB
providers (ThemeProvider.js)1.90KB0.85KB
providers (UploadProvider.js)11.66KB3.50KB
providers (index.js)0.44KB0.22KB
providers (types.js)0.01KB0.04KB
react-runtime (index.js)5.62KB2.34KB
react (LazyPluginLoader.js)3.77KB1.33KB
react (SchemaRenderer.js)31.56KB10.70KB
react (data-invalidation.js)5.05KB2.08KB
react (index.js)1.33KB0.69KB
react (schema-input.js)1.45KB0.83KB
react (spec-input.js)0.20KB0.18KB
sdui-parser (codegen.js)5.41KB2.34KB
sdui-parser (index.js)4.77KB2.16KB
sdui-parser (input-type.js)2.84KB1.40KB
sdui-parser (parse.js)10.76KB3.17KB
sdui-parser (provenance.js)3.66KB1.82KB
sdui-parser (types.js)0.29KB0.24KB
sdui-parser (validate.js)6.92KB2.40KB
types (ai.js)0.20KB0.17KB
types (api-types.js)0.20KB0.18KB
types (app.js)2.87KB0.99KB
types (base.js)0.20KB0.18KB
types (blocks.js)0.20KB0.18KB
types (complex.js)0.20KB0.18KB
types (crud.js)0.20KB0.18KB
types (dashboard-filter-alias.js)6.23KB2.74KB
types (data-display.js)0.20KB0.18KB
types (data-protocol.js)0.20KB0.19KB
types (data.js)0.20KB0.18KB
types (designer.js)1.87KB0.85KB
types (disclosure.js)0.20KB0.18KB
types (error-code.js)1.54KB0.88KB
types (feedback.js)0.20KB0.18KB
types (field-types.js)0.20KB0.18KB
types (form.js)0.20KB0.18KB
types (http-retry.js)4.32KB2.02KB
types (index.js)3.08KB1.53KB
types (layout.js)0.20KB0.18KB
types (managed-by.js)0.19KB0.18KB
types (mobile.js)2.59KB1.31KB
types (navigation.js)0.20KB0.18KB
types (objectql.js)0.20KB0.18KB
types (overlay.js)0.20KB0.18KB
types (permissions.js)0.20KB0.18KB
types (plugin-scope.js)0.20KB0.18KB
types (record-components.js)0.20KB0.19KB
types (record-semantics.js)1.28KB0.67KB
types (registry.js)0.20KB0.18KB
types (reports.js)0.20KB0.18KB
types (spec-report.js)5.05KB1.93KB
types (system-fields.js)3.33KB1.54KB
types (theme.js)0.20KB0.18KB
types (ui-action.js)3.40KB1.71KB
types (views.js)0.20KB0.18KB
types (widget.js)0.20KB0.18KB

Size Limits

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

@os-support-ai
os-support-ai marked this pull request as ready for review August 18, 2026 23:45
@os-support-ai
os-support-ai added this pull request to the merge queueAug 18, 2026
Merged via the queue into main with commit 20bc99fAug 18, 2026
22 checks passed
@os-support-ai
os-support-ai deleted the claude/issue-5102-objectview-canonical-key-forwarding branch August 18, 2026 23:45
os-support-ai pushed a commit that referenced this pull request Aug 19, 2026
…anded
Fixes#5271
objectui#5102 (PR #5274, merged) made ObjectView forward the canonical
`table.pagination` / `.selection` / `.filter` / `.sort` on every rendering
path, keeping `pageSize` / `selectable` / `defaultFilters` / `defaultSort` as
working aliases. The two docs pages PR #5101 (README) and PR #5109 (docs-site
mirror) wrote against the pre-#5102 reality — legacy-only — and now teach a
stale caveat. Re-teach the canonical spellings as the recommended form
without implying the legacy ones stopped working, and state the precedence
read directly off the landed `ObjectView.tsx` / `ObjectGrid.tsx`: canonical
wins when both are written; an active named view's own filter/sort still
outranks anything on `table`; `table.columns` stays out of scope (#5269,
still open, grid-path only).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

2 participants

@os-support-ai@claude