Uh oh!
There was an error while loading. Please reload this page.
refactor(console): retire the dormant object-detail page factory and its seven widgets - #4365
Merged
Merged
Conversation
…its seven widgets (#3731) (#3736) `buildObjectDetailPageSchema()` had zero callers: its only consumer, the registry-driven `MetadataDetailPage`, was deleted when the console moved onto the metadata-admin engine, and the factory outlived it as unreachable code. The seven widgets it fed were still registered in `ComponentRegistry` at startup, reachable in principle by any schema naming those types and in practice by none — nothing in the repository produces one. That unreachability is also why 60 lines of hardcoded Chinese UI copy sat in `objectDetailWidgets.tsx` (56) and `ObjectDetailTabsWidget.tsx` (4) against the English-only rule with no gate seeing them: the strings are bare literals, never `t()` keys, and all three i18n gates judge keys. Maintainer ruling of 2026-08-11 on both cards: REMOVE. - Deleted: schemas/objectDetailPageSchema.ts, components/schema/{objectDetailWidgets, ObjectDetailTabsWidget,ObjectFieldDesignerWidget}.tsx, registerObjectDetailWidgets.ts, and the main.tsx registration import. - packages/react/src/hooks/usePageAssignment.ts: the must-NOT-match comment named the deleted factory. The guard is unchanged (comment only); the reference is reworded to the `PageType` history it actually documents. - Guide sync: console-development.md's bespoke-editor recipe now points at the live specimen (PermissionMatrixEditPage), with both names recorded in the "Retired names" table; the companion eval's dangling pointer is retargeted. Fixes#3731Fixes#3736
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 22:19
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 11, 2026
Closed
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#3731
Fixes#3736
The ruling
Maintainer ruling of 2026-08-11, recorded on #3736 and quoted verbatim:
Zero-caller evidence, re-measured at this branch point (
ca269fecd)Three hits, zero calls: the definition, its own docblock example, and one comment. Unchanged from the three HOLD re-verifications on the cards, so the ruling's premise had not drifted.
The seven registered widget types were then swept individually across the whole tree rather than only
.ts/.tsx— every hit lands inside the deleted files, the guide, or CHANGELOG history. No fixture, snapshot, test or e2e file names one, so there was no consumer hiding behind a type string.CJK counts re-measured at the same point: 56 lines in
objectDetailWidgets.tsxand 4 inObjectDetailTabsWidget.tsx— the 60 the ruling names.Deleted
apps/console/src/schemas/objectDetailPageSchema.tsapps/console/src/components/schema/objectDetailWidgets.tsxapps/console/src/components/schema/ObjectDetailTabsWidget.tsxapps/console/src/components/schema/ObjectFieldDesignerWidget.tsxapps/console/src/components/schema/registerObjectDetailWidgets.tsComponentRegistry.register()callsBoth directories (
schemas/andcomponents/schema/) held nothing else and are gone.main.tsx's registration import went with them.ObjectFieldDesignerWidget.tsxis not named on either card, so to be explicit: it is registered only by the deletedregisterObjectDetailWidgets.tsand referenced only by the deletedObjectDetailTabsWidget.tsx. Keeping it would have left a file with zero importers — it is inside the chain the dispatch says to delete whole, not an extension of scope.Collateral edits
packages/react/src/hooks/usePageAssignment.ts— comment only, guard untouched. The must-NOT-match comment named the deleted factory, and it was already stale before this PR: the factory emittedpageType: 'record', not'record_detail', having been changed whenrecord_detailwas dropped fromPageTypein framework#2265. Reworded to the history it actually documents. The filter itself (pt === 'record') is byte-identical.skills/objectui/guides/console-development.md— the chapter positioning the factory as the bespoke-editor recipe is retargeted at the live specimen (PermissionMatrixEditPage, registered inpackages/app-shell/src/services/builtinComponents.tsx), and both retired names are recorded in the "Retired names" table following its existing row convention. The rows cite the issue numbers rather than a commit hash, since a squash-merge hash is not knowable at authoring time and docs(skills): console-development.md 的「Retired names」表称 config/metadataTypeRegistry.ts「从未存在过」—— git 可证它确实以该路径落过地(d601ef693 加入 / ff9a0d9e9 删除) #3859's lesson is that these claims must be git-accurate. "Extending object management" was a 4-step recipe in which every step named a deleted file; it now points at thetype: 'object'registry override, verified live atbuiltinComponents.tsx:61.skills/objectui/evals/console-development.json— eval 2'sexpected_outputtold the reader to mirror the two deleted files. Retargeted to the live specimen; its assertions were already on live APIs and are unchanged..changeset/retire-object-detail-factory-3731-3736.md—@object-ui/consolepatch.apps/console/src/**is guarded bycheck-changeset-presence.mjs(console is in thefixedgroup), and the gate confirms the declaration.Verification
pnpm --filter '@object-ui/console^...' --filter '@object-ui/react^...' buildturbo run type-check --filter=@object-ui/console --filter=@object-ui/reactpnpm exec vitest run apps/console/ packages/react/pnpm exec vitest run …/inspectors/__tests__/nav-target.test.tsusePageAssignmentturbo run lint --filter=@object-ui/console --filter=@object-ui/reactno-explicit-anywarnings)node scripts/check-skills-paths.mjsnode scripts/check-control-bytes.mjscheck-changeset-presence.mjs/check-changeset-no-major.mjscheck-skills-paths, both changeset gates)No test pinned the registration count or any widget type, so the deletion needed no pin updates — that absence was measured, not assumed.
Reverse verification is the zero-consumer evidence plus the green ladder after deletion, as the dispatch specifies. The residual-reference sweep after deleting confirms the only surviving mentions of the deleted symbols are the intentional ones (the "Retired names" rows, the chapter's blockquote, this changeset, and CHANGELOG history); and no
object-detail-tabs/object-properties/object-field-designer/object-relationships/object-keys/object-data-experience/object-data-previewregistration remains anywhere in the tree.Note for triage — observed, not acted on
#3731's own ruling comment does not describe this card: its text rules on removing "the second
mergeViewsIntoObjectsin@object-ui/core", which is a different finding. #3736's ruling names objectui#3731 as the factory's pair card and the dispatch is the factory retirement, so this PR follows that reading; nothing aboutmergeViewsIntoObjectsis touched here. Flagging it so the mis-recorded ruling text can be corrected on the card rather than silently inherited by whoever reads #3731 next.Generated by Claude Code