Skip to content

Commit de42410

Browse files
authored
docs: document the html/react page-authoring tiers (ADR-0080/0081) (#2473)
1 parent f02ea5b commit de42410

4 files changed

Lines changed: 31 additions & 4 deletions

File tree

content/docs/guides/skills.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ObjectStack ships **9 domain-specific skills**. Each is self-contained — an AI
4848
| 1 | [Platform](#platform) | `platform` | `skills/objectstack-platform/` | Bootstrap, configure, extend, and operate ObjectStack runtimes. Covers project setup (`defineStack`, drivers, adapters, scaffolding), plugin and service development (PluginContext, DI, kernel hooks like `kernel:ready` and `data:*`), and operations (CLI commands, migrations, deployment, test harnesses via LiteKernel). |
4949
| 2 | [Data](#data) | `data` | `skills/objectstack-data/` | Design ObjectStack data schemas — objects, fields, field conditional rules, relationships, validations, indexes, lifecycle hooks, permissions, row-level security — and the seed datasets (`defineDataset()`) that load fixtures and reference data alongside them. |
5050
| 3 | [Query](#query) | `query` | `skills/objectstack-query/` | Construct ObjectQL queries — filters, sorting, pagination, aggregation, joins/expansion, window functions, and full-text search. |
51-
| 4 | [UI](#ui) | `ui` | `skills/objectstack-ui/` | Author ObjectStack UI metadata — Views (list/form/kanban/calendar/gantt), Apps (navigation), Pages, Dashboards, Reports, Charts, Actions, and package Docs (`src/docs/*.md`). |
51+
| 4 | [UI](#ui) | `ui` | `skills/objectstack-ui/` | Author ObjectStack UI metadata — Views (list/form/kanban/calendar/gantt), Apps (navigation), Pages (structured plus the HTML and React source-authoring tiers, ADR-0080/0081), Dashboards, Reports, Charts, Actions, and package Docs (`src/docs/*.md`). |
5252
| 5 | [Automation](#automation) | `automation` | `skills/objectstack-automation/` | Design ObjectStack automation — Flows (visual logic), Workflows (declarative rules), Triggers, Approvals, scheduled jobs, and webhooks. |
5353
| 6 | [AI](#ai) | `ai` | `skills/objectstack-ai/` | Design ObjectStack AI agents, tools, skills, conversations, model registry entries, and MCP integrations. |
5454
| 7 | [API](#api) | `api` | `skills/objectstack-api/` | Design the server-side API surface that an ObjectStack runtime exposes — REST/GraphQL endpoints, auth providers, realtime channels, error envelopes, batch/versioning contracts. |
@@ -103,7 +103,7 @@ Do not use for defining objects / fields / relationships (see objectstack-data)
103103

104104
**Domain** `ui` · **Path** `skills/objectstack-ui/`
105105

106-
Author ObjectStack UI metadata — Views (list/form/kanban/calendar/gantt), Apps (navigation), Pages, Dashboards, Reports, Charts, Actions, and package Docs (`src/docs/*.md`).
106+
Author ObjectStack UI metadata — Views (list/form/kanban/calendar/gantt), Apps (navigation), Pages (structured plus the HTML and React source-authoring tiers, ADR-0080/0081), Dashboards, Reports, Charts, Actions, and package Docs (`src/docs/*.md`).
107107

108108
Use when the user is adding `*.view.ts` / `*.app.ts` / `*.dashboard.ts` / `*.action.ts` / `src/docs/*.md` files or designing a Studio-rendered UI surface, including dataset-bound dashboard/report widgets.
109109

content/docs/protocol/objectui/layout-dsl.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,32 @@ Instead of giving you infinite layout freedom (and infinite ways to break respon
2222
- **Accessibility:** Keyboard navigation and screen readers work automatically
2323
- **Maintainability:** Designers can't create 47 different button sizes
2424

25+
## Authoring Modes: Structured, HTML, and React
26+
27+
A page's `kind` selects **how** it is authored. This document describes the
28+
**structured** mode (regions + the 12-column grid below) — but for layouts the
29+
fixed schema can't express, two *source-authoring* tiers let an author (or AI)
30+
write the page body as a string. Pick by what the page needs:
31+
32+
| `kind` | You write | JavaScript | Use when |
33+
|:-------|:----------|:-----------|:---------|
34+
| `full` / `slotted` *(this doc)* | structured `regions` / `slots` || record, detail, home, and app layouts from the component catalogue |
35+
| `html` | constrained JSX = HTML + Tailwind + registered components, **parsed, never executed** | none | free-form layout, landing pages, or dashboards that *compose* blocks — no interactivity |
36+
| `react` | **real React** (hooks, `.map`, `onClick`, expressions) | executed in the app | complex interactive business UIs — master/detail, wizards, state-driven filters |
37+
38+
For `html` / `react`, the page body is the `source` string (it is the
39+
source-of-truth; `regions` is ignored). `html` is **safe by construction** (it
40+
is parsed into the same SDUI tree this document describes, never executed).
41+
`react` executes author code, so it is gated by a host capability that is **ON
42+
by default** and disabled per-deployment with the `OS_PAGE_REACT=off` env
43+
variable. Both tiers can embed the platform's real data components
44+
(`<ObjectTable>`, `<ObjectForm>`, charts, metrics).
45+
46+
> **Learn more:** [ADR-0080](https://github.com/objectstack-ai/framework/blob/main/docs/adr/0080-ai-authored-ui-jsx-source.md)
47+
> (the `html` tier — parse ≠ execute; the registry is the contract) and
48+
> [ADR-0081](https://github.com/objectstack-ai/framework/blob/main/docs/adr/0081-trusted-react-page-tier.md)
49+
> (the trusted `react` tier). The rest of this page covers the structured mode.
50+
2551
## Layout Hierarchy
2652

2753
```

skills/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ authoritative Zod sources in `node_modules/@objectstack/spec/src/...`.
1919
| [Platform](./objectstack-platform/SKILL.md) | `platform` | Bootstrap, configure, extend, and operate ObjectStack runtimes. Covers project setup (`defineStack`, drivers, adapters, scaffolding), plugin and service development (PluginContext, DI, kernel hooks like `kernel:ready` and `data:*`), and operations (CLI commands, migrations, deployment, test harnesses via LiteKernel). |
2020
| [Data](./objectstack-data/SKILL.md) | `data` | Design ObjectStack data schemas — objects, fields, field conditional rules, relationships, validations, indexes, lifecycle hooks, permissions, row-level security — and the seed datasets (`defineDataset()`) that load fixtures and reference data alongside them. |
2121
| [Query](./objectstack-query/SKILL.md) | `query` | Construct ObjectQL queries — filters, sorting, pagination, aggregation, joins/expansion, window functions, and full-text search. |
22-
| [UI](./objectstack-ui/SKILL.md) | `ui` | Author ObjectStack UI metadata — Views (list/form/kanban/calendar/gantt), Apps (navigation), Pages, Dashboards, Reports, Charts, Actions, and package Docs (`src/docs/*.md`). |
22+
| [UI](./objectstack-ui/SKILL.md) | `ui` | Author ObjectStack UI metadata — Views (list/form/kanban/calendar/gantt), Apps (navigation), Pages (structured plus the HTML and React source-authoring tiers, ADR-0080/0081), Dashboards, Reports, Charts, Actions, and package Docs (`src/docs/*.md`). |
2323
| [Automation](./objectstack-automation/SKILL.md) | `automation` | Design ObjectStack automation — Flows (visual logic), Workflows (declarative rules), Triggers, Approvals, scheduled jobs, and webhooks. |
2424
| [AI](./objectstack-ai/SKILL.md) | `ai` | Design ObjectStack AI agents, tools, skills, conversations, model registry entries, and MCP integrations. |
2525
| [API](./objectstack-api/SKILL.md) | `api` | Design the server-side API surface that an ObjectStack runtime exposes — REST/GraphQL endpoints, auth providers, realtime channels, error envelopes, batch/versioning contracts. |

skills/objectstack-ui/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
name: objectstack-ui
33
description: >
44
Author ObjectStack UI metadata — Views (list/form/kanban/calendar/gantt),
5-
Apps (navigation), Pages, Dashboards, Reports, Charts, Actions, and
5+
Apps (navigation), Pages (structured plus the HTML and React source-authoring
6+
tiers, ADR-0080/0081), Dashboards, Reports, Charts, Actions, and
67
package Docs (`src/docs/*.md`). Use when
78
the user is adding `*.view.ts` / `*.app.ts` / `*.dashboard.ts` /
89
`*.action.ts` / `src/docs/*.md` files or designing a Studio-rendered UI

0 commit comments

Comments
 (0)