Skip to content

Commit b53d7b5

Browse files
committed
docs(spec): regenerate the app reference page and add the spec patch changeset
Claude-Session: https://claude.ai/code/session_01T9u38rswFp5Rw8DswRUReJ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 884e055 commit b53d7b5

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
"@objectstack/spec": patch
3+
---
4+
5+
`ObjectNavItemSchema.viewName`'s describe no longer says the default is "all". It now states what the console does when an object nav entry names no view: it opens the object's default list view, else its first declared list view. `all` is only the console's fallback tab, and it exists only for an object that declares no list view.
6+
7+
Clause-②: no
8+
9+
- The rule is read from objectui at the `.objectui-sha` pin. `ObjectView` opens `defaultViewId || views[0]`, where `defaultViewId` is the view `buildViewTabs` marks `isDefault` (the default `list`). `buildViewTabs` adds the `all` tab only when the object has no list view at all.
10+
- An author who omitted `viewName` expecting all records got that default or first declared view instead. When the object declares more than one list view, name the one the entry should open in `viewName`.
11+
- The generated app reference page follows (#21973). The lint header that quoted the old sentence follows too, as a comment only.
12+
- ⛔ No schema, type, optionality, default, export or accept-set change. The console's behaviour does not change.

‎content/docs/references/ui/app.mdx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const result = ActionNavItemSchema.parse(data);
113113
| **requiresService** | `string` | optional | Hide/disable this entry unless the named kernel service is registered |
114114
| **type** | `'object'` | ✅ | |
115115
| **objectName** | `string` | ✅ | Target object name |
116-
| **viewName** | `string` | optional | Default list view to open. Defaults to "all". Ignored when `recordId` is set. |
116+
| **viewName** | `string` | optional | Default list view to open. When omitted, the console opens the object's default list view, else its first declared list view; `all` names the console's fallback tab, which exists only for an object that declares no list view. Ignored when `recordId` is set. |
117117
| **recordId** | `string` | optional | Navigate directly to this record id instead of the list view. Supports template vars: `{current_user_id}`, `{current_org_id}`. |
118118
| **recordMode** | `Enum<'view' \| 'edit'>` | optional | Open the record in view (default) or edit mode. Only meaningful when `recordId` is set. |
119119
| **filters** | `Record<string, string>` | optional | URL filter conditions — targets the /:objectName/data bare surface via filter[`<field>`]=`<value>` params instead of a saved view. Values support template vars `{current_user_id}`, `{current_org_id}`. Mutually exclusive with recordId/viewName. |
@@ -462,7 +462,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc`
462462
| **requiresService** | `string` | optional | Hide/disable this entry unless the named kernel service is registered |
463463
| **type** | `'object'` | ✅ | |
464464
| **objectName** | `string` | ✅ | Target object name |
465-
| **viewName** | `string` | optional | Default list view to open. Defaults to "all". Ignored when `recordId` is set. |
465+
| **viewName** | `string` | optional | Default list view to open. When omitted, the console opens the object's default list view, else its first declared list view; `all` names the console's fallback tab, which exists only for an object that declares no list view. Ignored when `recordId` is set. |
466466
| **recordId** | `string` | optional | Navigate directly to this record id instead of the list view. Supports template vars: `{current_user_id}`, `{current_org_id}`. |
467467
| **recordMode** | `Enum<'view' \| 'edit'>` | optional | Open the record in view (default) or edit mode. Only meaningful when `recordId` is set. |
468468
| **filters** | `Record<string, string>` | optional | URL filter conditions — targets the /:objectName/data bare surface via filter[`<field>`]=`<value>` params instead of a saved view. Values support template vars `{current_user_id}`, `{current_org_id}`. Mutually exclusive with recordId/viewName. |
@@ -652,7 +652,7 @@ A navigation contribution: a package injecting nav items into an app it does not
652652
| **requiresService** | `string` | optional | Hide/disable this entry unless the named kernel service is registered |
653653
| **type** | `'object'` | ✅ | |
654654
| **objectName** | `string` | ✅ | Target object name |
655-
| **viewName** | `string` | optional | Default list view to open. Defaults to "all". Ignored when `recordId` is set. |
655+
| **viewName** | `string` | optional | Default list view to open. When omitted, the console opens the object's default list view, else its first declared list view; `all` names the console's fallback tab, which exists only for an object that declares no list view. Ignored when `recordId` is set. |
656656
| **recordId** | `string` | optional | Navigate directly to this record id instead of the list view. Supports template vars: `{current_user_id}`, `{current_org_id}`. |
657657
| **recordMode** | `Enum<'view' \| 'edit'>` | optional | Open the record in view (default) or edit mode. Only meaningful when `recordId` is set. |
658658
| **filters** | `Record<string, string>` | optional | URL filter conditions — targets the /:objectName/data bare surface via filter[`<field>`]=`<value>` params instead of a saved view. Values support template vars `{current_user_id}`, `{current_org_id}`. Mutually exclusive with recordId/viewName. |
@@ -839,7 +839,7 @@ This schema accepts one of the following structures:
839839
| **requiresService** | `string` | optional | Hide/disable this entry unless the named kernel service is registered |
840840
| **type** | `'object'` | ✅ | |
841841
| **objectName** | `string` | ✅ | Target object name |
842-
| **viewName** | `string` | optional | Default list view to open. Defaults to "all". Ignored when `recordId` is set. |
842+
| **viewName** | `string` | optional | Default list view to open. When omitted, the console opens the object's default list view, else its first declared list view; `all` names the console's fallback tab, which exists only for an object that declares no list view. Ignored when `recordId` is set. |
843843
| **recordId** | `string` | optional | Navigate directly to this record id instead of the list view. Supports template vars: `{current_user_id}`, `{current_org_id}`. |
844844
| **recordMode** | `Enum<'view' \| 'edit'>` | optional | Open the record in view (default) or edit mode. Only meaningful when `recordId` is set. |
845845
| **filters** | `Record<string, string>` | optional | URL filter conditions — targets the /:objectName/data bare surface via filter[`<field>`]=`<value>` params instead of a saved view. Values support template vars `{current_user_id}`, `{current_org_id}`. Mutually exclusive with recordId/viewName. |
@@ -1081,7 +1081,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc`
10811081
| **requiresService** | `string` | optional | Hide/disable this entry unless the named kernel service is registered |
10821082
| **type** | `'object'` | ✅ | |
10831083
| **objectName** | `string` | ✅ | Target object name |
1084-
| **viewName** | `string` | optional | Default list view to open. Defaults to "all". Ignored when `recordId` is set. |
1084+
| **viewName** | `string` | optional | Default list view to open. When omitted, the console opens the object's default list view, else its first declared list view; `all` names the console's fallback tab, which exists only for an object that declares no list view. Ignored when `recordId` is set. |
10851085
| **recordId** | `string` | optional | Navigate directly to this record id instead of the list view. Supports template vars: `{current_user_id}`, `{current_org_id}`. |
10861086
| **recordMode** | `Enum<'view' \| 'edit'>` | optional | Open the record in view (default) or edit mode. Only meaningful when `recordId` is set. |
10871087
| **filters** | `Record<string, string>` | optional | URL filter conditions — targets the /:objectName/data bare surface via filter[`<field>`]=`<value>` params instead of a saved view. Values support template vars `{current_user_id}`, `{current_org_id}`. Mutually exclusive with recordId/viewName. |

0 commit comments

Comments
 (0)