Skip to content

Commit 26a01f6

Browse files
committed
docs(sdk): drop the reserved word from the moved pages' sample data and prose
Claude-Session: https://claude.ai/code/session_01L9qibzngYyRjmvNxjkfVyd Co-authored-by: Claude <noreply@anthropic.com>
1 parent 804bcc6 commit 26a01f6

14 files changed

Lines changed: 60 additions & 60 deletions

‎content/docs/sdk/api/schema-reference.mdx‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Top-level page container. Defines a full page with optional regions (header, sid
152152
| `children` | `SchemaNode \| SchemaNode[]` | Main page content when the page declares no regions — one node, or a list of them. Spelled `body` until objectui#6771 retired that spelling. |
153153
| `isDefault` | `boolean` | Whether this is the default page for the object. |
154154
| `assignedProfiles` | *retired* | ⛔ Refused by name (objectui#9409). `@objectstack/spec` retired the key: ADR-0090 D2 deleted the Profile concept it was named after, and nothing ever enforced it, so a page that listed profiles stayed open to everyone who could reach it. Both published faces take the spec's tombstone: any value is a TypeScript error and a parse failure at `assignedProfiles`. Delete the key. Page audience comes from permission sets: gate the data the page shows with the object's permission sets, and grant those sets to people through positions. |
155-
| `aria` | `AriaProps` | ARIA attributes for the page's root element: `ariaLabel` (a plain string, or an inline locale map such as `{ "en": "Orders", "fr": "Commandes" }`, resolved for the display locale) renders `aria-label`, `ariaDescribedBy` renders `aria-describedby`, and `role` renders `role`. This is the spec's inline vocabulary, not the keyed flat `ariaLabel` described under BaseSchema. The page adds no default role. |
155+
| `aria` | `AriaProps` | ARIA attributes for the page's root element: `ariaLabel` (a plain string, or an inline locale map such as `{ "en": "Orders", "fr": "Commandes" }`, resolved for the display locale) renders `aria-label`, `ariaDescribedBy` renders `aria-describedby`, and `role` renders `role`. This is the spec's inline vocabulary, not the keyed flat `ariaLabel` described under BaseSchema. The page adds none of these attributes by default. |
156156

157157
#### Page types
158158

@@ -321,15 +321,15 @@ A complete form with fields, validation, layout, and actions.
321321
"defaultValues": {
322322
"name": "",
323323
"email": "",
324-
"role": "viewer"
324+
"department": "sales"
325325
},
326326
"fields": [
327327
{ "name": "name", "label": "Full Name", "type": "text", "required": true },
328328
{ "name": "email", "label": "Email", "type": "email", "required": true },
329-
{ "name": "role", "label": "Role", "type": "select", "options": [
330-
{ "label": "Admin", "value": "admin" },
331-
{ "label": "Editor", "value": "editor" },
332-
{ "label": "Viewer", "value": "viewer" }
329+
{ "name": "department", "label": "Department", "type": "select", "options": [
330+
{ "label": "Engineering", "value": "engineering" },
331+
{ "label": "Marketing", "value": "marketing" },
332+
{ "label": "Sales", "value": "sales" }
333333
]}
334334
]
335335
}

‎content/docs/sdk/components/complex/data-table.mdx‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ The Data Table component provides comprehensive table functionality inspired by
7979
"accessorKey": "name"
8080
},
8181
{
82-
"header": "Role",
83-
"accessorKey": "role"
82+
"header": "Title",
83+
"accessorKey": "title"
8484
},
8585
{
8686
"header": "Department",
@@ -95,56 +95,56 @@ The Data Table component provides comprehensive table functionality inspired by
9595
{
9696
"id": 1,
9797
"name": "Alice Brown",
98-
"role": "Manager",
98+
"title": "Manager",
9999
"department": "Sales",
100100
"status": "Active"
101101
},
102102
{
103103
"id": 2,
104104
"name": "Bob Wilson",
105-
"role": "Developer",
105+
"title": "Developer",
106106
"department": "Engineering",
107107
"status": "Active"
108108
},
109109
{
110110
"id": 3,
111111
"name": "Carol Davis",
112-
"role": "Designer",
112+
"title": "Designer",
113113
"department": "Design",
114114
"status": "Active"
115115
},
116116
{
117117
"id": 4,
118118
"name": "David Lee",
119-
"role": "Developer",
119+
"title": "Developer",
120120
"department": "Engineering",
121121
"status": "Inactive"
122122
},
123123
{
124124
"id": 5,
125125
"name": "Eve Martinez",
126-
"role": "Manager",
126+
"title": "Manager",
127127
"department": "Marketing",
128128
"status": "Active"
129129
},
130130
{
131131
"id": 6,
132132
"name": "Frank Taylor",
133-
"role": "Analyst",
133+
"title": "Analyst",
134134
"department": "Finance",
135135
"status": "Active"
136136
},
137137
{
138138
"id": 7,
139139
"name": "Grace Chen",
140-
"role": "Designer",
140+
"title": "Designer",
141141
"department": "Design",
142142
"status": "Active"
143143
},
144144
{
145145
"id": 8,
146146
"name": "Henry Kim",
147-
"role": "Developer",
147+
"title": "Developer",
148148
"department": "Engineering",
149149
"status": "Inactive"
150150
}
@@ -528,8 +528,8 @@ pruned.
528528
"accessorKey": "email"
529529
},
530530
{
531-
"header": "Role",
532-
"accessorKey": "role",
531+
"header": "Department",
532+
"accessorKey": "department",
533533
"width": "120px"
534534
},
535535
{
@@ -541,31 +541,31 @@ pruned.
541541
{
542542
"name": "John Doe",
543543
"email": "john@company.com",
544-
"role": "Admin",
544+
"department": "Engineering",
545545
"lastLogin": "2024-01-20"
546546
},
547547
{
548548
"name": "Jane Smith",
549549
"email": "jane@company.com",
550-
"role": "Editor",
550+
"department": "Marketing",
551551
"lastLogin": "2024-01-19"
552552
},
553553
{
554554
"name": "Bob Wilson",
555555
"email": "bob@company.com",
556-
"role": "Viewer",
556+
"department": "Sales",
557557
"lastLogin": "2024-01-18"
558558
},
559559
{
560560
"name": "Alice Brown",
561561
"email": "alice@company.com",
562-
"role": "Editor",
562+
"department": "Marketing",
563563
"lastLogin": "2024-01-17"
564564
},
565565
{
566566
"name": "Charlie Davis",
567567
"email": "charlie@company.com",
568-
"role": "Admin",
568+
"department": "Engineering",
569569
"lastLogin": "2024-01-16"
570570
}
571571
]

‎content/docs/sdk/components/complex/filter-builder.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ name. Write the rows into the one group and remove the two keys.
263263
"type": "text"
264264
},
265265
{
266-
"value": "role",
267-
"label": "Role",
266+
"value": "department",
267+
"label": "Department",
268268
"type": "text"
269269
},
270270
{

‎content/docs/sdk/guide/architecture-overview.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ The expression engine lives in `packages/core/src/evaluator/` and powers dynamic
209209

210210
```json
211211
{
212-
"visible": "${data.role === 'admin'}",
212+
"visible": "${data.department === 'finance'}",
213213
"label": "Hello, ${data.user.name}!",
214214
"disabled": "${data.status !== 'draft'}",
215215
"className": "${data.priority === 'high' ? 'text-red-500' : 'text-gray-500'}"

‎content/docs/sdk/guide/plugin-development.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ packages/plugin-board/
3232
└── README.md
3333
```
3434

35-
| File | Role |
35+
| File | Purpose |
3636
|------|------|
3737
| `index.tsx` | Lightweight entry — sets up `React.lazy()`, `Suspense` fallback, and calls `ComponentRegistry.register()`. |
3838
| `BoardImpl.tsx` | The actual renderer. All heavy dependencies live here so they are tree-shaken from the initial bundle. |

‎content/docs/sdk/guide/plugins.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Markdown renderer with GitHub Flavored Markdown support.
172172
Chat interface component.
173173

174174
- Message history
175-
- User and assistant roles
175+
- User and assistant messages
176176
- Timestamps and avatars
177177
- Responsive floating panel for console assistants
178178
- Inline responding, stop, and retry states

‎content/docs/sdk/guide/quick-start.mdx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ const schema: CardSchema = {
9191
columns: [
9292
{ header: 'Name', accessorKey: 'name', sortable: true },
9393
{ header: 'Email', accessorKey: 'email' },
94-
{ header: 'Role', accessorKey: 'role' },
94+
{ header: 'Department', accessorKey: 'department' },
9595
],
9696
data: [
97-
{ name: 'Ada Lovelace', email: 'ada@example.com', role: 'Admin' },
98-
{ name: 'Grace Hopper', email: 'grace@example.com', role: 'Editor' },
99-
{ name: 'Katherine Johnson', email: 'katherine@example.com', role: 'Viewer' },
97+
{ name: 'Ada Lovelace', email: 'ada@example.com', department: 'Engineering' },
98+
{ name: 'Grace Hopper', email: 'grace@example.com', department: 'Marketing' },
99+
{ name: 'Katherine Johnson', email: 'katherine@example.com', department: 'Sales' },
100100
],
101101
pagination: false,
102102
searchable: false,
@@ -231,7 +231,7 @@ published is not an error: the expression is returned as its own source text.
231231
"columns": [
232232
{ "field": "name", "label": "Name", "sortable": true },
233233
{ "field": "email", "label": "Email" },
234-
{ "field": "role", "label": "Role" },
234+
{ "field": "department", "label": "Department" },
235235
{ "field": "status", "label": "Status" },
236236
{ "field": "created_at", "label": "Joined" }
237237
],

‎content/docs/sdk/guide/schema-rendering.mdx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ interface BaseSchema {
6666
"id": "stats-card",
6767
"className": "p-6 shadow-lg",
6868
"title": "User Statistics",
69-
"visibleWhen": "${user.role === 'admin'}",
69+
"visibleWhen": "${user.department === 'finance'}",
7070
"children": {
7171
"type": "text",
7272
"content": "Total Users: ${stats.totalUsers}"
@@ -93,7 +93,7 @@ declare const schema: DeclaredNode
9393

9494
// Every name here becomes a root the schema's expressions can read.
9595
const scope = {
96-
user: { name: 'John', role: 'admin' },
96+
user: { name: 'John', department: 'finance' },
9797
stats: { totalUsers: 1234 },
9898
}
9999

@@ -265,7 +265,7 @@ it on `label`: `text` is not a `BadgeSchema` key.
265265
{
266266
"type": "button",
267267
"label": "Delete",
268-
"visibleWhen": "${user.role === 'admin'}"
268+
"visibleWhen": "${user.department === 'finance'}"
269269
}
270270
```
271271

‎content/docs/sdk/plugins/index.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ npm install @object-ui/plugin-timeline
126126

127127
**[@object-ui/plugin-chatbot](/docs/sdk/plugins/plugin-chatbot)** - Chat interface component with message history.
128128

129-
- User and assistant message roles
129+
- User and assistant messages
130130
- System messages
131131
- Timestamps and avatars
132132
- Auto-scroll and typing indicators

‎content/docs/sdk/plugins/plugin-chatbot.mdx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ const schema: ChatbotSchema = {
152152

153153
## Features
154154

155-
- **Message History**: Display chat messages with user and assistant roles
155+
- **Message History**: Display user and assistant chat messages
156156
- **System Messages**: Show system notifications in the chat
157157
- **Timestamps**: Optional timestamp display for each message
158158
- **Custom Avatars**: Configurable avatar images and fallback text
@@ -434,7 +434,7 @@ const schema: ChatbotSchema = {
434434
};
435435
```
436436

437-
## Message Roles
437+
## Message Kinds
438438

439439
### User Messages
440440

@@ -482,7 +482,7 @@ const systemMessage: ChatMessage = {
482482

483483
### Tool Messages (AI Mode)
484484

485-
Tool messages represent results from tool invocations during AI streaming. They are generated automatically by the vercel/ai SDK when the backend performs tool calls (e.g., fetching weather, querying a database). The SDK may emit `role: 'tool'` messages as well as populate the assistant message's `toolInvocations` array.
485+
Tool messages represent results from tool invocations during AI streaming. They are generated automatically by the vercel/ai SDK when the backend performs tool calls (e.g., fetching weather, querying a database). The SDK may emit tool messages as well as populate the assistant message's `toolInvocations` array.
486486

487487
By default, `ChatbotEnhanced` renders tool invocations as a compact agent activity summary. Repeated calls are grouped, raw tool names are hidden, and reasoning text is not shown. Use `processVisibility="debug"` for developer/admin views that need the full reasoning panel, raw tool names, parameters, and results. Use `processVisibility="hidden"` to suppress non-interactive activity entirely; approval and draft-review actions remain visible.
488488

0 commit comments

Comments
 (0)