Skip to content

refactor(plugin-grid): move ObjectGrid's module-level helpers into sibling modules (slice 1) - #26323

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-mbvzks
Oct 26, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-mbvzks

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

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 of ui/packages/plugin-grid/src/ObjectGrid.tsx into six sibling modules:

  • objectGridQuery.ts: AuthoredGridFilters, HeldGridFilters, resolveGridFilters, useResolvedGridFilters, findParamsSignature
  • objectGridColumns.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, recordPointerFace
  • objectGridTranslations.ts: GRID_DEFAULT_TRANSLATIONS, useGridTranslation
  • objectGridDefaults.ts: RowHeightMode, resolveRowHeightMode, readSpecDisplayPageSize, DEFAULT_DISPLAY_PAGE_SIZE, DEFAULT_FETCH_BATCH_SIZE, DEFAULT_SELECTION_TYPE, readAuthoredPageSize, isUsablePageSize, resolvePageSize, describeNonPositivePageSize, NO_GROUPING_REFUSAL
  • objectGridRowVersion.ts: OCC_TOKEN_FIELD, rowVersionOf, WrittenRowVersion, rowVersionToSend, RowConflictChoice, BatchSaveOutcome

898 lines move. ObjectGrid.tsx goes from 7689 to 6781 lines. Names the component still reads gain the export keyword in their new module. ObjectGrid.tsx imports 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 from ObjectGrid.tsx.

Move-only proof: the multiset of non-blank lines of the base ObjectGrid.tsx equals the new ObjectGrid.tsx plus the six modules (each module's header comment dropped, added export keywords normalised). Nothing is missing. The only other lines are import lines and the one type re-export line.

What stays in ObjectGrid.tsx on purpose

  • The group-heading date region (TemporalGroupFace, 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 sibling toOrderByClause): gridArrayArmOrderby-8973.test.tsx reads ObjectGrid.tsx and asserts export function parseSchemaSort is in it.
  • The public props types, ObjectGridComponentProps among them: bulkExecutorDataSourceFace-9722.test.ts asserts export interface ObjectGridComponentProps is in the file.
  • The schema-slot types (RemoveIndexSignature, DeclaredDataTableSchema, ObjectGridDataTableSchemaHolds, ObjectGridDataTableSchema): cellClassNameCensusProse-6921.test.ts reads the census prose in their docblock from ObjectGrid.tsx.
  • The relational-copy-set docblock and FooterSummaryReport.
  • getDataConfig, kept file-local as on main (commit 2978029). Exported from a module, it becomes a shared reader for check:doc-example-readers, which then flags core's record-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 of main:

  • 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.
  • 52 test files outside plugin-grid that read sources (every test naming plugin-grid that scans source, every test spelling ObjectGrid.tsx, plus raw-key-call-sites-3546 and defaults-maps-mirror-en-pack): 52 of 52 files, 2257 of 2257 tests passed.
  • pnpm --filter @object-ui/plugin-grid type-check exit 0; tsc --listFiles includes all seven files.
  • eslint on the seven files: 0 errors.
  • node scripts/gen-sdui-manifest-node.mjs: the manifest is byte-identical (sha256 1f6e1ccb…); only scripts/sdui-manifest.sources/plugin-grid.json is re-recorded (38 to 44 sources).
  • node scripts/pm/dispatch-gates.mjs --commands: 41 derived gates, all exit 0; --ran reconciles 41 of 41.

After merging main (f00cbe36, 11 commits, none in ObjectGrid.tsx): check-sdui-manifest is green and the Console builds. The full readings are in the os-dev-report comment on the card.

Acceptance notes

  • Some moved prose still says "below" or "above", or "this file", about code that stays in ObjectGrid.tsx (for example the column emit docblock's "generateColumns() below"). It is kept verbatim because the slice is move-only.
  • objectGridLinkCell.tsx exports rowRecordId and recordPointerFace beside the LinkCell component, so eslint's react-refresh/only-export-components warns twice there. It is a warning, not an error.

Landing

This enqueues only after #25884 merges. Expect a merge of main and a re-record of plugin-grid.json before 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

…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>
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tooling labels Oct 26, 2026
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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT · seat domain:ui#1 · 2026-10-26T21:59Z

Head 8fe81ee9 (read from the PR object).

Landing: ready + auto-merge through the relay.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 26, 2026 22:00
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 26, 2026 22:00
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 7158025 Oct 26, 2026
69 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-mbvzks branch October 26, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants