From 47c77c03b1983c13613095597db00e14fb4db158 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 19 Aug 2026 12:44:06 +0000 Subject: [PATCH] docs(fields): tombstone MasterDetailField as a form-unreachable orphan MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Re-derived on origin/main before writing this down: `fieldWidgetMap` has no key resolving to MasterDetailField (the `master_detail` key deliberately resolves to LookupField — the child-side FK must render as a single-value picker, not the widget's one-to-many list model). `registerField`/ `registerAllFields` only walk `fieldWidgetMap`'s keys, so no form path reaches it. Its only in-repo consumer is its own direct-render test (complex-widgets.test.tsx). Every future widgets/** audit (#3291 DOM leak sweep, #3318 aria-invalid ledger, #4788 readonly-plumbing scan — the class this card was filed from) re-discovers and re-investigates this component against its false denominator. The header comment lets auditors skip the file on sight. Disposition 1 (delete the widget + its public export) is a breaking change to a published surface and is explicitly out of scope here — left to the maintainer with the liveness evidence this tombstone documents. Fixes #4811 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE --- .changeset/master-detail-field-tombstone-4811.md | 9 +++++++++ packages/fields/src/widgets/MasterDetailField.tsx | 15 +++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .changeset/master-detail-field-tombstone-4811.md diff --git a/.changeset/master-detail-field-tombstone-4811.md b/.changeset/master-detail-field-tombstone-4811.md new file mode 100644 index 0000000000..853c188dc5 --- /dev/null +++ b/.changeset/master-detail-field-tombstone-4811.md @@ -0,0 +1,9 @@ +--- +--- + +Comment-only: `MasterDetailField` (`packages/fields/src/widgets/MasterDetailField.tsx`) +gains a header tombstone recording that it is absent from `fieldWidgetMap`, unreachable +from any form path (`master_detail` deliberately resolves to `LookupField`), and that its +only in-repo consumer is its own test — so future `widgets/**` audits (the #3291 / #3318 / +#4788 class) skip this file instead of re-discovering and re-investigating it each time +(objectui#4811). No behaviour, export, or public API changes. diff --git a/packages/fields/src/widgets/MasterDetailField.tsx b/packages/fields/src/widgets/MasterDetailField.tsx index 16175a6f9e..73258aee04 100644 --- a/packages/fields/src/widgets/MasterDetailField.tsx +++ b/packages/fields/src/widgets/MasterDetailField.tsx @@ -3,6 +3,21 @@ import { Button, Badge, cn } from '@object-ui/components'; import { Plus, X, ExternalLink } from 'lucide-react'; import { FieldWidgetComponentProps } from './types'; +// TOMBSTONE (objectui#4811): this widget is NOT in `fieldWidgetMap` +// (packages/fields/src/index.tsx) and is unreachable from any form path — +// `registerField`/`registerAllFields` only walk `fieldWidgetMap`'s keys, and +// the `master_detail` key there deliberately resolves to `LookupField`, not +// this component (see the comment above that map entry: the child-side FK +// must render as a single-value lookup picker, not the one-to-many list this +// widget models). Its only in-repo consumer is its own test +// (complex-widgets.test.tsx), which renders it directly and proves nothing +// about form reachability. It remains solely because its named export +// (`export * from './widgets/MasterDetailField'` in index.tsx) is a public +// API surface, and removing it is a breaking change left to the maintainer +// (see #4811). Auditors of `widgets/**` (the #3291 / #3318 / #4788 class of +// sweep): skip this file — it is a known, deliberate orphan, not a gap in +// your coverage. + /** * Master-Detail relationship data structure */