Skip to content

Commit 92e0475

Browse files
docs(spec): the page and action describes say an authored record page is drawn on the desktop full page only (#36180) (#36197)
<!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuWwVEv5jDtmLFK7uQng8UqN)_ repo:objectstack#1 · os-sales · session_01L6bhgXoCkuUMPfxTyCaYUM Fixes #36180 Clause-②: no Metadata-protocol: semantic Skills-docs: follow-up #36179 — the skills wording for the same rule rides its own domain:skills PR; no skills edit here ## Premise (3 lines, for the claim) The seat's claim on the card: comment 7070293547. 1. Since #36150 (PR #36174, main 1208cc8), an object's assigned non-slotted (`full`, `html`, `react`) record page is drawn on the desktop full record page only; a phone and the side preview draw the standard page; a page named in the URL, `sys_approval_request` / `sys_user` (rulings 7066490078, 7066506909) and slotted pages apply on every surface. 2. The published describes of `kind`, `isDefault`, `apps`, the `page.slots.tabs` tombstone remedy and the action `locations` still read as if the page applies wherever the record opens, and say nothing about `record_section` not being drawn by the standard page. 3. Describe text and TSDoc only, no shape change: `Metadata-protocol: semantic`, `@objectstack/spec` minor, regenerated `content/docs/references/**`. ## 维护者速读 - 只改规范里的说明文字,不改任何字段、取值或校验。作者在文档和编辑器提示里读到的话,现在和 #36150 上线后的实际表现一致:手写整页(`kind: 'full'`)只在电脑整页生效,手机和右侧预览里画标准页。 - 动作位置 `record_section` 的说明补了一句:标准页不画它,想让动作在每个地方都能点到,再加 `record_more`。 - 网址点名的页面、审批请求页和用户页、插槽页三种例外也写进了 `kind` 的说明。 ## What changes - `packages/spec/src/ui/page.zod.ts` - `kind` describe: a new closing paragraph, "Where it is drawn", stating the surface rule for an assigned record page of kind `full`, `html` or `react` (`usePageAssignment` hands every non-slotted match to the view as its page; L1-d S1, taken at 1beb27d), what does not appear off the full page (the page's own blocks, tabs, sections and `record_section` actions; the `record_more` remedy), and the three exceptions (a page named in the URL, the platform's approval request and user pages, `kind: 'slotted'`). - `isDefault` describe: "the page the record view opens" becomes "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`)". - `apps` describe: the app's record view 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`)". The pinned opening ("The apps whose routes open this record page ", `stack-app-record-page.test.ts`) is unchanged. - `page.slots.tabs` tombstone remedy (`PAGE_SLOTS_TABS_REMEDY`, the runtime refusal text): "`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)". - The matching TSDoc on the remedy constant, `isDefault`, `apps` and `slots`. - `packages/spec/src/ui/action.zod.ts`: the `record_section` line of the location TSDoc and the `locations` describe say the standard record page (phone, side preview, an object with no authored page) does not draw it, and an action that must reach every surface adds `record_more`. - Regenerated (`check:generated --fix`, only `check:docs` was stale): `content/docs/references/ui/page.mdx`, `ui/action.mdx`, `data/object.mdx`, `kernel/metadata-plugin.mdx` (the last two embed the action schema's `locations` row). - Changeset `36180-authored-record-page-surface-describes.md`: `@objectstack/spec` minor, both declaration lines. Small calls made here (no card): the `record_section` note went on the `locations` describe, which is the only describe an author reads for a location (the enum has none); the platform pages are named by what they are ("the approval request and user pages"), not by object name, in the describe. ## Why Card #36180, S1 (should-fix) of the seat's contract review on PR #36174: that PR changed the console only, and the spec text is a governed surface with its own schema-face review. ## Verification - `pnpm --filter @objectstack/spec build` then `check:generated`: 13 of 14 current, `check:docs` stale → `--fix` → re-check green. - `vitest run src/ui/ src/stack-app-record-page` in `packages/spec`: 184 files, 6,587 tests pass. - `pnpm --filter @objectstack/spec typecheck`: OK. `check-doc-authoring`: clean (no tracker ids in the new strings). - Review: L1-d ACCEPT 7070350000 (S1 taken); Fable schema-face L2 PASS 7070380222 at d23ee9b, N1/N2 left as accepted deviations; delta at 1beb27d. The `18.page-slots-tabs-retired.ts` migration text is out of this diff (seat cards it). - No `ui/` reader pins the changed strings (`git grep` outside `packages/spec/src` and `content/docs`). ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (describe text only) - [x] 2. Every name I added uses the casing for its kind. (no names added) - [x] 3. No formatter ran; `pnpm lint` passes. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English (the 维护者速读 block is the maintainer's summary, in the maintainer's language). - [x] The *Before Submitting* list in CONTRIBUTING.md is done. Branch name is the harness-assigned `claude/project-thread-35li9y`. --- _Generated by [Claude Code](https://claude.ai/code/session_01L6bhgXoCkuUMPfxTyCaYUM)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgXoCkuUMPfxTyCaYUM <!-- signed: repo:objectstack#1 · os-sales · session_01L6bhgXoCkuUMPfxTyCaYUM --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 71e02ff commit 92e0475

