This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
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 #3731 Fixes #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
This was referenced Aug 11, 2026
Closed
akarma-synetal
pushed a commit
to akarma-synetal/objectui
that referenced
this pull request
Aug 17, 2026
…adata duplicates (objectstack-ai#4364, objectstack-ai#4368) (objectstack-ai#4410) Post-retirement dead-surface pair, both premises re-measured at 456aac8. objectstack-ai#4364 — `ObjectLevelPermission` is retired from `@object-ui/types` and the `@object-ui/permissions` re-export. Its only referents were its own definition and the two barrel lines; the wired home for object-scoped grants is `ObjectPermissionConfig.roles`, which declares its grant shape inline. The retirement note goes on that survivor, per the RoleDefinition convention from PR objectstack-ai#4366. `PermissionCondition` is KEPT — the card's premise ("only referent is ObjectLevelPermission.conditions") does not hold: it types the parameter of `evaluateCondition` in packages/permissions/src/evaluator.ts, under a 26-case suite. Its doc comment now records why it survived a sweep aimed at it. `PermissionEffect` is untouched; FieldLevelPermission.effect still reads it. objectstack-ai#4368 — the two console-local duplicates are deleted (410 lines, zero importers post-objectstack-ai#4365). Both had drifted behind the live app-shell copies they duplicate: the console converter never read the server's `reference` key, and the console service predates the objectstack-ai#4373 view cache-invalidation seam. The `@object-ui/plugin-designer` dependency is KEPT — it does not dangle; app-shell's DefaultAppContent, which the console renders, lazy-loads it for four live routes, so the console suite's vi.mock is load-bearing. Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3 Co-authored-by: Claude <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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