From fd784d1fd3a69031e68f237c979b006ebfd3bc37 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 21 Nov 2026 22:24:37 +0000 Subject: [PATCH 1/3] wip(spec): authored record page surface describes (#36180) Claude-Session: https://claude.ai/code/session_01L6bhgXoCkuUMPfxTyCaYUM Co-authored-by: Claude --- ...-authored-record-page-surface-describes.md | 10 ++++++++ packages/spec/src/ui/action.zod.ts | 6 ++++- packages/spec/src/ui/page.zod.ts | 24 ++++++++++++------- 3 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 .changeset/36180-authored-record-page-surface-describes.md diff --git a/.changeset/36180-authored-record-page-surface-describes.md b/.changeset/36180-authored-record-page-surface-describes.md new file mode 100644 index 00000000000..7674422fbc8 --- /dev/null +++ b/.changeset/36180-authored-record-page-surface-describes.md @@ -0,0 +1,10 @@ +--- +'@objectstack/spec': minor +--- + +docs(spec): the page and action describes say where an authored record page is drawn + +Clause-②: no +Metadata-protocol: semantic + +An object's assigned `kind: 'full'` record page (its `isDefault` page, or an app's page named by `apps`) is drawn on the desktop full record page only. On a phone and in the side preview (the drawer a list opens, a split pane, an interface page's preview) the record opens on the standard record page built from the object's own metadata. The `kind`, `isDefault` and `apps` describes, the `page.slots.tabs` tombstone's remedy and the action `locations` describe now say so. `record_section` actions are drawn only by an authored page block, so an action that must reach every surface adds `record_more` as well. A page named in the URL, the platform's approval request and user pages, and `kind: 'slotted'` pages are drawn on every surface. No schema shape changed. diff --git a/packages/spec/src/ui/action.zod.ts b/packages/spec/src/ui/action.zod.ts index e804106fe59..333b18cbcc7 100644 --- a/packages/spec/src/ui/action.zod.ts +++ b/packages/spec/src/ui/action.zod.ts @@ -779,6 +779,10 @@ const GLOBAL_NAV_RETIRED = * never surfaces on the object's own list views. * - `record_section` — actions surfaced inside a body section/tab of a record * (e.g. a Security tab grouping change-password, 2FA, etc.). + * Drawn only by an authored record page block that renders + * it; the standard record page (a phone, the side preview, + * and an object with no authored page) does not draw it, so + * an action that must reach every surface adds `record_more`. * * `global_nav` was REMOVED in 17 (#6888, maintainer ruling 2026-08-09). It had * been declared here since the vocabulary was written and no product surface @@ -1361,7 +1365,7 @@ const actionObject = () => strictObject({ icon: z.string().optional().describe('Icon name'), /** Where does this action appear? */ - locations: z.array(ActionLocationSchema).optional().describe('Locations where this action is visible'), + locations: z.array(ActionLocationSchema).optional().describe('Locations where this action is visible. `record_section` is drawn only by an authored record page block that renders it; the standard record page (on a phone, in the side preview, and for an object with no authored page) does not draw it, so an action that must reach every surface adds `record_more` as well.'), /** * Visual Component Type diff --git a/packages/spec/src/ui/page.zod.ts b/packages/spec/src/ui/page.zod.ts index bc2fbcae1cd..bd3ddc3b559 100644 --- a/packages/spec/src/ui/page.zod.ts +++ b/packages/spec/src/ui/page.zod.ts @@ -1218,7 +1218,8 @@ const PAGE_AUDIENCE_WRONG_LAYER = * page out of the record page's column tiers, so it stayed tabbed at every * width. The record page is composed from the object's roles and relationship * flags (ADR-0085), so a page that needs its own strip is a `kind: 'full'` - * page, which is drawn as authored. Carried by a `retiredKey()` tombstone on + * page, which is drawn as authored on the desktop full record page (a phone + * and the side preview draw the standard record page). Carried by a `retiredKey()` tombstone on * the slot map, the `page.assignedProfiles` precedent above. */ const PAGE_SLOTS_TABS_REMEDY = @@ -1226,7 +1227,8 @@ const PAGE_SLOTS_TABS_REMEDY = + "flags: to change which related lists appear or their order, set `relatedList` / " + "`relatedList: 'primary'` on the child's reference field; to replace the Details body, " + "author `slots.details`; a page that needs its own strip is `kind: 'full'`, drawn as " - + 'authored. '; + + 'authored on the desktop full record page (a phone and the side preview draw the standard ' + + 'record page, with the composed strip). '; const PAGE_SLOTS_TABS_RETIRED = '`page.slots.tabs` was removed in @objectstack/spec 18.3.0 (ADR-0085) — an authored strip ' @@ -2040,7 +2042,9 @@ export const PageSchema = lazySchema(() => strictObject({ /** * Activation — whether this page is the DEFAULT RECORD PAGE of its `object`: - * the page the record view of that object opens. + * the page the record view of that object opens on the desktop full record + * page. On a phone and in the side preview the standard record page is + * drawn instead (see `kind`; the console's `authoredRecordPageApplies`). * * **At most one default record page per object per deployment.** A record * page (`type: 'record'`, the default) bound to an `object` and declared @@ -2067,13 +2071,15 @@ export const PageSchema = lazySchema(() => strictObject({ * refusal `misplacedDefaultPageRefusal` ({@link checkPageDefaultPlacement}). */ isDefault: z.boolean().default(false) - .describe('Whether this record page is the default record page of its `object` — the page the record view opens. At most one `isDefault: true` record page may exist for an object in a deployment: a second is refused (by defineStack / os validate, at package registration and at metadata save), naming both pages. Saving a page under the existing default\'s own name is that page, not a second default. Refused on any other page — a page that is not a record page bound to an object: nothing reads it there. An app opens on its first navigation item, and the root landing follows the app\'s own isDefault.'), + .describe('Whether this record page is the default record page of its `object` — the page its records open on, on the desktop full record page; on a phone and in the side preview the standard record page is drawn instead (see `kind`). At most one `isDefault: true` record page may exist for an object in a deployment: a second is refused (by defineStack / os validate, at package registration and at metadata save), naming both pages. Saving a page under the existing default\'s own name is that page, not a second default. Refused on any other page — a page that is not a record page bound to an object: nothing reads it there. An app opens on its first navigation item, and the root landing follows the app\'s own isDefault.'), /** * App scope — the apps whose routes open this record page for its `object` * (maintainer ruling A on objectstack#28979, record 6573557633). * * Inside an app this list names, the record view of the page's object - * (`/apps///record/`) opens this page. Everywhere else — + * (`/apps///record/`) opens this page, on the desktop full + * record page only — a phone and the side preview draw the standard record + * page, as for the default (see `kind`). Everywhere else — * every other app, Setup included — the deployment's one `isDefault` record * page still opens: ruling A on objectstack#23015 (one default per object per * deployment) is unchanged, and no precedence ladder is added. The default @@ -2095,7 +2101,7 @@ export const PageSchema = lazySchema(() => strictObject({ * app's NAME here, never the segment itself. */ apps: z.array(SnakeCaseIdentifierSchema).min(1).superRefine(checkPageAppsUnique).optional() - .describe("The apps whose routes open this record page for its `object`: inside an app named here, the object's record view (`/apps///record/`) opens this page; everywhere else, Setup included, the object's one `isDefault` record page still opens, so the default and an app's page coexist. App names, non-empty and unique. At most one record page per object per app: a second page naming the same app for the same object is refused (by defineStack / os validate, at package registration and at metadata save), naming both pages. Refused on any page that is not a record page bound to an object."), + .describe("The apps whose routes open this record page for its `object`: inside an app named here, the object's record view (`/apps///record/`) opens this page on the desktop full record page (on a phone and in the side preview the standard record page is drawn, see `kind`); everywhere else, Setup included, the object's one `isDefault` record page still opens, so the default and an app's page coexist. App names, non-empty and unique. At most one record page per object per app: a second page naming the same app for the same object is refused (by defineStack / os validate, at package registration and at metadata save), naming both pages. Refused on any page that is not a record page bound to an object."), // `assignedProfiles` REMOVED (ADR-0090 D2 / ADR-0049) — it named the concept // D2 deleted and nothing anywhere enforced it, so a page that "assigned // profiles" was open to everyone who could reach it. Page audience is the @@ -2155,7 +2161,8 @@ export const PageSchema = lazySchema(() => strictObject({ "turned on server-side via the OS_PAGE_REACT_ENABLED=true env toggle. " + "Do not author Tailwind classes in page source in either tier: `source` is " + "runtime metadata the build-time Tailwind never scans, so utility classNames " + - "silently produce no CSS (ADR-0065; ADR-0080).", + "silently produce no CSS (ADR-0065; ADR-0080). " + + "Where it is drawn: an object's assigned `kind: 'full'` record page (its `isDefault` page, or an app's page named by `apps`) is drawn on the desktop full record page only. On a phone and in the side preview (the drawer a list opens, a split pane, an interface page's preview) the record opens on the standard record page, built from the object's own metadata, so the page's layout and what lives only on it (its own blocks, tabs and sections, and `record_section` actions, which the standard page does not draw; give such an action `record_more` as well) do not appear there. A page named in the URL (a print page and other named page routes) is drawn wherever that route opens, the platform's own approval request and user pages keep their page on every surface, and a `kind: 'slotted'` page is the standard page with its slots filled, on every surface.", ), /** @@ -2175,7 +2182,8 @@ export const PageSchema = lazySchema(() => strictObject({ * relationship flags (ADR-0085); `details` replaces the body of the Details * tab inside it. The `tabs` slot that replaced the whole strip is a * `retiredKey()` tombstone ({@link PAGE_SLOTS_TABS_RETIRED}); a page that - * needs its own strip is a `kind: 'full'` page, drawn as authored. + * needs its own strip is a `kind: 'full'` page, drawn as authored on the + * desktop full record page. * * Only honored when `kind === 'slotted'`. */ From d23ee9bd6d120e866430685528b783a81810bd20 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 21 Nov 2026 22:31:06 +0000 Subject: [PATCH 2/3] docs(spec): the page and action describes say an authored record page is drawn on the desktop full page only (#36180) Claude-Session: https://claude.ai/code/session_01L6bhgXoCkuUMPfxTyCaYUM Co-authored-by: Claude --- content/docs/references/data/object.mdx | 2 +- content/docs/references/kernel/metadata-plugin.mdx | 2 +- content/docs/references/ui/action.mdx | 2 +- content/docs/references/ui/page.mdx | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/content/docs/references/data/object.mdx b/content/docs/references/data/object.mdx index 543e017a1ce..21ed0e0d925 100644 --- a/content/docs/references/data/object.mdx +++ b/content/docs/references/data/object.mdx @@ -499,7 +499,7 @@ const result = ApiMethod.parse(data); | **description** | `string \| { dialect: 'template'; source?: string; ast?: any; meta?: object } \| string \| Record` | optional | Explanatory line shown under the title in the action's param dialog. Carries the confirm question for an action that collects params (one dialog, not two). Not the LLM-facing `ai.description`. It is a `template` slot (ADR-0032): a bare string is shorthand for `{ dialect: 'template', source }`, and text with no hole is shown as written. Holes are `{{ path }}` or `{{ path \| formatter[:arg] }}` over `record`, the record the action runs against (the clicked row on a list, else the page's record); the values the dialog collects are not bound, since the line shows before they exist. Formatters come from the template engine's whitelist (`TEMPLATE_FORMATTERS`, `@objectstack/formula`); a hole holds no logic (no CEL, no arithmetic). Example: 'Choose the new role for `{{ record.name }}`.'. A hole over any other root, a `${…}` or single-brace `{x}` token (each named with its `{{ }}` spelling), a hole holding logic or an unknown formatter, and a blank sentence are named and refused at `objectstack validate`, `compile` and the publish gate; the text still parses, so a stored one loads until its next save. An inline locale map (`{ en, "zh-CN" }`) is accepted too, each value such a sentence. | | **objectName** | `string` | optional | Target object this action belongs to. When set, the action is auto-merged into the object's actions array by defineStack(). | | **icon** | `string` | optional | Icon name | -| **locations** | `Enum<'list_toolbar' \| 'list_item' \| 'record_header' \| 'record_more' \| …>[]` | optional | Locations where this action is visible | +| **locations** | `Enum<'list_toolbar' \| 'list_item' \| 'record_header' \| 'record_more' \| …>[]` | optional | Locations where this action is visible. `record_section` is drawn only by an authored record page block that renders it; the standard record page (on a phone, in the side preview, and for an object with no authored page) does not draw it, so an action that must reach every surface adds `record_more` as well. | | **component** | `Enum<'action:button' \| 'action:icon' \| 'action:menu' \| 'action:group'>` | optional | Visual component override | | **type** | `Enum<'script' \| 'url' \| 'modal' \| 'flow' \| 'api' \| 'form'>` | optional (default: `"script"`) | Action functionality type — the dispatch route. The declarative single-record field write is not a type: it is `operation: 'update'` + `patch` on the default `script` route. | | **target** | `string` | optional | URL, Script Name, Flow ID, or API Endpoint. Supports $`{param.X}` and $`{ctx.X}` interpolation. For type:'url': an http:// or https:// URL, a mailto: address, or an in-app path starting with / or ./ (a console route; a record is /apps/APP/OBJECT/record/ID, APP being the app's route segment — see onSuccess.navigate) — every other scheme and a protocol-relative //host are refused. | diff --git a/content/docs/references/kernel/metadata-plugin.mdx b/content/docs/references/kernel/metadata-plugin.mdx index e47f4742954..d86852563d2 100644 --- a/content/docs/references/kernel/metadata-plugin.mdx +++ b/content/docs/references/kernel/metadata-plugin.mdx @@ -325,7 +325,7 @@ const result = MetadataBulkResultSchema.parse(data); | **description** | `string \| { dialect: 'template'; source?: string; ast?: any; meta?: object } \| string \| Record` | optional | Explanatory line shown under the title in the action's param dialog. Carries the confirm question for an action that collects params (one dialog, not two). Not the LLM-facing `ai.description`. It is a `template` slot (ADR-0032): a bare string is shorthand for `{ dialect: 'template', source }`, and text with no hole is shown as written. Holes are `{{ path }}` or `{{ path \| formatter[:arg] }}` over `record`, the record the action runs against (the clicked row on a list, else the page's record); the values the dialog collects are not bound, since the line shows before they exist. Formatters come from the template engine's whitelist (`TEMPLATE_FORMATTERS`, `@objectstack/formula`); a hole holds no logic (no CEL, no arithmetic). Example: 'Choose the new role for `{{ record.name }}`.'. A hole over any other root, a `${…}` or single-brace `{x}` token (each named with its `{{ }}` spelling), a hole holding logic or an unknown formatter, and a blank sentence are named and refused at `objectstack validate`, `compile` and the publish gate; the text still parses, so a stored one loads until its next save. An inline locale map (`{ en, "zh-CN" }`) is accepted too, each value such a sentence. | | **objectName** | `string` | optional | Target object this action belongs to. When set, the action is auto-merged into the object's actions array by defineStack(). | | **icon** | `string` | optional | Icon name | -| **locations** | `Enum<'list_toolbar' \| 'list_item' \| 'record_header' \| 'record_more' \| …>[]` | optional | Locations where this action is visible | +| **locations** | `Enum<'list_toolbar' \| 'list_item' \| 'record_header' \| 'record_more' \| …>[]` | optional | Locations where this action is visible. `record_section` is drawn only by an authored record page block that renders it; the standard record page (on a phone, in the side preview, and for an object with no authored page) does not draw it, so an action that must reach every surface adds `record_more` as well. | | **component** | `Enum<'action:button' \| 'action:icon' \| 'action:menu' \| 'action:group'>` | optional | Visual component override | | **type** | `Enum<'script' \| 'url' \| 'modal' \| 'flow' \| 'api' \| 'form'>` | optional (default: `"script"`) | Action functionality type — the dispatch route. The declarative single-record field write is not a type: it is `operation: 'update'` + `patch` on the default `script` route. | | **target** | `string` | optional | URL, Script Name, Flow ID, or API Endpoint. Supports $`{param.X}` and $`{ctx.X}` interpolation. For type:'url': an http:// or https:// URL, a mailto: address, or an in-app path starting with / or ./ (a console route; a record is /apps/APP/OBJECT/record/ID, APP being the app's route segment — see onSuccess.navigate) — every other scheme and a protocol-relative //host are refused. | diff --git a/content/docs/references/ui/action.mdx b/content/docs/references/ui/action.mdx index 0d7a61d3e37..56b42486a49 100644 --- a/content/docs/references/ui/action.mdx +++ b/content/docs/references/ui/action.mdx @@ -48,7 +48,7 @@ const result = ActionSchema.parse(data); | **description** | `string \| { dialect: 'template'; source?: string; ast?: any; meta?: object } \| string \| Record` | optional | Explanatory line shown under the title in the action's param dialog. Carries the confirm question for an action that collects params (one dialog, not two). Not the LLM-facing `ai.description`. It is a `template` slot (ADR-0032): a bare string is shorthand for `{ dialect: 'template', source }`, and text with no hole is shown as written. Holes are `{{ path }}` or `{{ path \| formatter[:arg] }}` over `record`, the record the action runs against (the clicked row on a list, else the page's record); the values the dialog collects are not bound, since the line shows before they exist. Formatters come from the template engine's whitelist (`TEMPLATE_FORMATTERS`, `@objectstack/formula`); a hole holds no logic (no CEL, no arithmetic). Example: 'Choose the new role for `{{ record.name }}`.'. A hole over any other root, a `${…}` or single-brace `{x}` token (each named with its `{{ }}` spelling), a hole holding logic or an unknown formatter, and a blank sentence are named and refused at `objectstack validate`, `compile` and the publish gate; the text still parses, so a stored one loads until its next save. An inline locale map (`{ en, "zh-CN" }`) is accepted too, each value such a sentence. | | **objectName** | `string` | optional | Target object this action belongs to. When set, the action is auto-merged into the object's actions array by defineStack(). | | **icon** | `string` | optional | Icon name | -| **locations** | `Enum<'list_toolbar' \| 'list_item' \| 'record_header' \| 'record_more' \| 'record_related' \| 'record_section'>[]` | optional | Locations where this action is visible | +| **locations** | `Enum<'list_toolbar' \| 'list_item' \| 'record_header' \| 'record_more' \| 'record_related' \| 'record_section'>[]` | optional | Locations where this action is visible. `record_section` is drawn only by an authored record page block that renders it; the standard record page (on a phone, in the side preview, and for an object with no authored page) does not draw it, so an action that must reach every surface adds `record_more` as well. | | **component** | `Enum<'action:button' \| 'action:icon' \| 'action:menu' \| 'action:group'>` | optional | Visual component override | | **type** | `Enum<'script' \| 'url' \| 'modal' \| 'flow' \| 'api' \| 'form'>` | optional (default: `"script"`) | Action functionality type — the dispatch route. The declarative single-record field write is not a type: it is `operation: 'update'` + `patch` on the default `script` route. | | **target** | `string` | optional | URL, Script Name, Flow ID, or API Endpoint. Supports $`{param.X}` and $`{ctx.X}` interpolation. For type:'url': an http:// or https:// URL, a mailto: address, or an in-app path starting with / or ./ (a console route; a record is /apps/APP/OBJECT/record/ID, APP being the app's route segment — see onSuccess.navigate) — every other scheme and a protocol-relative //host are refused. | diff --git a/content/docs/references/ui/page.mdx b/content/docs/references/ui/page.mdx index a4d52b36391..d0b50e27550 100644 --- a/content/docs/references/ui/page.mdx +++ b/content/docs/references/ui/page.mdx @@ -226,13 +226,13 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma | **record** | `{ object: string; view?: string; filter?: (object \| object)[]; sort?: object[] }` | optional | The row an app page is about — a one-row query `{ object, view?, filter?, sort? }`. The console reads it once per page open: the FIRST row under `sort`, under the caller's identity. Every component's `visibleWhen` sees that row as `record`; a record block that binds its own row still provides that row to its own subtree. A page drawn through `interfaceConfig.source` reads no binding. A count or a plan is a field on that row: a `summary` roll-up (`record.environment_count > 1`) or the object's own field (`record.plan != 'free'`). Three states: while the read is pending, the page body is not drawn; no row, or a read the server refuses as forbidden (403), binds `record` as null; any other failure draws no page body. Only on `type: 'app'` — refused on every other page type (a record page's row is the record it opens). | | **template** | `Enum<'default' \| 'header-sidebar-main' \| 'three-column' \| 'dashboard'>` | optional (default: `"default"`) | Layout template — 'default', 'header-sidebar-main', 'three-column' or 'dashboard'. Each places its own regions (PAGE_TEMPLATE_SLOTS); a region the template does not place, or a second region filling the same slot, is refused at the region's name. | | **regions** | `{ name: string; width?: Enum<'small' \| 'medium' \| 'large' \| 'full'>; components: object[] }[]` | optional | Layout regions (header, main, sidebar, footer) with their components. Optional on most pages — list pages use interfaceConfig, slotted pages use slots, html and react pages use source — but a kind: 'full' record page draws nothing else, so it must place at least one component here: one that places none is refused, since every record of its object would open on a blank detail panel. A record page binding no object that carries an interfaceConfig.source is drawn as an interface list instead, and is not judged. | -| **isDefault** | `boolean` | optional (default: `false`) | Whether this record page is the default record page of its `object` — the page the record view opens. At most one `isDefault: true` record page may exist for an object in a deployment: a second is refused (by defineStack / os validate, at package registration and at metadata save), naming both pages. Saving a page under the existing default's own name is that page, not a second default. Refused on any other page — a page that is not a record page bound to an object: nothing reads it there. An app opens on its first navigation item, and the root landing follows the app's own isDefault. | -| **apps** | `string[]` | optional | The apps whose routes open this record page for its `object`: inside an app named here, the object's record view (`/apps///record/`) opens this page; everywhere else, Setup included, the object's one `isDefault` record page still opens, so the default and an app's page coexist. App names, non-empty and unique. At most one record page per object per app: a second page naming the same app for the same object is refused (by defineStack / os validate, at package registration and at metadata save), naming both pages. Refused on any page that is not a record page bound to an object. | +| **isDefault** | `boolean` | optional (default: `false`) | Whether this record page is the default record page of its `object` — the page its records open on, on the desktop full record page; on a phone and in the side preview the standard record page is drawn instead (see `kind`). At most one `isDefault: true` record page may exist for an object in a deployment: a second is refused (by defineStack / os validate, at package registration and at metadata save), naming both pages. Saving a page under the existing default's own name is that page, not a second default. Refused on any other page — a page that is not a record page bound to an object: nothing reads it there. An app opens on its first navigation item, and the root landing follows the app's own isDefault. | +| **apps** | `string[]` | optional | The apps whose routes open this record page for its `object`: inside an app named here, the object's record view (`/apps///record/`) opens this page on the desktop full record page (on a phone and in the side preview the standard record page is drawn, see `kind`); everywhere else, Setup included, the object's one `isDefault` record page still opens, so the default and an app's page coexist. App names, non-empty and unique. At most one record page per object per app: a second page naming the same app for the same object is refused (by defineStack / os validate, at package registration and at metadata save), naming both pages. Refused on any page that is not a record page bound to an object. | | **assignedProfiles** | `never` | optional | [REMOVED] `page.assignedProfiles` was removed in @objectstack/spec 17.5.0 (ADR-0090 D2, ADR-0049 enforce-or-remove) — it was named for the Profile concept ADR-0090 D2 deleted, and it gated nothing: no renderer, route or metadata read door ever read the key, so a page that "assigned profiles" stayed open to every caller who could reach it. Delete the key. Page audience is the permission set's: gate the DATA the page shows with the object's permission sets, and bind those sets to people through positions (named in a position's `permissionSets`) — those are the checks the runtime actually runs. Run `os migrate meta --from 17` to list the mechanical edits for existing sources; `--write` applies the ones it can prove, and you apply the rest by hand. | | **interfaceConfig** | `{ source?: string; columns?: string[] \| object[]; sort?: object[]; filterBy?: (object \| object)[]; … }` | optional | Interface-level page configuration (for Airtable-style interface pages) | | **aria** | `{ ariaLabel?: string \| Record; ariaDescribedBy?: string; role?: string }` | optional | ARIA accessibility attributes | | **print** | `{ paperSize?: Enum<'A4' \| 'A5' \| 'Letter' \| 'Legal'>; orientation?: Enum<'portrait' \| 'landscape'>; margins?: object; repeatHeader?: boolean; … }` | optional | Print declaration — makes this page a print page, a document authored in the page's own blocks: paper size and orientation, margins in millimetres, the running header and footer (the page's own `header` / `footer` regions), page numbers and page-break hints, each mapped to print CSS. A print page is a `kind: 'full'` page of `type: 'record'`, `'home'` or `'app'` with its blocks in `regions`, and every block in it must come from the printable block subset: containers that draw every child (`page:section`, `page:card`, `page:footer`), field blocks (`record:details`, `record:highlights`), the child-record table `record:line_items`, `element:text`, `element:image`, `element:divider`, `element:definition-list`, `element:repeater`, `element:number` and `object-metric`; `os validate` / `os build` / `os lint` and the metadata save door refuse any other block inside it. Applied by the console's browser print rendering, which prints the page through the browser's own print dialog (where it can be saved as PDF); the server-side PDF renderer is to follow. A list view's print button is `allowPrinting`, not this. | -| **kind** | `Enum<'full' \| 'slotted' \| 'html' \| 'react'>` | optional (default: `"full"`) | Page override mode. full \| slotted = structured authoring; html = author-written constrained JSX compiled (parsed, never executed) to the tree (ADR-0080; ADR-0081 named it html), styled by the registered components' structured props plus a JSON `style` object with hsl(var(--token)) theme colors; react = real-React source executed at render by the runtime (ADR-0081), styled by inline `style` with the same token colors; it runs author JS, so it is gated by a host capability that defaults OFF and is turned on server-side via the OS_PAGE_REACT_ENABLED=true env toggle. Do not author Tailwind classes in page source in either tier: `source` is runtime metadata the build-time Tailwind never scans, so utility classNames silently produce no CSS (ADR-0065; ADR-0080). | +| **kind** | `Enum<'full' \| 'slotted' \| 'html' \| 'react'>` | optional (default: `"full"`) | Page override mode. full \| slotted = structured authoring; html = author-written constrained JSX compiled (parsed, never executed) to the tree (ADR-0080; ADR-0081 named it html), styled by the registered components' structured props plus a JSON `style` object with hsl(var(--token)) theme colors; react = real-React source executed at render by the runtime (ADR-0081), styled by inline `style` with the same token colors; it runs author JS, so it is gated by a host capability that defaults OFF and is turned on server-side via the OS_PAGE_REACT_ENABLED=true env toggle. Do not author Tailwind classes in page source in either tier: `source` is runtime metadata the build-time Tailwind never scans, so utility classNames silently produce no CSS (ADR-0065; ADR-0080). Where it is drawn: an object's assigned `kind: 'full'` record page (its `isDefault` page, or an app's page named by `apps`) is drawn on the desktop full record page only. On a phone and in the side preview (the drawer a list opens, a split pane, an interface page's preview) the record opens on the standard record page, built from the object's own metadata, so the page's layout and what lives only on it (its own blocks, tabs and sections, and `record_section` actions, which the standard page does not draw; give such an action `record_more` as well) do not appear there. A page named in the URL (a print page and other named page routes) is drawn wherever that route opens, the platform's own approval request and user pages keep their page on every surface, and a `kind: 'slotted'` page is the standard page with its slots filled, on every surface. | | **slots** | `{ header?: object \| object[]; actions?: object \| object[]; alerts?: object \| object[]; highlights?: object \| object[]; … }` | optional | Slot override map for slotted pages | | **source** | `string` | optional | Page source text. For kind==='html' it is constrained JSX compiled to the tree by @objectstack/sdui-parser at save time (parse, never execute), styled by the registered components' structured props plus a JSON `style` object with hsl(var(--token)) theme colors. For kind==='react' it is real React/JSX executed at render by @object-ui/react-runtime (trusted tier), styled by inline `style` with the same token colors. Do not author Tailwind classes in page source in either tier: `source` is runtime metadata the build-time Tailwind never scans, so utility classNames silently produce no CSS (ADR-0065; ADR-0080). Authoritative over `regions` in both. | | **requires** | `string[]` | optional | Plugin namespaces the page's source uses, derived from the source at save — omit it. The key exists only on a kind==='html' page, the kind whose source is compiled at save; on a 'react', 'full' or 'slotted' page — and a page that omits kind, which is 'full' — it is refused at parse. On a server that has the deployment's SDUI component manifest, saving an html page compiles its source and stores the namespaces it uses here; a written list that disagrees with the source is refused (422 INVALID_METADATA, page-requires-disagrees-with-source) — on a draft save it is kept until the draft's publish, which refuses it. At load, a stored page whose list names a plugin no component in that manifest carries is reported, page and plugin named, and is still served. A server with no manifest checks neither and says so once at boot. | @@ -321,7 +321,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma | **alerts** | `{ type: Enum<'page:header' \| 'page:footer' \| 'page:sidebar' \| 'page:tabs' \| 'page:accordion' \| …> \| string; id?: string; label?: string \| Record; properties?: Record; … } \| { type: Enum<'page:header' \| 'page:footer' \| 'page:sidebar' \| 'page:tabs' \| 'page:accordion' \| …> \| string; id?: string; label?: string \| Record; properties?: Record; … }[]` | optional | | | **highlights** | `{ type: Enum<'page:header' \| 'page:footer' \| 'page:sidebar' \| 'page:tabs' \| 'page:accordion' \| …> \| string; id?: string; label?: string \| Record; properties?: Record; … } \| { type: Enum<'page:header' \| 'page:footer' \| 'page:sidebar' \| 'page:tabs' \| 'page:accordion' \| …> \| string; id?: string; label?: string \| Record; properties?: Record; … }[]` | optional | | | **details** | `{ type: Enum<'page:header' \| 'page:footer' \| 'page:sidebar' \| 'page:tabs' \| 'page:accordion' \| …> \| string; id?: string; label?: string \| Record; properties?: Record; … } \| { type: Enum<'page:header' \| 'page:footer' \| 'page:sidebar' \| 'page:tabs' \| 'page:accordion' \| …> \| string; id?: string; label?: string \| Record; properties?: Record; … }[]` | optional | | -| **tabs** | `never` | optional | [REMOVED] `page.slots.tabs` was removed in @objectstack/spec 18.3.0 (ADR-0085) — an authored strip replaced the whole synthesized one, so the related lists, approvals, attachments and history the platform composes from the object were dropped unless re-added by hand, and the page stayed tabbed at every width instead of taking the record page's columns. Delete the key. The record page composes its tabs and columns from the object's roles and relationship flags: to change which related lists appear or their order, set `relatedList` / `relatedList: 'primary'` on the child's reference field; to replace the Details body, author `slots.details`; a page that needs its own strip is `kind: 'full'`, drawn as authored. Run `os migrate meta --from 17` to list the mechanical edits for existing sources; `--write` applies the ones it can prove, and you apply the rest by hand. | +| **tabs** | `never` | optional | [REMOVED] `page.slots.tabs` was removed in @objectstack/spec 18.3.0 (ADR-0085) — an authored strip replaced the whole synthesized one, so the related lists, approvals, attachments and history the platform composes from the object were dropped unless re-added by hand, and the page stayed tabbed at every width instead of taking the record page's columns. Delete the key. The record page composes its tabs and columns from the object's roles and relationship flags: to change which related lists appear or their order, set `relatedList` / `relatedList: 'primary'` on the child's reference field; to replace the Details body, author `slots.details`; a page that needs its own strip is `kind: 'full'`, drawn as authored on the desktop full record page (a phone and the side preview draw the standard record page, with the composed strip). Run `os migrate meta --from 17` to list the mechanical edits for existing sources; `--write` applies the ones it can prove, and you apply the rest by hand. | | **discussion** | `{ type: Enum<'page:header' \| 'page:footer' \| 'page:sidebar' \| 'page:tabs' \| 'page:accordion' \| …> \| string; id?: string; label?: string \| Record; properties?: Record; … } \| { type: Enum<'page:header' \| 'page:footer' \| 'page:sidebar' \| 'page:tabs' \| 'page:accordion' \| …> \| string; id?: string; label?: string \| Record; properties?: Record; … }[]` | optional | | ### Nested Shape: `Page.overrides` From 1beb27dc70880001d42ab22dcf07758f24b1e621 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 21 Nov 2026 22:44:26 +0000 Subject: [PATCH 3/3] docs(spec): the surface rule names every non-slotted assigned record page kind (full, html, react) (#36180) Claude-Session: https://claude.ai/code/session_01L6bhgXoCkuUMPfxTyCaYUM Co-authored-by: Claude --- .changeset/36180-authored-record-page-surface-describes.md | 2 +- content/docs/references/ui/page.mdx | 2 +- packages/spec/src/ui/page.zod.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.changeset/36180-authored-record-page-surface-describes.md b/.changeset/36180-authored-record-page-surface-describes.md index 7674422fbc8..09e51a5976c 100644 --- a/.changeset/36180-authored-record-page-surface-describes.md +++ b/.changeset/36180-authored-record-page-surface-describes.md @@ -7,4 +7,4 @@ docs(spec): the page and action describes say where an authored record page is d Clause-②: no Metadata-protocol: semantic -An object's assigned `kind: 'full'` record page (its `isDefault` page, or an app's page named by `apps`) is drawn on the desktop full record page only. On a phone and in the side preview (the drawer a list opens, a split pane, an interface page's preview) the record opens on the standard record page built from the object's own metadata. The `kind`, `isDefault` and `apps` describes, the `page.slots.tabs` tombstone's remedy and the action `locations` describe now say so. `record_section` actions are drawn only by an authored page block, so an action that must reach every surface adds `record_more` as well. A page named in the URL, the platform's approval request and user pages, and `kind: 'slotted'` pages are drawn on every surface. No schema shape changed. +An object's assigned record page of kind `full`, `html` or `react` (its `isDefault` page, or an app's page named by `apps`) is drawn on the desktop full record page only. On a phone and in the side preview (the drawer a list opens, a split pane, an interface page's preview) the record opens on the standard record page built from the object's own metadata. The `kind`, `isDefault` and `apps` describes, the `page.slots.tabs` tombstone's remedy and the action `locations` describe now say so. `record_section` actions are drawn only by an authored page block, so an action that must reach every surface adds `record_more` as well. A page named in the URL, the platform's approval request and user pages, and `kind: 'slotted'` pages are drawn on every surface. No schema shape changed. diff --git a/content/docs/references/ui/page.mdx b/content/docs/references/ui/page.mdx index d0b50e27550..39bf6a92a18 100644 --- a/content/docs/references/ui/page.mdx +++ b/content/docs/references/ui/page.mdx @@ -232,7 +232,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma | **interfaceConfig** | `{ source?: string; columns?: string[] \| object[]; sort?: object[]; filterBy?: (object \| object)[]; … }` | optional | Interface-level page configuration (for Airtable-style interface pages) | | **aria** | `{ ariaLabel?: string \| Record; ariaDescribedBy?: string; role?: string }` | optional | ARIA accessibility attributes | | **print** | `{ paperSize?: Enum<'A4' \| 'A5' \| 'Letter' \| 'Legal'>; orientation?: Enum<'portrait' \| 'landscape'>; margins?: object; repeatHeader?: boolean; … }` | optional | Print declaration — makes this page a print page, a document authored in the page's own blocks: paper size and orientation, margins in millimetres, the running header and footer (the page's own `header` / `footer` regions), page numbers and page-break hints, each mapped to print CSS. A print page is a `kind: 'full'` page of `type: 'record'`, `'home'` or `'app'` with its blocks in `regions`, and every block in it must come from the printable block subset: containers that draw every child (`page:section`, `page:card`, `page:footer`), field blocks (`record:details`, `record:highlights`), the child-record table `record:line_items`, `element:text`, `element:image`, `element:divider`, `element:definition-list`, `element:repeater`, `element:number` and `object-metric`; `os validate` / `os build` / `os lint` and the metadata save door refuse any other block inside it. Applied by the console's browser print rendering, which prints the page through the browser's own print dialog (where it can be saved as PDF); the server-side PDF renderer is to follow. A list view's print button is `allowPrinting`, not this. | -| **kind** | `Enum<'full' \| 'slotted' \| 'html' \| 'react'>` | optional (default: `"full"`) | Page override mode. full \| slotted = structured authoring; html = author-written constrained JSX compiled (parsed, never executed) to the tree (ADR-0080; ADR-0081 named it html), styled by the registered components' structured props plus a JSON `style` object with hsl(var(--token)) theme colors; react = real-React source executed at render by the runtime (ADR-0081), styled by inline `style` with the same token colors; it runs author JS, so it is gated by a host capability that defaults OFF and is turned on server-side via the OS_PAGE_REACT_ENABLED=true env toggle. Do not author Tailwind classes in page source in either tier: `source` is runtime metadata the build-time Tailwind never scans, so utility classNames silently produce no CSS (ADR-0065; ADR-0080). Where it is drawn: an object's assigned `kind: 'full'` record page (its `isDefault` page, or an app's page named by `apps`) is drawn on the desktop full record page only. On a phone and in the side preview (the drawer a list opens, a split pane, an interface page's preview) the record opens on the standard record page, built from the object's own metadata, so the page's layout and what lives only on it (its own blocks, tabs and sections, and `record_section` actions, which the standard page does not draw; give such an action `record_more` as well) do not appear there. A page named in the URL (a print page and other named page routes) is drawn wherever that route opens, the platform's own approval request and user pages keep their page on every surface, and a `kind: 'slotted'` page is the standard page with its slots filled, on every surface. | +| **kind** | `Enum<'full' \| 'slotted' \| 'html' \| 'react'>` | optional (default: `"full"`) | Page override mode. full \| slotted = structured authoring; html = author-written constrained JSX compiled (parsed, never executed) to the tree (ADR-0080; ADR-0081 named it html), styled by the registered components' structured props plus a JSON `style` object with hsl(var(--token)) theme colors; react = real-React source executed at render by the runtime (ADR-0081), styled by inline `style` with the same token colors; it runs author JS, so it is gated by a host capability that defaults OFF and is turned on server-side via the OS_PAGE_REACT_ENABLED=true env toggle. Do not author Tailwind classes in page source in either tier: `source` is runtime metadata the build-time Tailwind never scans, so utility classNames silently produce no CSS (ADR-0065; ADR-0080). Where it is drawn: an object's assigned record page of kind 'full', 'html' or 'react' (its `isDefault` page, or an app's page named by `apps`) is drawn on the desktop full record page only. On a phone and in the side preview (the drawer a list opens, a split pane, an interface page's preview) the record opens on the standard record page, built from the object's own metadata, so the page's layout and what lives only on it (its own blocks, tabs and sections, and `record_section` actions, which the standard page does not draw; give such an action `record_more` as well) do not appear there. A page named in the URL (a print page and other named page routes) is drawn wherever that route opens, the platform's own approval request and user pages keep their page on every surface, and a `kind: 'slotted'` page is the standard page with its slots filled, on every surface. | | **slots** | `{ header?: object \| object[]; actions?: object \| object[]; alerts?: object \| object[]; highlights?: object \| object[]; … }` | optional | Slot override map for slotted pages | | **source** | `string` | optional | Page source text. For kind==='html' it is constrained JSX compiled to the tree by @objectstack/sdui-parser at save time (parse, never execute), styled by the registered components' structured props plus a JSON `style` object with hsl(var(--token)) theme colors. For kind==='react' it is real React/JSX executed at render by @object-ui/react-runtime (trusted tier), styled by inline `style` with the same token colors. Do not author Tailwind classes in page source in either tier: `source` is runtime metadata the build-time Tailwind never scans, so utility classNames silently produce no CSS (ADR-0065; ADR-0080). Authoritative over `regions` in both. | | **requires** | `string[]` | optional | Plugin namespaces the page's source uses, derived from the source at save — omit it. The key exists only on a kind==='html' page, the kind whose source is compiled at save; on a 'react', 'full' or 'slotted' page — and a page that omits kind, which is 'full' — it is refused at parse. On a server that has the deployment's SDUI component manifest, saving an html page compiles its source and stores the namespaces it uses here; a written list that disagrees with the source is refused (422 INVALID_METADATA, page-requires-disagrees-with-source) — on a draft save it is kept until the draft's publish, which refuses it. At load, a stored page whose list names a plugin no component in that manifest carries is reported, page and plugin named, and is still served. A server with no manifest checks neither and says so once at boot. | diff --git a/packages/spec/src/ui/page.zod.ts b/packages/spec/src/ui/page.zod.ts index bd3ddc3b559..d3a9089cec7 100644 --- a/packages/spec/src/ui/page.zod.ts +++ b/packages/spec/src/ui/page.zod.ts @@ -2162,7 +2162,7 @@ export const PageSchema = lazySchema(() => strictObject({ "Do not author Tailwind classes in page source in either tier: `source` is " + "runtime metadata the build-time Tailwind never scans, so utility classNames " + "silently produce no CSS (ADR-0065; ADR-0080). " + - "Where it is drawn: an object's assigned `kind: 'full'` record page (its `isDefault` page, or an app's page named by `apps`) is drawn on the desktop full record page only. On a phone and in the side preview (the drawer a list opens, a split pane, an interface page's preview) the record opens on the standard record page, built from the object's own metadata, so the page's layout and what lives only on it (its own blocks, tabs and sections, and `record_section` actions, which the standard page does not draw; give such an action `record_more` as well) do not appear there. A page named in the URL (a print page and other named page routes) is drawn wherever that route opens, the platform's own approval request and user pages keep their page on every surface, and a `kind: 'slotted'` page is the standard page with its slots filled, on every surface.", + "Where it is drawn: an object's assigned record page of kind 'full', 'html' or 'react' (its `isDefault` page, or an app's page named by `apps`) is drawn on the desktop full record page only. On a phone and in the side preview (the drawer a list opens, a split pane, an interface page's preview) the record opens on the standard record page, built from the object's own metadata, so the page's layout and what lives only on it (its own blocks, tabs and sections, and `record_section` actions, which the standard page does not draw; give such an action `record_more` as well) do not appear there. A page named in the URL (a print page and other named page routes) is drawn wherever that route opens, the platform's own approval request and user pages keep their page on every surface, and a `kind: 'slotted'` page is the standard page with its slots filled, on every surface.", ), /**