From 24e4843dd8b7dd3a44b3b9b5f9f342b43b5e6568 Mon Sep 17 00:00:00 2001 From: os-zhuang Date: Fri, 3 Jul 2026 10:44:52 +0800 Subject: [PATCH] docs(spec): scrub stale compactLayout teachings + orphaned defaultDetailForm JSDoc (ADR-0085 remnants) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to the ADR-0085 hand-written docs sweep (#2529) — these two remnants live in code and regenerate into docs: - RecordDetailsProps layout/fields descriptions taught the deprecated compactLayout name; now teach the canonical highlightFields (compactLayout remains a supported alias). Regenerated react-blocks contract + reference md. - Removed an orphaned JSDoc block for defaultDetailForm in object.zod.ts — the prop was never implemented and was removed from the spec in #2402. Doc-text only; no schema shape or behavior change. Co-Authored-By: Claude Fable 5 --- .changeset/adr-0085-code-doc-remnants.md | 14 ++++++++++++++ packages/spec/src/data/object.zod.ts | 11 ----------- packages/spec/src/ui/component.zod.ts | 4 ++-- .../contracts/react-blocks.contract.json | 4 ++-- skills/objectstack-ui/references/react-blocks.md | 4 ++-- 5 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 .changeset/adr-0085-code-doc-remnants.md diff --git a/.changeset/adr-0085-code-doc-remnants.md b/.changeset/adr-0085-code-doc-remnants.md new file mode 100644 index 0000000000..68cad730a9 --- /dev/null +++ b/.changeset/adr-0085-code-doc-remnants.md @@ -0,0 +1,14 @@ +--- +'@objectstack/spec': patch +--- + +Clean up two stale code-side doc remnants found during the ADR-0085 docs sweep (#2529): + +- `RecordDetailsProps` (ui/component.zod.ts) `layout`/`fields` descriptions taught the + deprecated `compactLayout` name — now teach the ADR-0085 canonical `highlightFields` + (`compactLayout` remains a supported alias). Regenerated + `skills/objectstack-ui/{contracts/react-blocks.contract.json,references/react-blocks.md}`. +- Removed an orphaned JSDoc block in data/object.zod.ts describing `defaultDetailForm`, + a prop that was never implemented and was removed from the spec in #2402. + +Doc-text only; no schema shape or behavior change. diff --git a/packages/spec/src/data/object.zod.ts b/packages/spec/src/data/object.zod.ts index 3918f0458f..4b3083ad84 100644 --- a/packages/spec/src/data/object.zod.ts +++ b/packages/spec/src/data/object.zod.ts @@ -650,17 +650,6 @@ const ObjectSchemaBase = z.object({ listViews: z.record(z.string(), ListViewSchema).optional().describe('Built-in named list views (segmented tabs) shipped with the object schema'), /** - * Default FormView used when displaying a single record's detail page. - * - * Matches the named FormView under the same object's `ViewSchema.formViews`. - * When unset, the runtime falls back to the unnamed `form` view, then to - * an auto-generated layout. This is the Airtable-style "Interface form" - * binding — every record-detail screen renders through a FormView, so the - * same metadata drives both the public collection form and the operator's - * edit panel. - */ - - /** * Search Engine Config */ searchableFields: z.array(z.string()).optional().describe('Fields the `$search` query matches against (ADR-0061). Canonical default for the record picker, list quick-search and global search; views may narrow it. When unset, search auto-defaults to the name/title field plus short-text fields.'), diff --git a/packages/spec/src/ui/component.zod.ts b/packages/spec/src/ui/component.zod.ts index a05a87f8ca..2c236e1a9d 100644 --- a/packages/spec/src/ui/component.zod.ts +++ b/packages/spec/src/ui/component.zod.ts @@ -61,9 +61,9 @@ export const PageCardProps = z.object({ export const RecordDetailsProps = z.object({ columns: z.enum(['1', '2', '3', '4']).default('2').describe('Number of columns for field layout (1-4)'), - layout: z.enum(['auto', 'custom']).default('auto').describe('Layout mode: auto uses object compactLayout, custom uses explicit sections'), + layout: z.enum(['auto', 'custom']).default('auto').describe('Layout mode: auto uses object highlightFields, custom uses explicit sections'), sections: z.array(z.string()).optional().describe('Section IDs to show (required when layout is "custom")'), - fields: z.array(z.string()).optional().describe('Explicit field list to display (optional, overrides compactLayout)'), + fields: z.array(z.string()).optional().describe('Explicit field list to display (optional, overrides highlightFields)'), /** ARIA accessibility */ aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'), }); diff --git a/skills/objectstack-ui/contracts/react-blocks.contract.json b/skills/objectstack-ui/contracts/react-blocks.contract.json index 85dfa2fa92..f94ddc3b72 100644 --- a/skills/objectstack-ui/contracts/react-blocks.contract.json +++ b/skills/objectstack-ui/contracts/react-blocks.contract.json @@ -396,7 +396,7 @@ "type": "'auto' | 'custom'", "kind": "data", "required": true, - "description": "Layout mode: auto uses object compactLayout, custom uses explicit sections" + "description": "Layout mode: auto uses object highlightFields, custom uses explicit sections" }, { "name": "sections", @@ -410,7 +410,7 @@ "type": "string[]", "kind": "data", "required": false, - "description": "Explicit field list to display (optional, overrides compactLayout)" + "description": "Explicit field list to display (optional, overrides highlightFields)" } ] }, diff --git a/skills/objectstack-ui/references/react-blocks.md b/skills/objectstack-ui/references/react-blocks.md index 326714fe28..0325419b84 100644 --- a/skills/objectstack-ui/references/react-blocks.md +++ b/skills/objectstack-ui/references/react-blocks.md @@ -89,9 +89,9 @@ Field-detail panel for the bound record. Config props from the spec RecordDetail | `objectName` | `string` | binding | | The record’s object. | | `recordId` | `string \| number` | controlled | | The record to show. | | `columns` | `'1' \| '2' \| '3' \| '4'` | data | ✓ | Number of columns for field layout (1-4) | -| `layout` | `'auto' \| 'custom'` | data | ✓ | Layout mode: auto uses object compactLayout, custom uses explicit sections | +| `layout` | `'auto' \| 'custom'` | data | ✓ | Layout mode: auto uses object highlightFields, custom uses explicit sections | | `sections` | `string[]` | data | | Section IDs to show (required when layout is "custom") | -| `fields` | `string[]` | data | | Explicit field list to display (optional, overrides compactLayout) | +| `fields` | `string[]` | data | | Explicit field list to display (optional, overrides highlightFields) | ## `` — `record:highlights`