refactor(spec-bridge): derive list-view bridge types from @objectstack/spec/ui (#2231 follow-up)#2636
Merged
Conversation
…k/spec/ui (#2231 follow-up) Retires the third hand-written copy of the ListView shape: the local ListViewSpec/ListColumn interfaces in the SpecBridge's list-view bridge are replaced by Partial<ListView> and ListColumn imported from @objectstack/spec/ui, so the bridge input can no longer drift from the protocol. Behavior fix surfaced by the real types: spec `columns` is string[] | ListColumn[], but the old local interface only admitted ListColumn[] — a bare field-name column would have mapped to a broken { accessorKey: undefined }. String columns now map to a default column ({ accessorKey: field, header: field }). Verified: full build 43/43, @object-ui/react type-check 0 errors, react suite 310 tests green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CBAuAYP5j1j5MguKYM84dW
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 17, 2026 12:05
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 free
to 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.
Summary
Follow-up to #2622 (issue #2231). That PR unified two of the three hand-written ListView copies (the zod schema and the TS interface in
@object-ui/types); this one retires the third: the SpecBridge's localListViewSpec/ListColumninterfaces inpackages/react/src/spec-bridge/bridges/list-view.ts.What changed
type ListViewSpec = Partial<ListView>withListView/ListColumnimported from@objectstack/spec/ui. The 60-line hand-written mirror is deleted, so the bridge can no longer drift from the spec.Partialkeeps the old semantics — every field was optional in the hand-written mirror too (including spec-requiredcolumns), and hosts routinely hand the bridge fragmentary view-configs.columnsisstring[] | ListColumn[], but the old local interface only admittedListColumn[]— a bare field-name column would have mapped to a broken{ accessorKey: undefined }. String columns now map to a default column ({ accessorKey: field, header: field }).Verification
@object-ui/reacttype-check: 0 errors.packages/reacttest suite (incl.SpecBridge.test.ts): 25 files, 310 tests passed.Remaining #2231 follow-ups (not in this PR)
show*→userActions,fields→columns,filters→filter); alignariato specAriaPropsSchema;objectName→data.provider:'object'; unifyFormViewSchema/ObjectViewSchemaetc.🤖 Generated with Claude Code
Generated by Claude Code