Repository navigation
refactor(plugin-grid): move ObjectGrid's module-level helpers into sibling modules (slice 1) - #26323
Merged
Merged
Conversation
…bling modules (slice 1) Move-only: the query helpers, column helpers and emit types, the link cell, the fallback translations, the display defaults and the row-version helpers leave ObjectGrid.tsx verbatim for six sibling modules. ObjectGrid.tsx imports them back and re-exports every name it exported before. Claude-Session: https://claude.ai/code/session_01Bdrd2yH4eqnz2QobtN3haE Co-authored-by: Claude <noreply@anthropic.com>
…the ObjectGrid helpers split The registry artefact is byte-identical (sha256 1f6e1ccb…); only plugin-grid's source digest moves, because six new source files joined the package. Claude-Session: https://claude.ai/code/session_01Bdrd2yH4eqnz2QobtN3haE Co-authored-by: Claude <noreply@anthropic.com>
Exported from objectGridQuery.ts, it became a shared reader for check:doc-example-readers, which then flagged the @example in core's record-source.ts. Left where it was, unexported, the gate reads the tree exactly as on main. Still move-only. Claude-Session: https://claude.ai/code/session_01Bdrd2yH4eqnz2QobtN3haE Co-authored-by: Claude <noreply@anthropic.com>
…keeping getDataConfig in place Claude-Session: https://claude.ai/code/session_01Bdrd2yH4eqnz2QobtN3haE Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
席位核对 · ACCEPT · seat
|
This was referenced Oct 26, 2026
Merged
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.
Requested by Steve · project thread
Part of #25994 (slice 1 of the move-only split; the card stays open for the later slices).
Clause-②: no
Metadata-protocol: none
What moved
Base
69aa630b. This slice moves module-level helpers, types and constants, verbatim, out ofui/packages/plugin-grid/src/ObjectGrid.tsxinto six sibling modules:objectGridQuery.ts:AuthoredGridFilters,HeldGridFilters,resolveGridFilters,useResolvedGridFilters,findParamsSignatureobjectGridColumns.ts:CHIP_FIELD_TYPES,isChipFieldType,resolveColumnLabel,normalizeColumns, and the column emit types with their docblocks (RetiredListColumnKey,ObjectGridColumnHolds,ObjectGridRetiredOptionsTombstone,ObjectGridColumnDraft,ObjectGridColumn)objectGridLinkCell.tsx:LINK_CELL_CLASS,LINK_CELL_CLASS_WRAP,rowRecordId,LinkCell,recordPointerFaceobjectGridTranslations.ts:GRID_DEFAULT_TRANSLATIONS,useGridTranslationobjectGridDefaults.ts:RowHeightMode,resolveRowHeightMode,readSpecDisplayPageSize,DEFAULT_DISPLAY_PAGE_SIZE,DEFAULT_FETCH_BATCH_SIZE,DEFAULT_SELECTION_TYPE,readAuthoredPageSize,isUsablePageSize,resolvePageSize,describeNonPositivePageSize,NO_GROUPING_REFUSALobjectGridRowVersion.ts:OCC_TOKEN_FIELD,rowVersionOf,WrittenRowVersion,rowVersionToSend,RowConflictChoice,BatchSaveOutcome898 lines move.
ObjectGrid.tsxgoes from 7689 to 6781 lines. Names the component still reads gain theexportkeyword in their new module.ObjectGrid.tsximports them back and re-exports the four column emit types it exported before (RetiredListColumnKey,ObjectGridColumnHolds,ObjectGridColumnDraft,ObjectGridColumn), so every name it exported is still importable from the same path. The package entry (index.tsx) is untouched. The import specifiers whose only readers moved now live in the new modules. No identifier is renamed, no logic or DOM changes, and no new name is exported fromObjectGrid.tsx.Move-only proof: the multiset of non-blank lines of the base
ObjectGrid.tsxequals the newObjectGrid.tsxplus the six modules (each module's header comment dropped, addedexportkeywords normalised). Nothing is missing. The only other lines are import lines and the one type re-export line.What stays in
ObjectGrid.tsxon purposeTemporalGroupFace,temporalGroupHeading): list grid: a date column mixes relative and absolute formats in the same column ("昨天 / 3天前 / 7天前 / 9月25日 / 2025年9月20日"), so a sorted column cannot be read as sorted #25884 is editing it.parseSchemaSort(and its siblingtoOrderByClause):gridArrayArmOrderby-8973.test.tsxreadsObjectGrid.tsxand assertsexport function parseSchemaSortis in it.ObjectGridComponentPropsamong them:bulkExecutorDataSourceFace-9722.test.tsassertsexport interface ObjectGridComponentPropsis in the file.RemoveIndexSignature,DeclaredDataTableSchema,ObjectGridDataTableSchemaHolds,ObjectGridDataTableSchema):cellClassNameCensusProse-6921.test.tsreads the census prose in their docblock fromObjectGrid.tsx.FooterSummaryReport.getDataConfig, kept file-local as onmain(commit 2978029). Exported from a module, it becomes a shared reader forcheck:doc-example-readers, which then flags core'srecord-source.ts@example.Re-pointing those scans would be a test-logic edit, which this card does not allow without the seat's word, so this slice leaves them where they are.
Test edits
None.
Verification
Run on head
fe3087e5, before the merge ofmain:pnpm --dir ui exec vitest run packages/plugin-grid/ --maxWorkers=2, the whole package suite: 251 of 251 files and 2247 of 2247 tests passed on the base files, and the same 251 / 2247 passed after the move.ObjectGrid.tsx, plusraw-key-call-sites-3546anddefaults-maps-mirror-en-pack): 52 of 52 files, 2257 of 2257 tests passed.pnpm --filter @object-ui/plugin-grid type-checkexit 0;tsc --listFilesincludes all seven files.node scripts/gen-sdui-manifest-node.mjs: the manifest is byte-identical (sha2561f6e1ccb…); onlyscripts/sdui-manifest.sources/plugin-grid.jsonis re-recorded (38 to 44 sources).node scripts/pm/dispatch-gates.mjs --commands: 41 derived gates, all exit 0;--ranreconciles 41 of 41.After merging
main(f00cbe36, 11 commits, none inObjectGrid.tsx):check-sdui-manifestis green and the Console builds. The full readings are in the os-dev-report comment on the card.Acceptance notes
ObjectGrid.tsx(for example the column emit docblock's "generateColumns()below"). It is kept verbatim because the slice is move-only.objectGridLinkCell.tsxexportsrowRecordIdandrecordPointerFacebeside theLinkCellcomponent, so eslint'sreact-refresh/only-export-componentswarns twice there. It is a warning, not an error.Landing
This enqueues only after #25884 merges. Expect a merge of
mainand a re-record ofplugin-grid.jsonbefore it lands. Changed lines are about 2,000, under the 3,000 line limit.Changeset:
.changeset/25994-objectgrid-helpers-split.md(patch,@object-ui/plugin-grid).Generated by Claude Code