From d6378e44e5de0811305f53c1d9dfa03975b07503 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 24 Aug 2026 19:17:14 +0000 Subject: [PATCH] docs(fields): compile seventeen plaintext-fenced TypeScript snippets (#5867 batch 3) Re-fence 17 TypeScript blocks across 10 content/docs/fields pages from plaintext to ts so check-doc-snippet-types compiles them against the built types. Fix the two blocks that reddened as a result: - image.mdx annotated ImageFieldSchema.value with FileMetadata, a name @object-ui/types does not export - it was deliberately renamed to UploadedFileMetadata (objectstack#4115). Renamed and imported. - lookup.mdx referenced DataSource without importing it. Import added. No block body was otherwise edited, no FRAGMENT_MARKER was declared, and the gate, UNGATED_DOCS and the ledger are untouched. Part of #5867 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_019b5UBNMtTzKbVtZZGvFuxe --- .changeset/5867-plaintext-fenced-ts-batch3.md | 23 +++++++++++++++++++ content/docs/fields/file.mdx | 4 ++-- content/docs/fields/formula.mdx | 4 ++-- content/docs/fields/grid.mdx | 2 +- content/docs/fields/image.mdx | 8 ++++--- content/docs/fields/lookup.mdx | 6 +++-- content/docs/fields/rich-text.mdx | 4 ++-- content/docs/fields/select.mdx | 4 ++-- content/docs/fields/summary.mdx | 2 +- content/docs/fields/user.mdx | 4 ++-- content/docs/fields/vector.mdx | 2 +- 11 files changed, 45 insertions(+), 18 deletions(-) create mode 100644 .changeset/5867-plaintext-fenced-ts-batch3.md diff --git a/.changeset/5867-plaintext-fenced-ts-batch3.md b/.changeset/5867-plaintext-fenced-ts-batch3.md new file mode 100644 index 0000000000..523ebb6a4d --- /dev/null +++ b/.changeset/5867-plaintext-fenced-ts-batch3.md @@ -0,0 +1,23 @@ +--- +--- + +Docs only, publishes nothing: seventeen TypeScript snippets across ten +`content/docs/fields/*.mdx` reference pages were fenced ```plaintext, so +`check-doc-snippet-types` — which reads only `ts` / `tsx` fences — never saw +them (objectui#5867, batch 3 of N). Triage's classifier is the one applied: a +plaintext block whose first line starts with `import` / `export` / `interface` / +`type X =` / `const x: T` is code, and those fences are now `ts`; genuinely +prose blocks on the same pages are left alone. Compiling them found two real +documentation defects, now fixed: `image` annotated `ImageFieldSchema.value` +with `FileMetadata`, a name `@object-ui/types` does not export — it was +deliberately renamed to `UploadedFileMetadata` (objectstack#4115) because the +spec's same-named type is the storage layer's file record, a different shape — +and `lookup` referenced `DataSource` without importing it. The gate's +blocks-to-compile count rises from 206 to 223 — exactly the batch — with +diagnostics at 0, no new `FRAGMENT_MARKER` declarations, and the +covered/ungated sets unmoved. The blocks also stop rendering as unstyled +plaintext and pick up TypeScript highlighting, which is reader-visible. Three +further `fields` pages are excluded by measurement with blockers filed: +`auto-number` (an ambient backend `db` handle), `object` (imports `ajv`, not a +workspace dependency) and `location` (one fence welds a JSX element and a bare +metadata object literal, so it parses as neither `ts` nor `tsx`). diff --git a/content/docs/fields/file.mdx b/content/docs/fields/file.mdx index 6da1263fec..cedd6d72fb 100644 --- a/content/docs/fields/file.mdx +++ b/content/docs/fields/file.mdx @@ -19,7 +19,7 @@ The File Field component provides a file upload interface with support for multi ## Field Schema -```plaintext +```ts interface FileFieldSchema { type: 'file'; name: string; // Field name/ID @@ -79,7 +79,7 @@ accept: ['image/*'] // All images In tables/grids, displays file count: -```plaintext +```ts import { FileCellRenderer } from '@object-ui/fields'; // Renders: "3 files" or "document.pdf" diff --git a/content/docs/fields/formula.mdx b/content/docs/fields/formula.mdx index e4ab49c3da..793fb7d90b 100644 --- a/content/docs/fields/formula.mdx +++ b/content/docs/fields/formula.mdx @@ -19,7 +19,7 @@ The Formula Field component displays computed values calculated from other field ## Field Schema -```plaintext +```ts interface FormulaFieldSchema { type: 'formula'; name: string; // Field name/ID @@ -70,7 +70,7 @@ formula: 'end_date - start_date' In tables/grids, displays with monospace font: -```plaintext +```ts import { FormulaCellRenderer } from '@object-ui/fields'; // Renders computed value in monospace font diff --git a/content/docs/fields/grid.mdx b/content/docs/fields/grid.mdx index 6475b83929..f5b407e39c 100644 --- a/content/docs/fields/grid.mdx +++ b/content/docs/fields/grid.mdx @@ -19,7 +19,7 @@ The Grid Field component provides an inline table for managing related records o ## Field Schema -```plaintext +```ts interface GridFieldSchema { type: 'grid'; name: string; // Field name/ID diff --git a/content/docs/fields/image.mdx b/content/docs/fields/image.mdx index 7c194c013e..78263f8be6 100644 --- a/content/docs/fields/image.mdx +++ b/content/docs/fields/image.mdx @@ -15,12 +15,14 @@ The Image Field component provides an image upload interface with thumbnail prev ## Field Schema -```plaintext +```ts +import type { UploadedFileMetadata } from '@object-ui/types'; + interface ImageFieldSchema { type: 'image'; name: string; // Field name/ID label?: string; // Field label - value?: FileMetadata | FileMetadata[]; // Current image(s) + value?: UploadedFileMetadata | UploadedFileMetadata[]; // Current image(s) required?: boolean; // Is field required readonly?: boolean; // Read-only mode disabled?: boolean; // Disabled state @@ -58,7 +60,7 @@ accept: ['image/png', 'image/jpeg', 'image/gif', 'image/webp'] In tables/grids, displays image thumbnails: -```plaintext +```ts import { ImageCellRenderer } from '@object-ui/fields'; // Shows up to 3 thumbnails plus count if more diff --git a/content/docs/fields/lookup.mdx b/content/docs/fields/lookup.mdx index a50894e915..144044bbbc 100644 --- a/content/docs/fields/lookup.mdx +++ b/content/docs/fields/lookup.mdx @@ -15,7 +15,9 @@ The Lookup Field component provides a reference field for creating relationships ## Field Schema -```plaintext +```ts +import type { DataSource } from '@object-ui/types'; + interface LookupFieldSchema { type: 'lookup' | 'master_detail'; name: string; // Field name/ID @@ -140,7 +142,7 @@ The Record Picker dialog provides: In tables/grids, lookup values display the referenced record name: -```plaintext +```ts import { LookupCellRenderer } from '@object-ui/fields'; // Single value: Display name/label diff --git a/content/docs/fields/rich-text.mdx b/content/docs/fields/rich-text.mdx index db9e5ac1c6..463b4104fa 100644 --- a/content/docs/fields/rich-text.mdx +++ b/content/docs/fields/rich-text.mdx @@ -15,7 +15,7 @@ The Rich Text Field component provides a WYSIWYG editor for creating formatted t ## Field Schema -```plaintext +```ts interface RichTextFieldSchema { type: 'markdown' | 'html'; name: string; // Field name/ID @@ -57,7 +57,7 @@ interface RichTextFieldSchema { In tables/grids, rich text is shown as plain text: -```plaintext +```ts import { TextCellRenderer } from '@object-ui/fields'; // Strips formatting, shows plain text only diff --git a/content/docs/fields/select.mdx b/content/docs/fields/select.mdx index 3b47d1f734..25fb192fdb 100644 --- a/content/docs/fields/select.mdx +++ b/content/docs/fields/select.mdx @@ -90,7 +90,7 @@ candidate query is filtered server-side and paginated. See ## Field Schema -```plaintext +```ts interface SelectFieldSchema { type: 'select'; name: string; // Field name/ID @@ -141,7 +141,7 @@ interface SelectOption { In tables/grids, select values are displayed as colored badges: -```plaintext +```ts import { SelectCellRenderer } from '@object-ui/fields'; // Single value: Colored badge diff --git a/content/docs/fields/summary.mdx b/content/docs/fields/summary.mdx index 7e7dd24532..9bf0f5abd3 100644 --- a/content/docs/fields/summary.mdx +++ b/content/docs/fields/summary.mdx @@ -19,7 +19,7 @@ The Summary Field component displays aggregated values from related records. Thi ## Field Schema -```plaintext +```ts interface SummaryFieldSchema { type: 'summary'; name: string; // Field name/ID diff --git a/content/docs/fields/user.mdx b/content/docs/fields/user.mdx index fe9cce21ed..7a665a50bc 100644 --- a/content/docs/fields/user.mdx +++ b/content/docs/fields/user.mdx @@ -23,7 +23,7 @@ it display-only. ## Field Schema -```plaintext +```ts interface UserFieldSchema { type: 'user'; name: string; // Field name/ID @@ -73,7 +73,7 @@ text input. Write `{ type: 'user', name: 'owner' }` instead. In tables/grids, displays avatar with name: -```plaintext +```ts import { UserCellRenderer } from '@object-ui/fields'; // Single user: Avatar + name diff --git a/content/docs/fields/vector.mdx b/content/docs/fields/vector.mdx index 91945d782d..2b50ddaddf 100644 --- a/content/docs/fields/vector.mdx +++ b/content/docs/fields/vector.mdx @@ -15,7 +15,7 @@ The Vector Field component displays vector embeddings used in AI/ML applications ## Field Schema -```plaintext +```ts interface VectorFieldSchema { type: 'vector'; name: string; // Field name/ID