Uh oh!
There was an error while loading. Please reload this page.
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 intoAug 18, 2026
Conversation
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-support-ai
marked this pull request as ready for review
August 18, 2026 23:45
Uh oh!
There was an error while loading. Please reload this page.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#5102
ObjectViewSchema.tableis documented as inheriting fromObjectGridSchema, butObjectViewdoes 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:pageSizepagination(PaginationConfig)selectableselection(SelectionConfig)defaultFiltersfilterdefaultSortsortSo an author who wrote the shape the type recommends —
table: { pagination: { pageSize: 25 } }, having just read@deprecated Use pagination.pageSize insteadon 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 onObjectGridSchema,ObjectGridalready 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:
Accordingly
packages/types/src/objectql.tsis not touched:tableis stillPartial< Omit< ObjectGridSchema, 'type' | 'objectName' > >, still collapsed to a bare index signature byBaseSchema, 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'sorigin/main@bc2922a82before editing: the canonical keysschema.table?.pagination/?.selection/?.filter/?.sortwere 0 hits each; counter-probeschema.table?.fieldswas 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:
:603-608$filter/$orderby) for kanban / gallery / calendar / timeline / gantt / map:1041-1073gridSchema, handed toObjectGrid:1163-1173mergedFilters/mergedSort, handed to the delegatedrenderListViewschemaPrecedence: 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:So on the grid path the fix is forwarding, not translation: both slots are emitted and
ObjectGridarbitrates. Re-resolving the pair insideObjectViewwould have put two layers in a position to disagree, and synthesising apaginationobject out of a legacypageSizewould have flippedObjectGrid'spaginationEnabled(schema.pagination !== undefined ? true : …) for every view that only ever wrote the deprecated key. WhereObjectViewdoes resolve the pair itself (clusters A and C) the same canonical-first order is written into the||chains.Two details worth reviewing:
tableare untouched.currentNamedViewConfig?.X, thenactiveView?.X, then thetablesegment — only the last is extended.tablesegment 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 —ObjectGridlowers the canonical one throughtoFilterNodeand raw-assigns the legacy one, so moving it would change the wire shape of a path this card does not own. Forwardingtable.filterunconditionally 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 thetablesegment; and the fact that no canonical value is synthesised when only the alias is written.Reverse verification (predicted before running, then observed):
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.tsxwas restored fromorigin/mainwith 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 fromsrc, never fromdist.Verification, all on
c2648b494(the final commit)Downstream:
@object-ui/app-shelltype-check is green after building the dependency closure (pnpm --filter '@object-ui/app-shell^...' build). Before that build it reportsTS2307on@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 … vitestsilently runs the console package's suite instead (objectui#3378).Deliberately out of scope
table.columnson the grid path only — kanban/gallery/calendar and the delegated renderer readtable.fieldsalone, so a canonicaltable: { columns: [...] }yields an empty field list #5269 —table.columnsis forwarded on the grid path only; the non-grid and delegated paths readtable.fieldsalone, sodefaultViewType: 'kanban'withtable: { columns: [...] }still yields an empty field list. Re-verified onbc2922a82and filed with the exact one-line diff, plus a third read point the original note did not list.columnsis not among the four keys the ruling names. Separable, and confirmed so: this PR never touched those twofields:lines and did not rewritebaseProps, so no fork arose.sortarray is forwarded intogridSchema.defaultSort, declared a SINGLE{ field, order }— ObjectGrid re-wraps it andparseSchemaSortdrops it, so the grid shows no sort at all #5270 — a named view'ssortarray is forwarded intogridSchema.defaultSort, which is declared a single{ field, order };ObjectGridre-wraps it andparseSchemaSortskips the nested entry, so the grid shows no sort at all. Pre-existing on both sides of this diff, and it lives entirely in the two segments the card ruled out of bounds. Current behaviour is pinned here as explicitly unchanged; that pin should be updated, not deleted, by whoever takes it.tablekeys again (pagination/selection/filter/sort) now that they take effect #5271 — the docs follow-through the ruling asked for: the pages PR docs(plugin-view): README 的 13 个 schema 示例按 ObjectView 真读的键面重写 #5101 wrote to teach the deprecated spellings can teach the canonical keys again. Filed rather than ridden on this PR, per the ruling.$orderby: sort原样透传,归一化外包给了某一个 adapter #4869 (finding, open) — the non-grid path passes$orderbythrough without the shared sort sink. It quotes cluster A, which this PR extends but does not normalise, so it remains accurate as written and stays open.Generated by Claude Code
Generated by Claude Code