ObjectStackObjectStack

Page metadata — build custom app screens

Build custom pages with component-based layouts, variables, and event handling

A Page defines a custom UI layout using components, regions, and variables. Unlike Views which are bound to a single Object, Pages are flexible containers that can combine multiple components, embed views, and manage local state.

Basic Structure

const homePage = {
  name: 'sales_home',
  label: 'Sales Home',
  type: 'home',
  regions: [
    {
      name: 'header',
      width: 'full',
      components: [
        {
          type: 'metric_card',
          id: 'total_revenue',
          label: 'Total Revenue',
          properties: {
            object: 'opportunity',
            field: 'amount',
            aggregate: 'sum',
            format: 'currency',
          },
        },
      ],
    },
    {
      name: 'main',
      components: [
        {
          type: 'list_view',
          id: 'recent_deals',
          label: 'Recent Deals',
          properties: {
            object: 'opportunity',
            view: 'recent_open',
            limit: 10,
          },
        },
      ],
    },
  ],
};

Page Properties

PropertyTypeRequiredDescription
namestring✅Machine name (snake_case)
labelstring✅Display label
descriptionstringoptionalPage description
typeenumoptionalPage type (see below; default 'record')
objectstringoptionalAssociated object (for record type)
record{ object, view?, filter?, sort? }optionalThe row an app page is about. The console reads it once per page open: the FIRST row of this query 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. Refused on any page that is not type: 'app' (a record page's row is the record it opens)
templateenumoptionalLayout template: 'default' (the default), 'header-sidebar-main', 'three-column' or 'dashboard' — see Templates. Any other name is refused
kindenumoptionalPage override mode (default 'full'). full | slotted = structured authoring; html = author-written constrained JSX/HTML compiled (parsed, never executed) to the tree (ADR-0080; ADR-0081 named it html); react = real-React source executed at render by the runtime (ADR-0081) — it runs author JS, so it is gated by a host capability that defaults ON and is disabled server-side via OS_PAGE_REACT=off. See Authoring modes
regionsPageRegion[]optionalLayout regions with components (default [] — list pages render via interfaceConfig, slotted pages via slots, html/react pages via source; a kind: 'full' record page draws only these components, so one that places none is refused — delete it instead to keep the object's default record page, and give a page meant as a home, app or list page its type, which defaults to record (a record page with no object and an interfaceConfig.source draws as a list and is not judged))
slotsobjectoptionalSlot overrides for a kind: 'slotted' record page — see Slotted pages
sourcestringoptionalPage source text — required (and authoritative over regions) when kind is 'html' or 'react'. For kind: 'html' it is constrained JSX/HTML compiled to the tree by @objectstack/sdui-parser at save time (parse, never execute). For kind: 'react' it is real React/JSX executed at render by @object-ui/react-runtime (trusted tier). See React Pages
variablesPageVariable[]optionalLocal state variables
isDefaultbooleanoptionalThe default record page of its object — the page that object's record view opens. At most one isDefault: true record page per object per 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 home, app, utility or list page, or a record page with no object): nothing reads it there. A page does not choose where an app opens — see Page Types

Page Types

TypeDescriptionUse Case
recordTied to a specific object recordCustom detail pages
homeRegion page at the widest content widthOverviews and start pages
appRegion page at app content widthCustom layouts
utilityRegion page at the narrowest content width, inline in the main columnTools, settings, wizards
listRecord list/interface surfaceData-driven interface pages

home, app and utility render the same way — the page's regions, laid out by its template — and differ only in how wide the content runs. A home page is not a landing declaration: an app opens on its first navigation item (by order), so to make a page the one an app opens, put its navigation entry first; the root landing follows the app's own isDefault. A utility page is an ordinary inline page — there is no floating panel or utility bar that hosts it — and it cannot be a print page.

Earlier roadmap types (dashboard, form, record_detail, record_review, overview, blank) were removed from the schema because they never shipped a renderer (ADR-0049 enforce-or-remove); only the five types above are valid.

Authoring modes

A page's kind selects how the body is authored. Three modes ship, and the rest of this page describes the first one:

kindYou writeExecuted?Reach for it when
full (default) / slottedStructured regions / slots of components — the rest of this page—Record, home and app layouts assembled from the component catalogue
htmlA source string of constrained JSX: registered components plus safe native HTMLNo — parsed into the same component tree at save time by @objectstack/sdui-parserFree-form layout, landing pages and composed dashboards, including author- or AI-generated ones you have not reviewed
reactA source string of real React — hooks, handlers, arbitrary JSYes — in the app's own React tree, no sandboxInteractive business UIs — master/detail, wizards, state-driven filters — written by authors you trust

The two source tiers set source instead of regions. source is authoritative over regions: when both are present the source wins, and regions holds at most a derived cache of it. A page whose kind is html or react with no non-empty source is rejected by the schema rather than rendering empty.

'jsx', the tier's first name, was retired in @objectstack/spec 18: an authored kind: 'jsx' is refused with the prescription naming 'html'. Stored pages written as 'jsx' keep loading as html pages.

Because kind: 'react' executes author JavaScript, it is gated by a host capability that defaults OFF and is turned on server-side per deployment with OS_PAGE_REACT_ENABLED=true. The html tier is unaffected by that switch — it is never executed.

Neither source tier is styled with Tailwind utility classes. A page's source is runtime metadata, and the console's build-time Tailwind scans only the console's own source — so a utility class name in page source silently produces no CSS, with no error (ADR-0065). Style an html page with its components' structured props and a JSON style object; style a react page with inline style={{ … }} and hsl(var(--token)) theme colors.

Both tiers are checked at author time — block props, field bindings and source syntax — by os validate, os lint and os build alike. See React Pages for the full authoring guide and Validating metadata for the rules.

Regions

Regions define layout zones on the page. Each region contains components, and its name is the slot of the page's template it fills.

regions: [
  {
    name: 'sidebar',
    width: 'small',
    components: [/* ... */],
  },
  {
    name: 'main',
    components: [/* ... */],
  },
]
PropertyTypeRequiredDescription
namestring✅The template slot the region fills (see Templates); a name the template does not place is refused
widthenumoptional'small', 'medium', 'large', 'full'. A region named main takes only 'full', which is page-wide: the page drops its max-width cap and fills the screen. main is drawn at the width its template leaves it, so 'small', 'medium' and 'large' are refused there
componentsPageComponent[]✅Components in this region

Templates

A page's template decides where each region is drawn. Each template places a fixed set of region names (PAGE_TEMPLATE_SLOTS in @objectstack/spec/ui); names match case-insensitively.

TemplateRegions it places
defaultheader, sidebar, main, aside, footer — sidebar and aside beside main, header and footer spanning it
header-sidebar-mainheader, sidebar, main
three-columnheader, sidebar, main, aside, footer
dashboardheader, footer, and any other name — every other region is a grid cell

On a kind: 'full' page, a region its template does not place — left_sidebar, right_sidebar, content — is refused by os validate, os build and the metadata save door, naming the template's slots: the console would stack it under main at full width and ignore its width. Use sidebar for the left column and aside for the right. Each slot takes one region: a second main (or, on dashboard, a second header or footer) is not drawn at all, and is refused the same way. full-width is no longer a template name: it was a second name for default, and is refused with that replacement.

Record pages

The synthesized default

A record page needs no authoring. With no page assigned, the Console synthesizes one from the object: a header, the highlights strip, the record's details, and a right column of panels: 动态 (Activity) first, then the related lists, Approvals when the record has approval requests, and the attachments of an object with enable: { files: true }. A relationship whose child field declares relatedList: 'primary' is part of the record's body: its list is a full-width table in the details, after the first field section, with no panel of its own. 动态 is one stream: the discussion, the activity and, with enable: { trackHistory: true }, the record's field changes; there is no separate History tab. Its panel shows a one-line composer and the newest entries, and its header opens the whole stream (?related=timeline), filtered by All / Activity / Discussion / Changes. A related panel's header opens that list's whole table the same way (?related=<object>.<field>). Each of those faces is also a tab: a row of tabs closes the record header, Overview first, then 动态, then one tab per related panel in the reader's order, each with its count. The row shows as many tabs as its width fits and folds the rest into a +N menu; the open tab is always on the row, and Overview or Esc returns to the page. Moving a child table into the record's body is therefore a one-word change on the relationship field, not a page-authoring task, and relatedList: false leaves a child off the page.

The Console lays the page out by the width of the surface it occupies (the full page, the split pane or the drawer), never by the viewport, and by one rule. From 760 px the details sit beside the right column, 320 px wide; from 1120 px the right column is 380 px and a details section takes up to three field columns. Below 760 px (the split pane, a phone) the page is one column: the details, then the right column's panels in their order. The ⊟ switch at the end of the record header's actions (⌘⇧,) hides the right column for the reader, per object. The related panels are the reader's to arrange, too: drag a panel's ⠿ handle (or ⌥↑ / ⌥↓ on it) to reorder, hide a panel from its header, and bring hidden panels back from the column's last line. The arrangement is kept per user and object, never in the object's declaration.

The related panels load in steps, and the details never wait for them. The page asks every panel's count in one request set, sent beside the record read, and the panels show placeholders until those counts land. A panel counted at 0 reads no rows, and two or more of them fold into one line. A panel above 0 reads its first three rows once it scrolls into view, asking only for the record's name field and one status or date field. In a drawer, the record that ↑ / ↓ would show next has its related counts read ahead.

Slotted pages

kind: 'slotted' overrides only the parts of the synthesized page you name, and the synthesizer fills in the rest. A slotted page authors slots, not regions:

SlotReplaces
headerThe page:header node
actionsThe action bar (record:quick_actions)
alertsThe alert banners above the body
highlightsThe highlights strip
detailsThe record's details; the rest of the page stays synthesized
discussionThe discussion panel

Each slot takes one component or an array of them, and replaces its part whole: there is no deep merge. There is no tabs slot: the page's panels are composed from the object's fields and relationship flags. To change which related lists appear or their order, set relatedList / relatedList: 'primary' on the child's reference field; a page that needs its own strip is kind: 'full', drawn as authored. slots.tabs, slots.related and slots.relatedLists are refused by name, and os migrate meta --from 17 drops a stored slots.tabs.

const accountDetailPage = {
  name: 'account_detail_page',
  label: 'Account Detail',
  type: 'record',
  object: 'account',
  kind: 'slotted',
  regions: [],
  slots: {
    header: {
      type: 'page:header',
      properties: { title: '{name}', subtitle: '{industry} · {type}' },
    },
  },
};

Use a slotted page to change one or two parts of an otherwise standard record page, and a full page for a record page that looks nothing like the default.

The discussion panel is composed, never appended

A record page shows a discussion panel if and only if the page composes a record:discussion node (or record:chatter, the same block under another name). Synthesized and slotted pages compose it for you; a full page places it like any other block, and the node's own properties are honoured, so { type: 'record:discussion', properties: { feed: { showCommentInput: false } } } draws the conversation without a composer. The object outranks the page: enable: { feeds: false } suppresses the panel whether or not the page composes it, and the server refuses comments on such an object (403 FEEDS_DISABLED).

  • Permission-gated. A relationship whose child object the user cannot read produces no tab and no section, and a record:related_list on an authored page hides itself the same way.
  • Paged. A related list shows limit rows per page (5 unless set), fetched a page at a time with the count badge showing the whole collection; sort pins the initial order, and a user's column sort is sent to the server. A list that declares columns fetches only the declared columns the user can read.
  • Actions are ids. By default a related list draws the child object's own actions: those placed at list_toolbar as header buttons, and those at list_item or record_related in each row's menu (record_related shows only inside a parent record). Declaring actions: ['export_contacts', 'send_welcome'] in the block's properties replaces that set, in that order; each action is still placed by its own locations, and [] shows none. New, Edit, Delete and opening a row are not actions: they follow the object's userActions and the user's permissions. An id that names no action of the child, or one with no list location, shows a notice naming it rather than being dropped.

The page header

page:header is the title bar. Its props go in properties, and the shape is closed, so an unknown or retired key (description, icon, breadcrumb, showStar) is refused by name.

PropertyDefaultDescription
titleDerived from the record on a record pageHeading; {field} tokens interpolate against the record, and a token that resolves to nothing renders empty. Set it on a non-record page
subtitle—The line under the title, interpolated the same way
actions—Ids of actions declared on the page's object. An authored list is the whole set: an action that declares record_header but is not named is not drawn, and omitting the key draws none of the object's actions. placedActions is the other way to say which actions
placedActions—true asks for every action of the object placed at record_header / record_more, read live, in place of an actions list, so an action another package adds is drawn without editing the page. Refused beside an authored actions list: keep one. The platform's user, organization and approval request pages set it
recordChrometrueDraw the title as the record chip (object label, copy-id button, the record's picture when the object names an imageField); false keeps a bare heading
showCopyIdtrueThe copy-record-id button in the chip
maxVisible / mobileMaxVisible3 / 1How many actions render inline before the rest fold into the ⋯ menu
aria—ARIA attributes (ariaLabel, ariaDescribedBy, …) for the <header> element

A named action renders only if its locations include record_header (inline) or record_more (straight into ⋯); an id that names no action renders nothing and is reported once in the browser console. Which actions take the inline slots is metadata too: actions are sorted by order (lower first; the host's Edit / Share / Delete use 100 and above, so authored actions outrank them), variant: 'primary' breaks ties, variant: 'danger' draws a red button or a red row at the foot of the ⋯ menu, and component: 'action:menu' pins an action inside ⋯. Past the ⋯ menu a record page shows a ⟳ refresh button: it is chrome, not an action, so it has no metadata key, is never folded into ⋯, and re-reads the record, its related lists and tab badges in place without losing the open tab or an inline edit.

A page has one <h1>. On a record page the header owns it; on another page type a page:header with a literal title becomes the page heading. page:header draws no children: anything that belongs beside it goes in a sibling node.

Components

Components are the building blocks placed inside regions.

{
  type: 'chart',
  id: 'revenue_chart',
  label: 'Revenue Trend',
  properties: {
    chartType: 'line',
    object: 'opportunity',
    categoryField: 'close_date',
    valueField: 'amount',
  },
  events: {
    onClick: "navigate_to('opportunity_detail', { id: $event.id })",
  },
  visibleWhen: "'sales_manager' in current_user.positions",
  style: { height: '400px' },
}
PropertyTypeRequiredDescription
typestring✅Component type (standard PageComponentType enum or custom string)
idstringoptionalUnique component instance identifier
labelstringoptionalDisplay label
propertiesRecord<string, unknown>optionalComponent-specific configuration (default {} — many components carry no props)
eventsRecord<string, string>optionalEvent handlers (action expressions)
styleobjectoptionalCSS styles
classNamestringoptionalCSS class names
responsiveStylesobjectoptionalPreferred SDUI styling channel (ADR-0065): desktop-first per-breakpoint scoped style maps, compiled to id-scoped CSS at render. Keys are large (the unconditional base), then medium / small / xsmall as max-width overrides. Prefer design tokens, e.g. { large: { padding: 'var(--space-8)' }, small: { padding: 'var(--space-4)' } }. Use over ad-hoc style / className for metadata-authored pages.
visibleWhenstringoptionalVisibility predicate (CEL) — component renders only when the expression is true. Binds record (the record a record page opens, or the row an app page's record binding reads — a block's own dataSource binds none for its siblings), current_user, and page state as page.<var>. A plan is not features.* — those are the deployment's public auth flags, the same for every organisation; read it off the page's row. The retired spelling visibility is refused at parse (ADR-0089 D2).

The type field is a union of the standard PageComponentType enum and any custom string. The standard (namespaced) component types include:

  • Structure: page:header, page:footer, page:sidebar, page:tabs, page:accordion, page:card, page:section
  • Record context: record:details, record:highlights, record:related_list, record:activity, record:chatter, record:path, record:alert, record:quick_actions, record:reference_rail, record:history — each renders from the record context a record page mounts, so they belong on a type:'record' page. A kind:'react' page mounts no such context and os validate rejects them there (see Validating metadata §10b)
  • Navigation: app:launcher, nav:menu, nav:breadcrumb
  • Utility: global:search, global:notifications — user:profile is not author-placeable: it is shell chrome (the signed-in user's avatar menu, which the app shell renders itself on every page), no renderer exists for it by ruling (objectstack#14159 / objectui#7135), and an authored user:profile node is refused at the schema door — definePage(), os validate, os build — with that prescription at the node's path instead of drawing an unknown-type panel in front of a user
  • AI: ai:suggestion — ai:chat_window was retired in v17.x: AI chat is not a page element, and the floating chat overlay the console mounts on every page is the supported entry point (set the app's defaultAgent to choose which platform agent answers there). No renderer for it ever shipped, and an authored ai:chat_window node is refused at the schema door — definePage(), os validate, os build — with that prescription at the node's path instead of drawing an unknown-type panel in front of a user
  • Elements: element:text, element:number, element:image, element:divider, element:button, element:record_picker, element:text_input (element:filter and element:form were retired in v17.x — no renderer ever shipped for either, and an authored node of either type is refused at the schema door — definePage(), os validate, os build — with that prescription at the node's path, bare node included. List surfaces own their filtering via a view's userFilters quick-filter bar or the list toolbar's filter builder; for forms use the object-bound object-form block, which is rendered and designer-publishable)

Components may also carry dataSource (a per-element data binding — see below), responsiveStyles (per-breakpoint scoped CSS, ADR-0065), and aria configuration. Custom string types are also accepted for project-specific widgets. (The former responsive layout block was retired in v17.x — no renderer ever applied it; see the upgrade guide.)

Element data sources

A component's dataSource takes one of two shapes. The object binding queries an object, overriding the page's own object, so one page can show several objects. The API binding reads one endpoint on the deployment's own origin and binds its answer, so a page can compose from a summary that is not an object:

import type { PageComponent } from '@objectstack/spec/ui';

// Object binding: `object` is required; `view`, `filter`, `sort` and `limit` narrow it.
const openDeals: PageComponent = {
  type: 'list-view',
  dataSource: {
    object: 'opportunity',
    view: 'open_deals',
    filter: [{ field: 'amount', operator: 'greater_than', value: 10000 }],
    limit: 10,
  },
};

// API binding: `read.url` is a same-origin API path; `path` selects the part
// of the `{ success, data }` response the element binds.
const environments: PageComponent = {
  type: 'stat',
  dataSource: {
    provider: 'api',
    read: { url: '/api/v1/cloud/home' },
    path: 'data.environments',
  },
};

The API binding's rules:

  • Same-origin only. read.url must open with a single /. An absolute URL of any scheme (https:, mailto:, javascript:, …), a protocol-relative //host, a backslash the browser reads as a slash, a space or control character, and a relative path such as ./home are all refused when the page is parsed (definePage(), os validate, os build), with the reason.
  • No credentials in metadata. The console reads the endpoint with its own signed-in fetch, so the read block has no headers, and a credential key such as headers, credentials or token is refused.
  • Reads only. read.method is optional and accepts GET alone; there is no write block.
  • Rendered by the console. The console reads the binding on every page element and binds the selected value as data: in the element's expression holes (${data.used}), in its visibleWhen, and in every element nested inside it. The console's generic hero, stat, usage-bar, checklist, tile-grid and row-table blocks are built to take it as their dataSource; row-table lists the rows of an array in the answer as a table, with declared columns (path, label, and a format of text, datetime or enum). While the read is in flight the element shows a loading panel, and a refused binding or a failed read shows an error panel instead.

Saved views and the object binding

view names a saved view of that object; its columns, filter, sort and page size are applied to the render, so a page never has to keep a second copy of a view's configuration. filter is additional criteria — it AND-combines with the view's filter rather than replacing it — while sort and limit override the view's. Only a usable limit overrides: a binding cap the contract refuses (0, a negative, a non-integer) is treated as not authored and yields to the view's cap exactly as an absent one would, and the view's cap is held to the same rule. A view name that does not resolve is reported as a configuration error; it never degrades into an unfiltered query for the object.

Which blocks consume it, and which keys each one honours

The binding is declared on every page component, but a component can only honour the keys it has a read site for — a calendar has no page to cap, a metric is one aggregated number, a form edits one record. Each block therefore maps the keys it reads and leaves the rest alone; a key written onto a schema slot the block ignores would be accepted and dropped, which is the defect this binding removes.

blockobjectviewfiltersortlimit
list-view✅ (data)✅✅✅✅
object-grid✅✅✅✅✅
element:record_picker✅✅✅✅✅
element:number✅filter✅— single value— single value
element:repeater✅filter / sort / limit✅✅✅
record:related_list✅columns / filter / sort / limit✅✅✅
object-calendar✅filter / sort✅✅— platform ceiling
object-kanban✅filter / limit✅— no ordering✅ (limit)
object-chart✅filter✅— engine orders— no page
object-metric✅filter✅— single value— single value
object-gantt✅filter / sort✅✅— platform ceiling
object-map✅filter / sort✅✅— platform ceiling
object-pivot✅filter✅— grouping orders— totals need all rows
object-timeline✅filter / sort / limit✅✅✅ (limit)
object-form✅error-checked only— no collection query——
embeddable-form✅error-checked only— no collection query——
object-master-detail-form✅error-checked only— no collection query——
record:line_items✅ (childObject)filter / sort / limit✅ (AND parent scope)✅✅ (limit)
record:details✅ (its record)filter / sort✅✅ (picks the first row)— one row is read
record:highlights✅ (its record)filter / sort✅✅ (picks the first row)— one row is read
record:quick_actions✅ (its record)filter / sort✅✅ (picks the first row)— one row is read

Reading the view column: it lists what a named saved view actually contributes on that block. A view name that does not resolve is reported as a configuration error on every block in the table, including the ones that take nothing else from the view — so a typo never passes silently, whatever the block.

Reading the object column: on a block with an object key it lands on that key, which is objectName everywhere except list-view and record:line_items. A list-view node names its object in data ({ "provider": "object", "object": … }), the spec's list view spelling, and a bound dataSource.object outranks data.object; the node's own objectName is not read. On record:line_items the collection the panel lists, fetches and writes is childObject. Its relationshipField is not part of the binding and stays the author's — it has to name a field on the bound child object, so rebinding object without updating it is an authoring error the panel cannot paper over. A record:line_items node bound this way needs no childObject of its own, and the page compile accepts it; a node that names its child object in neither place shows a configuration hint naming childObject and loads nothing.

Two kinds of block have no object key for the binding to land on. The element:* blocks read dataSource.object themselves (see below). The three one-record blocks, whose rows read "its record", take the binding's object as the object of the record they show, and the bound row becomes that record.

record:details, record:highlights and record:quick_actions show the record their record context carries. Bound, a block reads the FIRST row of the bound set by the binding's sort, under the caller's own identity, and that row becomes its record, so a product page shows a record without being a type: 'record' page:

{
  "type": "record:details",
  "properties": { "fields": ["name", "environment_type"] },
  "dataSource": {
    "object": "sys_environment",
    "filter": [{ "field": "environment_type", "operator": "equals", "value": "production" }],
    "limit": 1
  }
}

When no row matches — or the server refuses the read — the block draws its authored emptyState in its place, when its properties declare one. That is the spec's empty-state shape, the one object-grid takes: { title, message, icon, link }, with title and message as plain strings or inline locale maps and link as { label, url }. A block that declares none draws what it draws for a record that is not there: record:details its "record not found" state, record:highlights nothing, record:quick_actions an empty bar. The empty state is never drawn while the read loads, on a block with no dataSource, or for a read that fails any other way, which is reported in the block's place. record:quick_actions runs the object's declared actions against the bound row's id. The bound row is re-read whenever a write to its object is announced on the page (the data source's mutation events, or notifyDataChanged). objectui validate warns on a record block whose binding has no limit: 1, so the binding says which record it means. On a record page, a block with no dataSource still shows the page's record; a bound one shows its bound record instead, read-only.

Because the binding lands on objectName (on list-view, it stands in for data), a node bound this way needs no objectName (or data) of its own. The schema validator (StrictAnyComponentSchema, which objectui validate runs, and the tolerant safeValidateSchema alike) counts the binding as a record source of list-view, object-grid, object-kanban, object-calendar, object-gantt and object-map, and still refuses one of those nodes that declares no other record source and names its object in neither place. A binding with an empty object names nothing.

The page compile accepts such a node too, on every row above whose object lands on objectName, and on list-view: those registrations do not declare objectName (on list-view, data) required, because the binding can supply it. The exception is record:related_list, whose spec row requires objectName, so the page compile still refuses one of those nodes without it. A node that names its object in neither place renders a short hint, "No object named: set objectName or dataSource.object.", in place of an empty list, board, form, chart, metric or pivot. On list-view the hint names the key a page node writes: "No object named: set data.object or dataSource.object.". object-grid shows its own "Object name required for data fetching" error instead. A block with another record source (inline data rows, a form's inline fields — customFields, or sections whose every field is inline — a chart's dataset, a bind path, or a metric's fallbackValue) draws from that source and shows no hint.

element:record_picker and element:number keep their display configuration in the node's properties bag and take their query from the binding only: every query key either one reads comes from dataSource and from nowhere else. The flat properties.object, properties.filter, properties.sort and properties.limit on these two elements are not read, and @objectstack/spec retires them (objectstack#11509). element:number no longer offers its flat object or filter (objectui#12085), so the page validator reports either one as a prop the metric does not have. The binding's filter is AND-combined with its view's filter, as on every block above. On element:number, { "dataSource": { "object": "contact" }, "properties": { "aggregate": "count" } } is a complete metric; its sort and limit are not read, because an aggregate has no ordering and a capped count would be a wrong number, and a filter the converter refuses shows the configuration-error panel instead of a count. Either of the two whose node names no dataSource.object issues no query: an element:number that sets aggregate shows a short "No object named: set dataSource.object." notice instead of a count, and an element:record_picker offers no records. The Studio page designer writes the metric's object into dataSource.

element:repeater reads its query from the binding alone. @objectstack/spec 18 retired the flat properties.object, properties.filter, properties.sort and properties.limit (objectstack#11509), and the repeater reads none of them (objectui#12345); the spec's conversion moves them into dataSource. A node that still carries one is refused by the spec's row and by the @object-ui/types mirror, and the page validator reports it as a prop the repeater does not have. The repeater requires no prop (objectui#12085): a node whose dataSource names no object issues no query and shows its empty state. With a named saved view, the binding's own sort and limit win and the view's are the baseline, and the view's filter is AND-combined with the binding's. The Studio page designer writes the repeater's object and its row limit into dataSource, as it does the metric's object.

{
  "type": "element:repeater",
  "dataSource": {
    "object": "task",
    "filter": [{ "field": "status", "operator": "equals", "value": "open" }],
    "sort": [{ "field": "due_date", "order": "asc" }],
    "limit": 5
  },
  "properties": { "titleField": "subject", "fields": ["due_date"] }
}

record:related_list reads two bindings. Its dataSource is the CHILD rows the list draws (its row in the table above). Its parent record — the record the list hangs off — is the record page's record, or, when the block's properties carry parentDataSource, the record that binding reads. The key is a member of the spec's record:related_list row and takes the same object binding dataSource takes. It is read the way the three one-record blocks above read their record: the FIRST row of the binding by its sort, under the caller's own identity, re-read whenever a write to its object is announced. The list then draws that record's children through relationshipField, and relationshipValueField is read on that row. So a product page lists a record's children without being a type: 'record' page:

{
  "type": "record:related_list",
  "properties": {
    "objectName": "sys_member",
    "relationshipField": "environment_id",
    "parentDataSource": {
      "object": "sys_environment",
      "filter": [{ "field": "environment_type", "operator": "equals", "value": "production" }],
      "limit": 1
    }
  }
}

When no row matches — or the server refuses the read — the block says so in its place, naming the object, and draws no list: an empty list would read as "this record has no related records". A read that fails any other way is reported in the block's place. objectui validate warns on a parentDataSource without limit: 1, and refuses the key written on the node instead of in properties. On a record page, a related list without parentDataSource lists the page record's children, as before; with it, it lists the bound record's children.

Scoping a filter to the record in view: {record_id}

On a type: 'record' page, a filter value can name the record the page shows with {record_id}, in a component's own filter and in its dataSource.filter alike. On a person's record page this counts that person's open tasks, and the next person's page counts theirs:

{
  "type": "element:number",
  "dataSource": {
    "object": "task",
    "filter": [{ "field": "assignee", "operator": "equals", "value": "{record_id}" }]
  },
  "properties": { "aggregate": "count" }
}

The id is the page's mounted record context, never a URL parameter or a page variable. Anywhere with no record in context (a list view, a dashboard, a report, a page that is not a record page) the token is refused by name: the renderer warns, the value is left as written rather than dropped or blanked, and the ObjectStack server refuses the query (FILTER_TOKEN_UNRESOLVED), so the number never silently becomes a count over every record. {record_id} scopes what a component shows; it is not access control, which stays with the server's row-level security (objectui#7297).

On record:related_list and record:line_items the composed filter is AND-combined with the parent relationship condition, never substituted for it: a child panel is always scoped to the record it appears on, and an additional criterion can only narrow that set further. (Until objectstack#7118 record:related_list declared filter without reading it, so a named view contributed its columns / sort / limit while its filter was dropped — the list could be wider than the view it named. That gap is closed; the filter cell above is what closed it.)

object-timeline and record:line_items were the two residual gaps in this table until objectstack#7137. Neither had a filter / sort read site at all — the timeline's whole fetch was find(objectName, { options: { $top: 100 } }) and the line-items panel's was the parent FK plus a fixed $top: 500 — so a view named on either resolved (a typo reported) and then contributed nothing: the rendered rows could be wider than the view they named, with no error anywhere. Both now read filter, sort and limit, so the cells above are ✅. Two notes on what came with that:

  • The timeline's default window is limit ?? 100 and it is now a real $top. The old { options: { $top: 100 } } nested the cap under a key that is not a QueryParams field and that no adapter in this repo reads, so the intended cap never reached the wire; a timeline over a large object fetched whatever the server chose to return. Authoring limit (or a view's pagination.pageSize) now sets it.
  • record:line_items still does not take a view's columns: they are editable GridColumn objects ({ field, type, … }) rather than a field-name projection, so a view's column list would be the wrong shape, not merely a wider answer.

object-kanban carried the same nesting, and until objectui#4025 this table read — fixed window in its limit cell. There was no window: the board's cap was written { options: { $top: 100 } } — $filter at the top level where the adapters read it, the cap one level down under a key that is not a QueryParams field — so a board over a large object fetched every row the server would return and grouped all of it into lanes, client-side. The cap is now a real $top, defaulting to 100, and the limit cell is ✅ because the read site exists: a limit authored on the block, the binding's limit, or the named view's pagination.pageSize all set it. The board's sort cell still reads — no ordering — lanes come from groupBy and the fetch declares no $orderby, so mapping sort would be the accepted-and-dropped defect one block over.

Note the two limits on a board are different keys at different levels: the row cap above is limit on the board, while limit on a column is that lane's WIP limit (how many cards it may hold before it warns), which is display behaviour and never touches the query.

Reading — platform ceiling on object-calendar / object-gantt / object-map (and on object-tree, which predates this table): those four are the non-grid visualisations, and objectui#7210's maintainer ruling settled what their row behaviour is. They fetch the whole filtered result set — a gantt cannot compute a truthful min(start) → max(end) from one page, a map fits its camera to every marker, and a tree assembled from a page loses every node whose parent fell outside it — but the fetch is bounded by NON_GRID_ROW_CEILING (@object-ui/react, currently 2,000). Past it the view draws the first N rows and shows a footnote naming both N and the total. Silent truncation is the failure that ruling exists to prevent: a cut-off schedule still looks like a schedule.

The limit cell stays "not ✅" for all four because the ceiling is not authorable and must not become one — a named constant in the renderer, by the same ruling. An authored limit, a binding's limit and a named view's pagination.pageSize all still fail to reach these queries, which is what the cell has always meant. What changed is only that "no cap at all" is no longer true.

Remaining gap, recorded rather than papered over:

  • object-form / embeddable-form / object-master-detail-form resolve view only to report an unresolvable name; a view that does resolve contributes nothing, because a list view's columns are not a form layout. On the master-detail form the bound object is the parent; child collections come from details[], by FK.

Blocks not in the table (dashboard, the other record:* panels) do not consume the binding yet.

Expression holes in element properties

A string in an element's properties may carry ${…} holes, which the Console fills when it renders: "content": "Welcome back, ${current_user.name}". The roots are record (the page's row), current_user, page.<var> for page variables and, under an element with an API dataSource, data. An inline locale map is filled member by member and then drawn in the viewer's language:

{
  "type": "element:text",
  "properties": {
    "content": { "en": "Welcome back, ${current_user.name}", "zh-CN": "欢迎回来,${current_user.name}" }
  }
}

A hole whose member is missing renders empty; a hole whose root does not exist renders as its own source text, with one line in the browser console. Holes fill copy; they are not gates. A component's visibleWhen is a CEL predicate over the same roots ("'sales_manager' in current_user.positions"), not a ${…} template.

List blocks in a region

A region page sizes each block to its region, measured from the rendered width (no key sets it). A list-view in a region narrower than half the page, such as an aside beside main, renders a compact list: the title and record count, then two-line rows from the view's first two visible columns. A region half the page or wider renders a capped table: at most the block's dataSource.limit rows (5 when unset) and the view's first four visible columns. Neither draws a toolbar, view tabs or a pager; both end with a View all link, to the saved view's page when the block binds dataSource.view and to the object's list otherwise (the block's own filter and sort are not carried, so bind a saved view to link to exactly what the block shows). html and react pages have no regions, so their list blocks render the whole list. A page:tabs block whose tabs hold list blocks badges each tab with its list's record count before it is opened; a tab item's own count wins.

Variables

Pages can define local variables for managing state across components.

variables: [
  {
    name: 'selected_tab',
    type: 'string',
    defaultValue: 'overview',
  },
  {
    name: 'date_range',
    type: 'object',
    defaultValue: { start: null, end: null },
  },
]

Variable type accepts 'string' (default), 'number', 'boolean', 'object', 'array', or 'record_id'.

Complete Example

const accountRecordPage = {
  name: 'account_detail',
  label: 'Account Detail',
  type: 'record',
  object: 'account',
  variables: [
    { name: 'active_tab', type: 'string', defaultValue: 'details' },
  ],
  regions: [
    {
      name: 'header',
      width: 'full',
      components: [
        {
          type: 'record:highlights',
          id: 'header',
          properties: {
            fields: ['name', 'type', 'industry', 'owner'],
          },
        },
        // Record actions are their own component — `record:highlights` renders
        // field chips and nothing else.
        {
          type: 'record:quick_actions',
          properties: {
            actionNames: ['edit', 'delete', 'clone'],
          },
        },
      ],
    },
    {
      name: 'sidebar',
      width: 'small',
      components: [
        {
          type: 'record:details',
          id: 'key_fields',
          label: 'Key Fields',
          properties: {
            fields: ['annual_revenue', 'employees', 'website', 'phone'],
          },
        },
        {
          type: 'record:activity',
          id: 'activities',
          label: 'Activity',
        },
      ],
    },
    {
      name: 'main',
      components: [
        {
          type: 'record:related_list',
          id: 'contacts',
          label: 'Contacts',
          // `objectName` is the RELATED (child) object being listed;
          // `relationshipField` is the child's field pointing back at this record.
          properties: { objectName: 'contact', relationshipField: 'account' },
        },
        {
          type: 'record:related_list',
          id: 'opportunities',
          label: 'Opportunities',
          properties: { objectName: 'opportunity', relationshipField: 'account' },
        },
      ],
    },
  ],
};

On this page