Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
86ad71b
feat(spec): an object pins its header buttons per page type, at most …
claude Nov 22, 2026
b8b61fa
feat(objectql): the object fold carries an extension's pinned header …
claude Nov 22, 2026
30ce734
feat(lint): a pinned header action that names no placed action is ref…
claude Nov 22, 2026
e2d345d
feat(console): the page headers draw an object's pinned actions, and …
claude Nov 22, 2026
57260c1
test(spec): the merge refusal and the dropped-refinements header coun…
claude Nov 22, 2026
a4643c6
fix(console): 「Header buttons」 is offered only on a record header tha…
claude Nov 22, 2026
bda5fa1
fix(spec): the pinned actions' closed-shape history names no issue id…
claude Nov 22, 2026
47f8903
refactor: the pinned header actions become an action layout per scope…
claude Nov 22, 2026
e61e965
feat(console): the header-buttons panel says which arranged names are…
claude Nov 23, 2026
3cd2325
docs, test: the action layout's docs, changeset and liveness row say …
claude Nov 23, 2026
20b2fbf
chore(spec): regenerate the action layout's api surface, export origi…
claude Nov 23, 2026
a630039
test: recount the object property, form-leaf and de quote-pair pins f…
claude Nov 23, 2026
72ec1b2
test(console): the record header's More order reads past the host's o…
claude Nov 23, 2026
5b2d963
chore(spec): the action layout's comments name scopes, pinned and mor…
claude Nov 23, 2026
bc0f11a
fix: the action layout fold moves beside the fold scalars, and the CL…
claude Nov 23, 2026
649fc02
test(console): the header-pins save test types its input as the actio…
claude Nov 23, 2026
5b532c7
Merge origin/main into the action layout branch (#36366)
claude Nov 23, 2026
564840d
chore(spec): regenerate the api surface, export origins and object re…
claude Nov 23, 2026
ebd99fe
Merge origin/main into the action layout branch (#36366)
claude Nov 23, 2026
6303c52
chore: the changeset names the skills follow-up card (#36366)
claude Nov 23, 2026
49a3175
fix(objectql,spec): actionLayout is the paired .custom package's thir…
claude Nov 23, 2026
d871e26
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Nov 23, 2026
8a85482
fix(app-shell): the header-pins save writes an installed object throu…
claude Nov 23, 2026
cf784c7
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Nov 23, 2026
d23e460
chore(merge): regenerate object.mdx and pin the merged de quote-pair …
claude Nov 23, 2026
e683f40
docs(spec): actionLayout sits on the object as a ruled ADR-0085 excep…
claude Nov 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .changeset/36366-object-action-layout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
'@objectstack/spec': minor
'@objectstack/objectql': minor
'@objectstack/lint': minor
'@objectstack/metadata-core': patch
'@objectstack/metadata-protocol': patch
'@objectstack/platform-objects': patch
'@object-ui/types': minor
'@object-ui/components': patch
'@object-ui/app-shell': patch
'@object-ui/i18n': patch
---

feat: an object arranges its actions per scope (`actionLayout`: pinned buttons and the 「More」 order), and the design mode sets it

Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: follow-up #36630

A page header draws at most three of its actions as buttons and puts the rest in its 「More」 menu. An object now arranges them itself with the new optional key `actionLayout` on `ObjectSchema` and `ObjectExtensionSchema`: `{ list?: Arm, record?: Arm }`, where `Arm = { pinned: string[], more?: string[] }`. `pinned` names the buttons in the order drawn, at most three (`[]` pins none); `more` orders the 「More」 menu; an action the scope places that neither part names goes to the end of 「More」 in its default order. A pinned action that is hidden leaves its button out, and no other action takes its place.

- `list` arranges the actions placed at `list_toolbar` and the list page's built-ins `$import` and `$export`. A built-in is only ever pinned: one named in `more` is refused with its reason, since not pinned the list page draws it in its own Import / Export menu.
- `record` arranges the actions placed at `record_header` or `record_more`. It is a scope, not a page: the record page header, the side preview and a phone's bottom action bar all read it. A `page:header` that authors its own `actions` list keeps that list.
- An arm left out (or the key left out) draws that scope exactly as before.

What each package gains:

- `@objectstack/spec`: the key and its shape refusals at every door (more than three pinned, a name given twice in one part or in both, a malformed name, a built-in the scope does not have, a built-in in `more`, since a built-in is only ever pinned), each with its reason. New exports `OBJECT_ACTION_LAYOUT_PINNED_LIMIT`, `OBJECT_ACTION_LAYOUT_SCOPES`, `OBJECT_ACTION_LAYOUT_BUILTINS` and the types `ObjectActionLayoutScope`, `ObjectActionLayout`, `ObjectActionLayoutArm`. The object form offers it under Advanced, one JSON row per arm.
- `@objectstack/objectql`: `actionLayout` joins `fieldGroups` and `relatedLists` as a key only the base's paired `.custom` package writes on an `object_extension` (ADR-0146 D10). It is applied last, after every other layer, arm by arm: each arm it writes replaces the served arm for that scope whole, and an arm it leaves out stays. A manifest's `objectExtensions` entry now carries the key to the fold.
- `@objectstack/metadata-protocol`: the one judge refuses `actionLayout` from any other package, naming the action's own `locations` and `order` as the way to place an action the package brings. Each door says it its own way: publish, restore and draft promotion of an `object_extension` answer `VALIDATION_ERROR` / 400; marketplace install refuses the package body with `VALIDATION_ERROR` / 422; `os validate` and `os build` exit non-zero and print the row; the registry fold skips the key and leaves a note.
- `@objectstack/lint`: `validateObjectActionLayout` (`object-action-layout-unknown`, `object-action-layout-not-placed`, at `error`) refuses in `os validate`, `os build` and `os lint` a name, in either part, that is no action of the object or is not placed in the scope its arm arranges.
- `@object-ui/types`: `arrangedHeaderActions(actions, arm, scope)`, the one reader both record headers and the list header apply, and `readActionLayoutArm`.
- The console: both record headers (the default page's and an authored `page:header` with `placedActions: true`) and the list header draw the arrangement. In the design mode, 「Header buttons」 at the end of the page header lists the scope's actions under 「Pinned to header」 and 「Other」 (the 「More」 menu), each dragged into order; a dot moves an action between them, a fourth pin is refused with a toast, the header shows the change at once, and 「Save」 writes only the arms that changed: into the object's own package when it is writable, else into the installed object's customization package as an `object_extension`, through the one writer of an installed object's arrangement (`saveObjectExtensionArrangement`, whose patch type now takes the object-shaped `actionLayout`), which refuses a customization package the server does not list writable. A name the scope no longer offers is listed in the panel as left out. A name the header cannot draw is refused at save with its reason. New `@object-ui/i18n` keys under `designMode.pins`.
4 changes: 3 additions & 1 deletion content/docs/data-modeling/object-extensions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ check that spelling first.
| `description` | Same as `label`. |
| `place` | **Applied once, after every extension's fields are merged.** Says where the fields, groups and child lists this extension brings go on the target — [below](#placing-what-you-bring). |
| `fieldGroups`, `relatedLists` | **Only in a base's paired `.custom` package. Each replaces, whole.** The complete field arrangement and the complete tab list of the target, applied last — [below](#arranging-the-whole-record-page). In any other package they are refused, and `place` is the key to use. |
| `actionLayout` | **Only in a base's paired `.custom` package. Applied arm by arm, last.** Each `list` or `record` arm it writes (`{ pinned, more }`) replaces the arm the target serves for that scope whole; an arm it leaves out stays. In any other package it is refused, and an action the package brings is placed by its own `locations` and `order`. See [choosing the header's buttons](/docs/ui/actions#choose-the-headers-buttons). |
| `priority` | Not merged — it *orders* the merge. `0`–`999`, default `200`. |

Added fields are ordinary fields, so everything on the
Expand Down Expand Up @@ -276,7 +277,8 @@ D10). The object is extended, never replaced:
- **An object takes no `overrides` declaration.** Declaring one on an object is refused,
naming the extension as the route.
- **The pair may arrange the whole record page.** Its extension, and no other package's,
writes `fieldGroups` and `relatedLists` — [below](#arranging-the-whole-record-page).
writes `fieldGroups` and `relatedLists` — [below](#arranging-the-whole-record-page) —
and `actionLayout`, the order of the object's actions and which are header buttons.

{/* os:check */}
```typescript
Expand Down
2 changes: 1 addition & 1 deletion content/docs/deployment/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ os compile --json # JSON output for CI pipelines
→ Normalizing stack definition...
→ Lowering inline handlers...
→ Validating protocol compliance...
→ Running author-time rules (76)...
→ Running author-time rules (77)...
→ Checking that every required capability has a provider installable in this edition...
→ Collecting package docs (ADR-0046)... 0 collected
→ Writing artifact...
Expand Down
2 changes: 1 addition & 1 deletion content/docs/deployment/validating-metadata.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ A clean run walks the registry and reports timing:
Config: /path/to/support-desk/objectstack.config.ts
Load time: 21ms
→ Validating against ObjectStack Protocol...
→ Running author-time rules (76)...
→ Running author-time rules (77)...
→ Checking that every required capability has a provider installable in this edition...
→ Checking package docs (ADR-0046)...

Expand Down
2 changes: 1 addition & 1 deletion content/docs/getting-started/build-with-claude-code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ visible: 'status != "resolved"'
◆ Validate
────────────────────────────────────────
→ Validating against ObjectStack Protocol...
→ Running author-time rules (76)...
→ Running author-time rules (77)...

✗ Author-time rules failed (1 issue)
• stack · action 'resolve_ticket' visible: bare reference `status` — a
Expand Down
1 change: 1 addition & 0 deletions content/docs/references/api/metadata.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,7 @@ Metadata query with filtering, sorting, and pagination
| **description** | `string` | optional | Developer documentation / description |
| **icon** | `string` | optional | Icon name (Lucide/Material) for UI representation |
| **color** | `Enum<'gray' \| 'blue' \| 'teal' \| 'green' \| 'amber' \| 'orange' \| 'red' \| 'pink' \| 'purple'>` | optional | Object colour, one name from the fixed palette (gray, blue, teal, green, amber, orange, red, pink, purple). The console draws the object's icon as a white glyph on a rounded square of this colour, so one object looks the same wherever its icon appears. No free colour values. Omit to draw the neutral `gray`. |
| **actionLayout** | `{ list?: object; record?: object }` | optional | The order of the object's actions and which are buttons, per action scope (`list`, `record`): `pinned` (at most 3 buttons, in order) and `more` (the 「More」 menu order; unnamed actions follow in their default order). Omit to keep each surface's own choice (each action's `order`). |
| **isSystem** | `boolean` | optional (default: `false`) | Is system object (protected from deletion; defaults its org-wide sharing to public when no sharingModel is set — plugin-sharing) |
| **managedBy** | `Enum<'platform' \| 'config' \| 'system-data' \| 'engine-owned' \| 'append-only' \| …>` | optional | Lifecycle bucket — platform (user CRUD) \| config (admin authored) \| system-data (platform-defined schema, admin/user-writable data) \| engine-owned (engine owns the lifecycle, no user writes) \| append-only (audit) \| synced (rows copied by a pull from a connector or federated source; read-only to members, and userActions cannot open a write) \| better-auth (identity). UI clients honour the resolved affordance matrix. |
| **ownership** | `Enum<'user' \| 'business_unit' \| 'org' \| 'none'>` | optional | Record-ownership model: user (default — injects reassignable owner_id plus owning_business_unit_id) \| business_unit (unit-owned: owning_business_unit_id only, no owner_id) \| org \| none (no per-record owner, neither anchor). Distinct from the package own/extend contribution kind. |
Expand Down
16 changes: 16 additions & 0 deletions content/docs/references/data/object.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ const result = ApiMethod.parse(data);
| **description** | `string` | optional | Developer documentation / description |
| **icon** | `string` | optional | Icon name (Lucide/Material) for UI representation |
| **color** | `Enum<'gray' \| 'blue' \| 'teal' \| 'green' \| 'amber' \| 'orange' \| 'red' \| 'pink' \| 'purple'>` | optional | Object colour, one name from the fixed palette (gray, blue, teal, green, amber, orange, red, pink, purple). The console draws the object's icon as a white glyph on a rounded square of this colour, so one object looks the same wherever its icon appears. No free colour values. Omit to draw the neutral `gray`. |
| **actionLayout** | `{ list?: object; record?: object }` | optional | The order of the object's actions and which are buttons, per action scope (`list`, `record`): `pinned` (at most 3 buttons, in order) and `more` (the 「More」 menu order; unnamed actions follow in their default order). Omit to keep each surface's own choice (each action's `order`). |
| **isSystem** | `boolean` | optional (default: `false`) | Is system object (protected from deletion; defaults its org-wide sharing to public when no sharingModel is set — plugin-sharing) |
| **managedBy** | `Enum<'platform' \| 'config' \| 'system-data' \| 'engine-owned' \| 'append-only' \| 'synced' \| 'better-auth'>` | optional | Lifecycle bucket — platform (user CRUD) \| config (admin authored) \| system-data (platform-defined schema, admin/user-writable data) \| engine-owned (engine owns the lifecycle, no user writes) \| append-only (audit) \| synced (rows copied by a pull from a connector or federated source; read-only to members, and userActions cannot open a write) \| better-auth (identity). UI clients honour the resolved affordance matrix. |
| **ownership** | `Enum<'user' \| 'business_unit' \| 'org' \| 'none'>` | optional | Record-ownership model: user (default — injects reassignable owner_id plus owning_business_unit_id) \| business_unit (unit-owned: owning_business_unit_id only, no owner_id) \| org \| none (no per-record owner, neither anchor). Distinct from the package own/extend contribution kind. |
Expand Down Expand Up @@ -197,6 +198,13 @@ const result = ApiMethod.parse(data);
| **_packageVersion** | `string` | optional | Owning package version. |
| **_lockDocsUrl** | `string` | optional | Optional documentation link surfaced next to _lockReason. |

### Nested Shape: `Object.actionLayout`

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **list** | `{ pinned: string[]; more?: string[] }` | optional | The list scope's arrangement: actions of the object placed at `list_toolbar`, as drawn on the list page toolbar, and `$import` / `$export` as pinned buttons (not pinned, they stay in the page's own Import / Export menu). Omit to draw it as before. |
| **record** | `{ pinned: string[]; more?: string[] }` | optional | The record scope's arrangement: actions of the object placed at `record_header` or `record_more`, as drawn in the record header (record page, side preview, a phone's bottom bar). Omit to draw it as before. |

### Nested Shape: `Object.userActions`

| Property | Type | Required | Description |
Expand Down Expand Up @@ -616,6 +624,7 @@ const result = ApiMethod.parse(data);
| **label** | `string` | optional | Override label for the extended object |
| **pluralLabel** | `string` | optional | Override plural label for the extended object |
| **description** | `string` | optional | Override description for the extended object |
| **actionLayout** | `{ list?: object; record?: object }` | optional | The arrangement of the extended object's actions, per scope (`list`, `record`), in the object's own shape. Written only by the object extension of the paired `.custom` package of the App the object belongs to (ADR-0146 D10). An extension in a package that is not a `.custom` package is refused at publish, by `os validate` / `os build` and at install, and the registry merge skips it with a warning; an action that package brings is placed by its own `locations` and `order`. A `.custom` package that is not this object's pair is not applied. Each arm written replaces the arm the object serves for that scope, whole, after every other layer; an arm not written stays as the object gives it, and removing the key, or uninstalling or disabling the package, restores it. |
| **validations** | `any[]` | optional | Additional validation rules to merge into the target object |
| **indexes** | `{ name?: string; fields: string[]; unique?: false \| 'global' \| 'organization' }[]` | optional | Additional indexes to merge into the target object |
| **place** | `({ field: string; group: string; after?: string; before?: string } \| { list: string; after?: string; before?: string; label?: string; … } \| { group: object; after?: string; before?: string })[]` | optional | Where the fields, groups and child lists this extension brings go on the extended object. Each entry is one of: `{ field, group, after \| before }` — a field of this extension's own `fields`, into a field group (the extended object's, or one this extension adds), right after or before a member of that group; `{ group: { key, label, … }, after \| before }` — a field group of this extension's own (its `fields` may name only fields this extension adds, its `relatedList` only a child list of this package), right after or before a group of the extended object; `{ list, after \| before, label?, columns? }` — a child list of this package (a child object of the same package that points at the extended object, or object.field), right after or before a tab of the extended object (a relatedLists entry name, a built-in tab included), with that tab's own title and columns (each column a field of the child, judged as a relatedLists entry's columns are). Write `after` or `before`, or neither for the end. An anchor may be an item another placement brings, whatever order the two are written or registered in. An anchor nobody has puts the item at the end of its group, of the groups, or of the tabs (before the approvals and activity-stream tabs); a group that does not exist puts the field among the ungrouped fields. Nothing is dropped. Several items at one anchor follow ascending `priority`, then package name, so every build gives the same order. Placement arranges what the extended object declares: list placements apply when it declares `relatedLists`, group and field placements when it declares `fieldGroups`. Where it declares none, its automatic arrangement stays as it is and the item still shows there: the list in the automatic tab order, with this entry's `label` and `columns` not applied either (write them on the child's own lookup field as `relatedListTitle` / `relatedListColumns`, which apply on every parent), and the field among the fields in declaration order, its `after` / `before` not applied. The boot log names each placement that did not apply, with the object and the package; `os validate` names it too when the extended object is in the same stack. A child list another package brings shows even when the extended object's `relatedLists` does not name it: placed, at its place; unplaced, at the end of the tabs. An extension places only its own items: a field outside its own `fields` is refused here; a field the extended object declares (an owner field this extension redeclares for its display is still the owner's), a group key the extended object declares, and a list (or a group's `relatedList`) that is not a child object of its package are refused at `defineStack` where the objects are known; the merge skips each of them too, with a warning naming whose item it is. A group key another package's extension already adds is not refused: the merge adds it once and names the second. Applied once, by the registry merge, so the record page, the forms and Studio show one arrangement; uninstalling the package removes its items and leaves the extended object's own order as it was. Example: `place: [{ field: 'tax_id', group: 'basic', after: 'industry' }, { list: 'contract', after: 'opportunity', columns: ['name', 'amount'] }]`. |
Expand Down Expand Up @@ -724,6 +733,13 @@ const result = ApiMethod.parse(data);
| **placeholder** | `string` | optional | Placeholder text rendered inside the empty input (the HTML placeholder attribute); disappears once a value is entered. Distinct from `inlineHelpText` (always-visible help rendered beside/under the input) and `description` (tooltip/developer documentation). |
| **options** | `Record<string, { label?: string }>` | optional | Display patches of the base field's options, keyed by each option's stored `value` (which stays the vendor's); each entry takes the option display keys of BASE_FIELD_DISPLAY_WHITELIST. |

### Nested Shape: `ObjectExtension.actionLayout`

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **list** | `{ pinned: string[]; more?: string[] }` | optional | The list scope's arrangement: actions of the object placed at `list_toolbar`, as drawn on the list page toolbar, and `$import` / `$export` as pinned buttons (not pinned, they stay in the page's own Import / Export menu). Omit to draw it as before. |
| **record** | `{ pinned: string[]; more?: string[] }` | optional | The record scope's arrangement: actions of the object placed at `record_header` or `record_more`, as drawn in the record header (record page, side preview, a phone's bottom bar). Omit to draw it as before. |

### Nested Shape: `ObjectExtension.indexes[number]`

| Property | Type | Required | Description |
Expand Down
Loading
Loading