Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions .changeset/37792-object-pin-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
'@objectstack/spec': minor
'@object-ui/plugin-detail': minor
'@object-ui/app-shell': minor
'@objectstack/platform-objects': minor
'@objectstack/metadata-core': minor
---

feat: an object can keep its record page from pinning the overview, with `pinOverview: false`

Clause-②: yes (widening) — `ObjectSchema` gains the optional boolean `pinOverview`; `RecordPageColumns` gains the optional `pinOverview` prop, and `recordPagePinsDetails` an optional fourth argument of the same name
Metadata-protocol: added

On a wide desktop full record page the overview (the record's own fields) is pinned to a left column beside the other tabs. An object can now turn that off with `pinOverview: false`: the page keeps the overview as its first tab, open by default, and lays its fields out by width in up to three columns, as a page whose overview is its only tab does, at any width and also when the overview holds a related table. Leaving the key out, or writing `true`, keeps the page exactly as before. Only the desktop full standard record page reads it: the side preview and a phone never pin, so they look the same either way, and print pages and authored `kind: 'full' | 'html' | 'react'` pages do not read it. An object extension cannot write it (refused with a message naming `ObjectSchema.pinOverview`), and a non-boolean value is refused at parse. The object metadata form offers it as a switch; an untouched switch writes nothing.

Nothing to migrate.
1 change: 1 addition & 0 deletions content/docs/references/data/object.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ const result = ApiMethod.parse(data);
| **imageField** | `string` | optional | The record's picture: names the field the record page header (record chrome) draws beside the title — one object-level declaration every record detail page reads, not a per-page header prop. Must name a field of this object whose type is `image` or `avatar`; any other name is refused. A record whose field is empty shows no picture (no initials or placeholder). |
| **highlightFields** | `string[]` | optional | [ADR-0085] Ordered most-important fields; first entry wins where only one fits. Drives default list and related-list columns, cards, hover cards, previews and the record picker; the default record page draws no strip from it. Renamed from compactLayout. |
| **relatedLists** | `(string \| { list: string; label?: string; columns?: string[] })[]` | optional | The record page's tabs beside the overview, in order. Absent: every related list shows (owned master_detail children, then lookup children), then attachments, approvals and the activity stream, as before. Declared: only the lists named here show, in this order; leaving one out hides its tab. A child list another package brings is not hidden by it: that package places the list with its object extension's place entry (an `{ list, after \| before }` entry), and an unplaced one shows at the end of the tabs, before approvals and the activity stream; this object may also name it, which a build accepts only when that package is in the stack, and then its own position wins. Each entry is a child object name (e.g. "task"), object.field when that child has more than one relationship to this object (e.g. "event.related_to"), or a built-in tab: "sys_attachment" (attachments, still only when enable.files is on; not shown when unlisted), "sys_approval_request" (approvals, still only when the record has requests; when unlisted it follows the listed tabs), "sys_activity" (the activity stream of activities, discussion and changes; when unlisted it comes last). An entry may instead be `{ list, label?, columns? }` to give that list its own title and child-field columns (wins over the child FK's relatedListTitle / relatedListColumns, used wherever the list is drawn); a built-in tab is written only as its bare name. relatedList: false on the FK still hides a list; body tables placed by fieldGroups are not hidden by this list. A name whose child is in the stack but has no inbound lookup / master_detail field to this object is refused everywhere; one whose child exists nowhere is refused by os validate / os build (which leave a sys_ / cloud_ / ai_ name to the runtime) and by a metadata write that names no package; a write into a package stores it and the record page places nothing for it. A columns name that resolves to no field of the child (a dotted name is walked through the child's relationships, as relatedListColumns is) is refused. |
| **pinOverview** | `boolean` | optional | Whether the desktop full standard record page pins the overview (the record's own fields) to a left column beside its other tabs. Absent or true: derived as before (a full page wide enough for both columns, with another tab and no related table among the fields, pins). false: the desktop full page never pins, at any width; the overview is its first tab, open by default, and its fields lay out by width in up to three columns, also when the overview holds a related table. Read by the desktop full standard record page alone: the side preview and a phone draw the same either way, and print pages and authored kind: full \| html \| react pages do not read it. Not accepted on an object extension. |
| **stageField** | `string \| false` | optional | [ADR-0085] Lifecycle stage field (linear/ordered), or false to declare the status field non-linear and suppress stage heuristics. Absent = heuristic detection allowed. When the named field carries options, it must be a single-value `select` / `radio` with inline `options`, each declaring its `kind` ('open' / 'won' / 'lost'); a picklist-backed or multi-value stage field is refused. A name that resolves to no declared field, or a field with no options, is not judged at parse. |
| **editMode** | `Enum<'modal' \| 'page'>` | optional | Edit-interaction intent for records of this object: 'modal' opens the edit form as a dialog over the current view; 'page' navigates to a dedicated full-page edit route. Absent = the renderer picks its own default (objectui defaults to modal). Cross-renderer intent, not pixel styling (family). |
| **listViews** | `Record<string, { name?: string; label?: string \| Record<string, string>; type?: Enum<'grid' \| 'kanban' \| 'gallery' \| 'calendar' \| 'timeline' \| 'gantt' \| 'map' \| …>; data?: object \| object \| object; … }>` | optional | Built-in named list views (segmented tabs) shipped with the object schema — "views" mode, dropdown userFilters allowed, no page-only tabs (ADR-0047) |
Expand Down
21 changes: 21 additions & 0 deletions content/docs/ui/pages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,27 @@ whose details hold a related table, draws the details across the page. Narrower
the drawer and a phone draw one column: the tab row, **Details** first, and the open tab
under it.

An object that declares `pinOverview: false` keeps its desktop full page from pinning at any
width: the page draws the tab row with **Details** first and open by default, and lays the
fields out by the page's width in up to three columns, as a page whose details are its only tab
does, also when the details hold a related table. Leaving the key out, or writing `true`, keeps
the layout above. The drawer and a phone draw the same either way, and an object extension
cannot write the key.

```ts
import { ObjectSchema, Field } from '@objectstack/spec/data';

export const Policy = ObjectSchema.create({
name: 'policy',
label: 'Policy',
pinOverview: false,
fields: {
title: Field.text({ label: 'Title' }),
body: Field.markdown({ label: 'Body' }),
},
});
```

The related lists load in steps, and the details never wait for them. The page asks every
list's count in one request set, sent beside the record read, and draws each list's tab
before those counts land; a list counted at 0 reads no rows, and its tab is muted, with no
Expand Down
2 changes: 2 additions & 0 deletions packages/metadata-core/src/object-schema-fls-references.ts
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,8 @@ export const OBJECT_REFERENCE_POSITIONS: Readonly<Record<string, Scrub>> = {
name: keep, label: keep, pluralLabel: keep, description: keep, icon: keep, color: keep, actionLayout: keep, isSystem: keep,
managedBy: keep, ownership: keep, systemFields: keep, datasource: keep, access: keep,
requiredPermissions: keep, fileAccessDelegate: keep, schemaReadDelegate: keep, editMode: keep, enable: keep,
// The record page layout switch (ADR-0085's Note of 2026-11-27): a boolean, no field name.
pinOverview: keep,
sharingModel: keep, externalSharingModel: keep, protection: keep,
// [#25760] The per-object sharing opt-ins (`sharing.controlledByParent.ownerMayEdit`,
// ADR-0055 §3 amendment): a block of booleans that names no field.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,11 @@ describe('#17501 — /meta/types serves a real schema for `action`, and moves no
// from (ADR-0160 D8), which gives its MCP prompt a record argument.
// [#37402] `object` 52 → 53: `uiReadonlyWhen`, the whole-record hand lock
// (no person edits a field of the record at the console; writes keep it).
// [#37792] `object` 53 → 54: `pinOverview`, the record page layout switch
// (ADR-0085's Note of 2026-11-27).
const CARD_PROPERTY_COUNTS: Record<string, number> = {
agent: 24, app: 24, dashboard: 21, dataset: 17, field: 89, flow: 24,
hook: 24, object: 53, page: 28, position: 14, report: 24, skill: 18, tool: 14,
hook: 24, object: 54, page: 28, position: 14, report: 24, skill: 18, tool: 14,
};

it.each(Object.entries(CARD_PROPERTY_COUNTS))(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ export const arMetadataForms: NonNullable<TranslationData['metadataForms']> = {
label: "علامات تبويب صفحة السجل",
helpText: "علامات تبويب صفحة السجل بعد النظرة العامة، بالترتيب. كل إدخال اسم كائن فرعي (مثل task)، أو object.field عندما تكون لذلك الكائن الفرعي أكثر من علاقة بهذا الكائن، أو علامة تبويب مدمجة (sys_attachment وsys_approval_request وsys_activity)، أو إدخال بعنوانه وأعمدته الخاصة يُضبط في إعدادات الكائن في Studio. بمجرد إدراج أي شيء، لا تظهر علامة تبويب لقائمة مرتبطة لا يسمّيها أي إدخال، بما في ذلك قائمة تضيفها حزمة أخرى، إلى أن يسمّيها هذا الكائن؛ ولا تظهر المرفقات إلا عند إدراجها. فارغ: تظهر كل القوائم بالترتيب الافتراضي. يُرفض عند حفظ الكائن أي اسم لا يطابق علاقة تشير إلى هذا الكائن."
},
pinOverview: {
label: "Pin Overview",
helpText: "Whether the wide desktop record page pins the overview (the record's own fields) to a left column beside the other tabs. Unset: it pins as before wherever the page is wide enough and has other tabs; an untouched switch writes nothing, so it reads off while the page still pins. Off once set: the desktop full page never pins, at any width, and the overview is its first tab, open by default, its fields laid out by width in up to three columns, also when the overview holds a related table. The side preview and a phone draw the same either way."
},
searchableFields: {
label: "الحقول القابلة للبحث",
helpText: "أسماء الحقول التي يطابقها استعلام $search ‏(ADR-0061): القيمة الافتراضية لمنتقي السجلات والبحث السريع في القوائم والبحث العام؛ ويمكن لطريقة العرض تضييقها. عند عدم تعيينها، يستخدم البحث حقل الاسم/العنوان إضافة إلى الحقول النصية القصيرة. يجب أن يسمّي كل إدخال حقلًا مخزَّنًا من هذا الكائن — ويُرفض عند النشر الاسم المجهول أو حقل الصيغة الافتراضي."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ export const arGeneratedSourceHashes: Readonly<Record<string, string>> = {
"metadataForms.knowledge_source.sections.records.label": "9e5814dbd123f1c1",
"metadataForms.knowledge_source.sections.refresh.description": "79311cb3f9e55b89",
"metadataForms.knowledge_source.sections.refresh.label": "1b63ae2e002930a6",
"metadataForms.object.fields.pinOverview.helpText": "768f0157c04d4ee2",
"metadataForms.object.fields.pinOverview.label": "901b14e51cd49243",
"metadataForms.permission.fields.fields.helpText": "887a0bae04a950e2",
"metadataForms.permission.fields.objects.helpText": "e2512cfb3b501aae",
"metadataForms.permission.fields.tabPermissions.helpText": "8942e2aebe59897c",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ export const deMetadataForms: NonNullable<TranslationData['metadataForms']> = {
label: "Tabs der Datensatzseite",
helpText: "Die Tabs der Datensatzseite nach der Übersicht, in Reihenfolge. Jeder Eintrag ist der Name eines untergeordneten Objekts (z. B. task), object.field, wenn dieses Objekt mehr als eine Beziehung zu diesem Objekt hat, ein integrierter Tab (sys_attachment, sys_approval_request, sys_activity) oder ein Eintrag mit eigenem Titel und eigenen Spalten, festgelegt in den Objekteinstellungen von Studio. Sobald etwas aufgeführt ist, zeigt eine verknüpfte Liste, die kein Eintrag nennt, keinen Tab, auch eine Liste, die ein anderes Paket hinzufügt, bis dieses Objekt sie nennt; Anhänge erscheinen nur, wenn sie aufgeführt sind. Leer: Alle Listen erscheinen in der Standardreihenfolge. Ein Name, der keiner auf dieses Objekt zeigenden Beziehung entspricht, wird beim Speichern des Objekts abgelehnt."
},
pinOverview: {
label: "Pin Overview",
helpText: "Whether the wide desktop record page pins the overview (the record's own fields) to a left column beside the other tabs. Unset: it pins as before wherever the page is wide enough and has other tabs; an untouched switch writes nothing, so it reads off while the page still pins. Off once set: the desktop full page never pins, at any width, and the overview is its first tab, open by default, its fields laid out by width in up to three columns, also when the overview holds a related table. The side preview and a phone draw the same either way."
},
searchableFields: {
label: "Durchsuchbare Felder",
helpText: "Feldnamen, auf die die Abfrage $search passt (ADR-0061): der Standard für die Datensatzauswahl, die Schnellsuche der Liste und die globale Suche; eine Ansicht kann ihn einschränken. Nicht gesetzt, sucht die Suche im Namens-/Titelfeld und in kurzen Textfeldern. Jeder Eintrag muss ein gespeichertes Feld dieses Objekts benennen – ein unbekannter Name oder ein virtuelles Formelfeld wird bei der Veröffentlichung abgelehnt."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ export const deGeneratedSourceHashes: Readonly<Record<string, string>> = {
"metadataForms.object.fields.enable.feeds.label": "669c64671f632139",
"metadataForms.object.fields.lifecycle.storage.shards.label": "739988affb36b2e0",
"metadataForms.object.fields.name.label": "5274417ff1ccaf01",
"metadataForms.object.fields.pinOverview.helpText": "768f0157c04d4ee2",
"metadataForms.object.fields.pinOverview.label": "901b14e51cd49243",
"metadataForms.object.fields.userActions.import.label": "05c80d3a61ec3290",
"metadataForms.page.fields.name.label": "5274417ff1ccaf01",
"metadataForms.page.sections.layout.label": "7f508ea1bb2c3a6b",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ export const enMetadataForms: NonNullable<TranslationData['metadataForms']> = {
label: "Related Lists",
helpText: "The record page tabs after the overview, in order. Each entry is a child object name (e.g. task), object.field when that child has more than one relationship to this object, a built-in tab (sys_attachment, sys_approval_request, sys_activity), or an entry with its own title and columns, set in App Studio's object settings. Once anything is listed, a related list no entry names shows no tab, a list another package adds included, until this object names it; attachments show only when listed. Empty: every list shows in the default order. A name that matches no relationship pointing at this object is refused when the object is saved."
},
pinOverview: {
label: "Pin Overview",
helpText: "Whether the wide desktop record page pins the overview (the record's own fields) to a left column beside the other tabs. Unset: it pins as before wherever the page is wide enough and has other tabs; an untouched switch writes nothing, so it reads off while the page still pins. Off once set: the desktop full page never pins, at any width, and the overview is its first tab, open by default, its fields laid out by width in up to three columns, also when the overview holds a related table. The side preview and a phone draw the same either way."
},
searchableFields: {
label: "Searchable Fields",
helpText: "Field names the $search query matches (ADR-0061): the default for the record picker, list quick-search and global search; a view may narrow it. Unset, search uses the name/title field plus short-text fields. Each entry must name a stored field of this object — an unknown name or a virtual formula field is refused at publish."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ export const esESMetadataForms: NonNullable<TranslationData['metadataForms']> =
label: "Pestañas de la página de registro",
helpText: "Las pestañas de la página de registro después del resumen, en orden. Cada entrada es el nombre de un objeto hijo (p. ej., task), object.field cuando ese hijo tiene más de una relación con este objeto, una pestaña integrada (sys_attachment, sys_approval_request, sys_activity) o una entrada con su propio título y columnas, definida en la configuración del objeto en Studio. En cuanto se enumera algo, una lista relacionada que ninguna entrada nombra no muestra pestaña, incluida una lista que añade otro paquete, hasta que este objeto la nombre; los adjuntos solo se muestran si se enumeran. Vacío: todas las listas se muestran en el orden predeterminado. Un nombre que no coincide con ninguna relación que apunte a este objeto se rechaza al guardar el objeto."
},
pinOverview: {
label: "Fijar resumen",
helpText: "Si la página de registro de escritorio ancha fija el resumen (los campos propios del registro) en una columna izquierda junto a las demás pestañas. Sin definir: se fija como antes siempre que la página sea lo bastante ancha y tenga otras pestañas; un interruptor sin tocar no escribe nada, por lo que aparece desactivado mientras la página sigue fijada. Desactivado una vez definido: la página completa de escritorio nunca se fija, en ningún ancho, y el resumen es su primera pestaña, abierta por defecto, con los campos dispuestos según el ancho en hasta tres columnas, también cuando el resumen contiene una tabla relacionada. La vista previa lateral y un teléfono se ven igual en ambos casos."
},
searchableFields: {
label: "Campos buscables",
helpText: "Nombres de campo con los que coincide la consulta $search (ADR-0061): el valor predeterminado del selector de registros, la búsqueda rápida de listas y la búsqueda global; una vista puede acotarlo. Sin definir, la búsqueda usa el campo de nombre/título más los campos de texto corto. Cada entrada debe nombrar un campo almacenado de este objeto: un nombre desconocido o un campo formula virtual se rechaza al publicar."
Expand Down
Loading
Loading