7 files changed

Lines changed: 38 additions & 16 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
docs(spec): the page and action describes say where an authored record page is drawn
6+
7+
Clause-②: no
8+
Metadata-protocol: semantic
9+
10+
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.

‎content/docs/references/data/object.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ const result = ApiMethod.parse(data);
499499
| **description** | `string \| { dialect: 'template'; source?: string; ast?: any; meta?: object } \| string \| Record<string, string>` | 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. |
500500
| **objectName** | `string` | optional | Target object this action belongs to. When set, the action is auto-merged into the object's actions array by defineStack(). |
501501
| **icon** | `string` | optional | Icon name |
502-
| **locations** | `Enum<'list_toolbar' \| 'list_item' \| 'record_header' \| 'record_more' \| …>[]` | optional | Locations where this action is visible |
502+
| **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. |
503503
| **component** | `Enum<'action:button' \| 'action:icon' \| 'action:menu' \| 'action:group'>` | optional | Visual component override |
504504
| **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. |
505505
| **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. |

‎content/docs/references/kernel/metadata-plugin.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ const result = MetadataBulkResultSchema.parse(data);
325325
| **description** | `string \| { dialect: 'template'; source?: string; ast?: any; meta?: object } \| string \| Record<string, string>` | 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. |
326326
| **objectName** | `string` | optional | Target object this action belongs to. When set, the action is auto-merged into the object's actions array by defineStack(). |
327327
| **icon** | `string` | optional | Icon name |
328-
| **locations** | `Enum<'list_toolbar' \| 'list_item' \| 'record_header' \| 'record_more' \| …>[]` | optional | Locations where this action is visible |
328+
| **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. |
329329
| **component** | `Enum<'action:button' \| 'action:icon' \| 'action:menu' \| 'action:group'>` | optional | Visual component override |
330330
| **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. |
331331
| **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. |

‎content/docs/references/ui/action.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const result = ActionSchema.parse(data);
4848
| **description** | `string \| { dialect: 'template'; source?: string; ast?: any; meta?: object } \| string \| Record<string, string>` | 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. |
4949
| **objectName** | `string` | optional | Target object this action belongs to. When set, the action is auto-merged into the object's actions array by defineStack(). |
5050
| **icon** | `string` | optional | Icon name |
51-
| **locations** | `Enum<'list_toolbar' \| 'list_item' \| 'record_header' \| 'record_more' \| 'record_related' \| 'record_section'>[]` | optional | Locations where this action is visible |
51+
| **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. |
5252
| **component** | `Enum<'action:button' \| 'action:icon' \| 'action:menu' \| 'action:group'>` | optional | Visual component override |
5353
| **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. |
5454
| **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. |

0 commit comments

Comments
 (0)