Uh oh!
There was an error while loading. Please reload this page.
refactor(list): converge ListViewBlock onto the shared ElementDataSourceGate - #4267
Merged
Merged
Conversation
…rceGate (#4038) ListViewBlock carried objectstack#5576's original inline copy of the dataSource precedence table; objectstack#6953 lifted the same table into @object-ui/react for the other eight object-bound blocks, leaving one table with two implementations. The private ~45-line useMemo mapping block and the hand-rolled status panels are deleted; the block now contributes only LIST_VIEW_DATA_SOURCE, the key names ListView reads. Semantics are unchanged in both directions: objectstack#5576's suite passes untouched, zero assertion edits, which is the card's acceptance criterion. New seam pins cover the mapping table key by key and the shared loading panel (never asserted by either implementation). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
yinlianghui
marked this pull request as ready for review
August 11, 2026 10:01
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 11, 2026
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#4038
ListViewBlockcarried objectstack#5576's original inline copy of thedataSourceprecedence table. objectstack#6953 lifted the same table into@object-ui/react(useElementDataSourceSchema/ElementDataSourceGate) for the other eight object-bound blocks, deliberately not touchingListViewBlock— refactoring already-merged code inside a wiring PR would have been an out-of-scope regression surface. That left one table with two implementations:list-viewon the private copy, everything else on the shared one. This PR deletes the private copy.What landed
The
useMemomapping block (~45 lines) and the two hand-rolled status panels are gone.ListViewBlocknow contributes only the part that is genuinely its own — the names of the keysListViewreads:exactly the shape the card proposed. The gate's mapping vocabulary supported it as-is —
columns/filter/sort/viewTypeare booleans and'pagination.pageSize'is already one of the threeElementDataSourceLimitKeyspellings — so the shared gate needed no change, additive or otherwise. The only edit underpackages/react/is a doc comment that this PR falsified: it saidListViewBlock"still carries its own copy... a change to the rules below belongs in both places", which stops being true here.The shared panels render with the
list-viewtestId prefix, solist-view-datasource-errorandlist-view-resolving-vieware unchanged down to the byte, and the error heading is passed through aserrorTitle(the original sentence, verbatim). The adapter bridge (#3144) is untouched: the block still resolves the adapter offSchemaRendererContextitself, becauseListViewneeds it as a prop and the gate cannot supply that.The acceptance criterion — the card's own tripwire
objectstack#5576's suite passes untouched, zero assertion edits. Mechanically:
and its 13 cases green, e.g.
Had any single case needed adapting, that would have meant the two implementations actually disagreed — a defect to re-grade, not a refactor detail to absorb — and this PR would not exist.
New pins, and what can actually turn them red
packages/plugin-list/src/__tests__/ListView.sharedGate.test.tsx(17 cases), split deliberately:list-viewelement:object, columns (including an authored-but-empty list counting as unauthored), the AND-composition of component + view + binding filters, both sort directions, the row cap landing onpagination.pageSize(and not on a flatlimit/pageSize),viewTypeonly when undeclared, and the unbound schema passing through by reference. These guard the five-line constant the refactor left behind, where a mistake is now cheap to make and invisible to review.The shared loading panel is asserted for the first time by either implementation —
list-view-resolving-viewpreviously appeared only in the block's own source.Reverse verification
Prediction was recorded before running: reverting
ListViewBlock.tsxto the private copy should turn the seam pins that read what the block hands the gate RED, while everything behavioural stays GREEN — because the two implementations are semantically identical, which is the card's whole premise.ListViewBlock.tsxConfirmed as predicted, then restored. Note the second row of that table is the interesting one: the behavioural pins passing against both implementations is empirical confirmation of the card's equivalence premise, not a gap in the pins.
Evidence
Baseline on
mainbefore the change:packages/plugin-list/was 25 files / 394 tests; after, 26 files / 411 (the 17 new cases). The card's "60 files / 826 cases" was measured pre-repo-split and does not match this tree's count in either direction — reporting what this tree actually runs.Build closure (
pnpm --filter '@object-ui/plugin-list^...' build) run first, so tsc read fresh.d.tsrather than stale artefacts. No i18n keys are involved: the panel copy is passed through as the original sentences, exactly as before.Changeset:
@object-ui/plugin-listpatch. Notskip-changeset(#3724) — this is package source, and the changeset records a refactor with no behaviour change in either direction.Generated by Claude Code