diff --git a/.changeset/39052-nav-item-keywords.md b/.changeset/39052-nav-item-keywords.md new file mode 100644 index 00000000000..9105832cdd0 --- /dev/null +++ b/.changeset/39052-nav-item-keywords.md @@ -0,0 +1,25 @@ +--- +'@objectstack/spec': minor +'@object-ui/types': patch +'@object-ui/app-shell': patch +--- + +feat(spec): a navigation item declares search aliases, `keywords`, and a translation bundle gives them per locale + +Clause-②: yes (widening) +Metadata-protocol: added + +Setup pages are being renamed (#39050), so a page must still be found by its old name. Two optional keys carry that: + +- **`keywords: string[]` on every navigation item** except `separator` (it sits on the shared nav base, beside `label`). Source-language words a person may type to find the entry, such as its old name. Search only: never shown, never a route, never a gate. Each keyword is one trimmed, non-empty word or phrase of at most 60 characters, and an entry takes at most 20 (the dataset synonym's rule); anything else is refused, not trimmed. `synonyms`, `searchTerms` and `searchKeywords` are refused with "did you mean `keywords`", and so is `aliases`, except on a `group`, where it is answered with both keys it can mean there (`keywords`, or `renamedFrom` for retired group ids). A `separator` refuses `keywords` with its own prescription. +- **`keywords: string[]` on a translation bundle's navigation node**, beside `label`: `apps..navigation..keywords` gives this locale's aliases for the entry, keyed by the same entry id as the label, at both translation doors (the file bundle and the registered `translation` item), under the same rule as the item's. The node still owes its `label`, and an unknown key is still refused. + +The key is named `keywords`, not `aliases`, because `aliases` already means a retired-key rename map across the AI schemas. + +Nothing reads either key yet. The reader is the command palette (#39055), which will match a query against the aliases resolved for the current locale. Until then the key is graded `planned` on the liveness ledger (`navigation.children.keywords`), its describe carries `[PLANNED — not yet read]`, and authoring it raises no warning: an alias nothing reads costs a search hit, not a gate. + +The navigation contribution's `group` describe and example now name a current Setup group id, `group_integrations_dev`, instead of the retired `group_integrations`. + +`@object-ui/types` declares `keywords` on its navigation item mirror, so `objectui validate` keeps the key, under the spec's rule, instead of stripping it; nothing in the console reads it yet. `@object-ui/app-shell`'s nav editors count `keywords` among the describing keys, so changing an entry's type keeps them. + +No action needed for existing metadata: both keys are optional. diff --git a/content/docs/references/ui/app.mdx b/content/docs/references/ui/app.mdx index bfb33de2c88..f5c41779950 100644 --- a/content/docs/references/ui/app.mdx +++ b/content/docs/references/ui/app.mdx @@ -30,6 +30,7 @@ const result = ActionNavItemSchema.parse(data); | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -75,7 +76,7 @@ const result = ActionNavItemSchema.parse(data); | **isDefault** | `boolean` | optional (default: `false`) | Is default app | | **hidden** | `boolean` | optional | Hide from the App Switcher; the shell surfaces hidden apps via the avatar menu instead (navigation only — never an access gate) | | **_unpublished** | `boolean` | optional | Machine-managed publish gate (ADR-0045 §3) — true = unpublished, externally unobservable. Written by AI materialization, cleared by publish-drafts. Never authored. | -| **navigation** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | optional | Full navigation tree for the app sidebar | +| **navigation** | `({ id: string; label?: string \| Record; keywords?: string[]; icon?: string; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | optional | Full navigation tree for the app sidebar | | **areas** | `{ id: string; label: string \| Record; icon?: string; description?: string \| Record; … }[]` | optional | Navigation areas for partitioning navigation by business domain | | **contextSelectors** | `{ id: string; label: string \| Record; icon?: string; optionsSource: object; … }[]` | optional | App-level scope dropdowns whose value is injected into nav items as `{}` template vars | | **landing** | `{ item: string; visible: string \| object }[]` | optional | Per-audience landing: the first entry whose `visible` (CEL) holds for the reader names the navigation entry (`item`, an `id` of this app's own `navigation` or `areas[].navigation`) the app opens on; an entry whose `item` the reader's own navigation gates hide, or whose `visible` faults, is passed over. An `item` that names no entry of this app, or a `group` / `separator` / `action` / `url` entry, is refused at parse. No match, or no key: the app opens on its first navigation item by `order`, as before. | @@ -106,6 +107,7 @@ const result = ActionNavItemSchema.parse(data); | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -122,7 +124,7 @@ const result = ActionNavItemSchema.parse(data); | **recordMode** | `Enum<'view' \| 'edit'>` | optional | Open the record in view (default) or edit mode. Only meaningful when `recordId` is set. | | **filters** | `Record` | optional | URL filter conditions — targets the /:objectName/data bare surface via filter[``]=`` params instead of a saved view. Values support template vars `{current_user_id}`, `{current_org_id}`. Mutually exclusive with recordId/viewName. | | **runAction** | `string` | optional | Auto-run this declared action once on arrival at the object's list surface (deep-link "navigate = run action"). Must name an action defined in the stack; validated by defineStack and lint. Not combinable with recordId. | -| **children** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | optional | Child navigation items (e.g. specific views) | +| **children** | `({ id: string; label?: string \| Record; keywords?: string[]; icon?: string; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | optional | Child navigation items (e.g. specific views) | ### Nested Shape: `App.navigation[number][type='dashboard']` @@ -130,6 +132,7 @@ const result = ActionNavItemSchema.parse(data); | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -148,6 +151,7 @@ const result = ActionNavItemSchema.parse(data); | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -167,6 +171,7 @@ const result = ActionNavItemSchema.parse(data); | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -186,6 +191,7 @@ const result = ActionNavItemSchema.parse(data); | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -204,6 +210,7 @@ const result = ActionNavItemSchema.parse(data); | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -222,6 +229,7 @@ const result = ActionNavItemSchema.parse(data); | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -243,6 +251,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -270,6 +279,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -282,7 +292,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | **type** | `'group'` | ✅ | | | **expanded** | `boolean` | optional (default: `true`) | Whether the group starts open in the sidebar. Omitted, it opens; write `false` to keep it closed until the user opens it. A group holding the current route opens whatever it declares. | | **renamedFrom** | `string[]` | optional | Earlier ids of THIS navigation group, in the nav-id grammar (lowercase snake_case), e.g. `renamedFrom: ['group_people_org']` on a group now `group_users_org`. A navigation contribution (`navigationContributions[]`) whose `group` names one of them lands in this group, and the contributing package is warned to name the new id (`nav_contribution_group_renamed`, by the runtime at `warn` and by `os build` / `os validate`). A group whose own id matches always wins over a `renamedFrom` entry. Several retired groups merged into this one are all listed. Each entry once; never this group's own id; never an id another entry of the app still declares; never an old id another group also claims; only on groups in the app's `navigation` (contributions never fold into `areas`). | -| **children** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Child navigation items | +| **children** | `({ id: string; label?: string \| Record; keywords?: string[]; icon?: string; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Child navigation items | ### Nested Shape: `App.areas[number]` @@ -292,7 +302,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | **label** | `string \| Record` | ✅ | Area display label | | **icon** | `string` | optional | Area icon name | | **description** | `string \| Record` | optional | Area description | -| **navigation** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Navigation items within this area | +| **navigation** | `({ id: string; label?: string \| Record; keywords?: string[]; icon?: string; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Navigation items within this area | ### Nested Shape: `App.contextSelectors[number]` @@ -389,6 +399,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -421,6 +432,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -454,6 +466,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -486,6 +499,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -520,7 +534,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | **label** | `string \| Record` | ✅ | Area display label | | **icon** | `string` | optional | Area icon name | | **description** | `string \| Record` | optional | Area description | -| **navigation** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Navigation items within this area | +| **navigation** | `({ id: string; label?: string \| Record; keywords?: string[]; icon?: string; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Navigation items within this area | ### Nested Shape: `NavigationArea.navigation[number][type='object']` @@ -528,6 +542,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -544,7 +559,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | **recordMode** | `Enum<'view' \| 'edit'>` | optional | Open the record in view (default) or edit mode. Only meaningful when `recordId` is set. | | **filters** | `Record` | optional | URL filter conditions — targets the /:objectName/data bare surface via filter[``]=`` params instead of a saved view. Values support template vars `{current_user_id}`, `{current_org_id}`. Mutually exclusive with recordId/viewName. | | **runAction** | `string` | optional | Auto-run this declared action once on arrival at the object's list surface (deep-link "navigate = run action"). Must name an action defined in the stack; validated by defineStack and lint. Not combinable with recordId. | -| **children** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | optional | Child navigation items (e.g. specific views) | +| **children** | `({ id: string; label?: string \| Record; keywords?: string[]; icon?: string; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | optional | Child navigation items (e.g. specific views) | ### Nested Shape: `NavigationArea.navigation[number][type='dashboard']` @@ -552,6 +567,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -570,6 +586,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -589,6 +606,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -608,6 +626,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -626,6 +645,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -644,6 +664,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -665,6 +686,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -692,6 +714,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -704,7 +727,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | **type** | `'group'` | ✅ | | | **expanded** | `boolean` | optional (default: `true`) | Whether the group starts open in the sidebar. Omitted, it opens; write `false` to keep it closed until the user opens it. A group holding the current route opens whatever it declares. | | **renamedFrom** | `string[]` | optional | Earlier ids of THIS navigation group, in the nav-id grammar (lowercase snake_case), e.g. `renamedFrom: ['group_people_org']` on a group now `group_users_org`. A navigation contribution (`navigationContributions[]`) whose `group` names one of them lands in this group, and the contributing package is warned to name the new id (`nav_contribution_group_renamed`, by the runtime at `warn` and by `os build` / `os validate`). A group whose own id matches always wins over a `renamedFrom` entry. Several retired groups merged into this one are all listed. Each entry once; never this group's own id; never an id another entry of the app still declares; never an old id another group also claims; only on groups in the app's `navigation` (contributions never fold into `areas`). | -| **children** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Child navigation items | +| **children** | `({ id: string; label?: string \| Record; keywords?: string[]; icon?: string; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Child navigation items | --- @@ -718,9 +741,9 @@ A navigation contribution: a package injecting nav items into an app it does not | Property | Type | Required | Description | | :--- | :--- | :--- | :--- | | **app** | `string` | ✅ | Target app name to contribute navigation into (e.g. "setup") | -| **group** | `string` | optional | Target group nav-item id to append into (e.g. "group_integrations"); omit to append at the app top level. A retired id that a group of the target app lists in its `renamedFrom` lands in that group, with a `nav_contribution_group_renamed` warning naming the new id. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time. | +| **group** | `string` | optional | Target group nav-item id to append into (e.g. "group_integrations_dev"); omit to append at the app top level. A retired id that a group of the target app lists in its `renamedFrom` lands in that group, with a `nav_contribution_group_renamed` warning naming the new id. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time. | | **priority** | `integer` | optional (default: `200`) | Merge priority within the target group — lower applied first (matches object extender priority) | -| **items** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Navigation items contributed into the target app/group | +| **items** | `({ id: string; label?: string \| Record; keywords?: string[]; icon?: string; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Navigation items contributed into the target app/group | ### Nested Shape: `NavigationContribution.items[number][type='object']` @@ -728,6 +751,7 @@ A navigation contribution: a package injecting nav items into an app it does not | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -744,7 +768,7 @@ A navigation contribution: a package injecting nav items into an app it does not | **recordMode** | `Enum<'view' \| 'edit'>` | optional | Open the record in view (default) or edit mode. Only meaningful when `recordId` is set. | | **filters** | `Record` | optional | URL filter conditions — targets the /:objectName/data bare surface via filter[``]=`` params instead of a saved view. Values support template vars `{current_user_id}`, `{current_org_id}`. Mutually exclusive with recordId/viewName. | | **runAction** | `string` | optional | Auto-run this declared action once on arrival at the object's list surface (deep-link "navigate = run action"). Must name an action defined in the stack; validated by defineStack and lint. Not combinable with recordId. | -| **children** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | optional | Child navigation items (e.g. specific views) | +| **children** | `({ id: string; label?: string \| Record; keywords?: string[]; icon?: string; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | optional | Child navigation items (e.g. specific views) | ### Nested Shape: `NavigationContribution.items[number][type='dashboard']` @@ -752,6 +776,7 @@ A navigation contribution: a package injecting nav items into an app it does not | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -770,6 +795,7 @@ A navigation contribution: a package injecting nav items into an app it does not | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -789,6 +815,7 @@ A navigation contribution: a package injecting nav items into an app it does not | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -808,6 +835,7 @@ A navigation contribution: a package injecting nav items into an app it does not | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -826,6 +854,7 @@ A navigation contribution: a package injecting nav items into an app it does not | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -844,6 +873,7 @@ A navigation contribution: a package injecting nav items into an app it does not | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -865,6 +895,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -892,6 +923,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -904,7 +936,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | **type** | `'group'` | ✅ | | | **expanded** | `boolean` | optional (default: `true`) | Whether the group starts open in the sidebar. Omitted, it opens; write `false` to keep it closed until the user opens it. A group holding the current route opens whatever it declares. | | **renamedFrom** | `string[]` | optional | Earlier ids of THIS navigation group, in the nav-id grammar (lowercase snake_case), e.g. `renamedFrom: ['group_people_org']` on a group now `group_users_org`. A navigation contribution (`navigationContributions[]`) whose `group` names one of them lands in this group, and the contributing package is warned to name the new id (`nav_contribution_group_renamed`, by the runtime at `warn` and by `os build` / `os validate`). A group whose own id matches always wins over a `renamedFrom` entry. Several retired groups merged into this one are all listed. Each entry once; never this group's own id; never an id another entry of the app still declares; never an old id another group also claims; only on groups in the app's `navigation` (contributions never fold into `areas`). | -| **children** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Child navigation items | +| **children** | `({ id: string; label?: string \| Record; keywords?: string[]; icon?: string; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Child navigation items | --- @@ -925,6 +957,7 @@ This schema accepts one of the following structures: | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -963,6 +996,7 @@ This schema accepts one of the following structures: | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -995,6 +1029,7 @@ This schema accepts one of the following structures: | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -1028,6 +1063,7 @@ This schema accepts one of the following structures: | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -1061,6 +1097,7 @@ This schema accepts one of the following structures: | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -1093,6 +1130,7 @@ This schema accepts one of the following structures: | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -1132,6 +1170,7 @@ This schema accepts one of the following structures: | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -1167,6 +1206,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -1214,6 +1254,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -1249,6 +1290,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -1285,6 +1327,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -1317,6 +1360,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | @@ -1348,6 +1392,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | :--- | :--- | :--- | :--- | | **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) | | **label** | `string \| Record` | optional | Display proper label. Optional. Resolved in one order: (1) the bundle entry `apps..navigation..label` for the active locale chain, keyed by this entry's `id` — `translateApp` applies it at the `/meta` boundary, over the app's `navigation` tree (not `areas`); (2) else a present label as authored — its inline locale map's value for that locale, else its text; (3) else (absent) the CURRENT label of what the entry opens, at render time — the view's label when it names a labelled view, else the object's / dashboard's label — localized by the target's own translation. A present label is never replaced by its target's label and never translated by matching its text. Every real destination must have identity and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is materialised for the absent case. | +| **keywords** | `string[]` | optional | [PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old name after a rename. Source-language strings as authored; another locale's aliases come from the translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: never shown as the entry's text, never a route, never a gate. Each trimmed, non-empty, at most 60 characters; at most 20. The command palette is its reader; until it ships, nothing reads the key. | | **icon** | `string` | optional | Icon name | | **order** | `number` | optional | Sort order within the same level (lower = first) | | **badge** | `string \| number` | optional | Badge text or count displayed on the item | diff --git a/content/docs/ui/apps.mdx b/content/docs/ui/apps.mdx index 8d26393fe9f..9e0d026d0c1 100644 --- a/content/docs/ui/apps.mdx +++ b/content/docs/ui/apps.mdx @@ -293,6 +293,7 @@ rejected — a divider has nothing to label, gate, or badge.) | :--- | :--- | :--- | | `id` | `string` | Unique identifier (`snake_case`, required) | | `label` | `string` | Display label | +| `keywords` | `string[]` | Search aliases, such as a page's old name after a rename (planned: the command palette will read them) | | `icon` | `string` | Icon name (Lucide) | | `order` | `number` | Sort order within the same level (lower = first); entries [contributed by another package](#contributing-navigation-to-another-app) sort in the same level | | `badge` | `string \| number` | Badge text or count displayed on the item | @@ -311,6 +312,11 @@ load with no navigation edit. Other entries fall back to their target's name console's own name for the index. A `label` you write renders verbatim; never write an empty one, omit the key instead. +`keywords` lists other words a person may type to find the entry, such as its old +name after a rename; they are never shown and never gate anything, and a +translation bundle gives each locale its own under +`apps..navigation..keywords`, beside that entry's `label`. + ## Designing the navigation The same requirement can often be met three ways: a plain object entry, an object diff --git a/docs/qa/platform-checklist/areas/dashboards.json b/docs/qa/platform-checklist/areas/dashboards.json index c51cb4cd932..3b344f0122b 100644 --- a/docs/qa/platform-checklist/areas/dashboards.json +++ b/docs/qa/platform-checklist/areas/dashboards.json @@ -958,7 +958,7 @@ "fixtures": { "app": "showcase", "requires": [ - "the built-in Setup app + the platform `system_overview` dashboard (packages/platform-objects/src/apps/dashboards/system_overview.dashboard.ts) reached at Setup → System Overview (nav_system_overview, setup-nav.contributions.ts) — present in any booted app, not a showcase fixture", + "the built-in Setup app + the platform `system_overview` dashboard (packages/platform-objects/src/apps/dashboards/system_overview.dashboard.ts) reached at Setup → System Overview (nav_system_overview, setup.app.ts, pinned at the top of the Setup sidebar outside every group) — present in any booted app, not a showcase fixture", "the five backing datasets over `sys_*` objects (packages/platform-objects/src/apps/dashboards/system.datasets.ts: sys_user_metrics, sys_session_metrics, sys_organization_metrics, sys_package_installation_metrics, sys_audit_log_metrics)", "at least one signed-in session (the admin's own) so sys_session count is non-zero, and the seeded sys_user population" ], @@ -967,7 +967,7 @@ ] }, "steps": [ - "sign in as admin, open the Setup app, and navigate to System Overview (nav_system_overview → dashboard system_overview); let the board settle and screenshot the whole dashboard BEFORE reading any DOM", + "sign in as admin, open the Setup app, and navigate to System Overview, the first entry of the Setup sidebar (nav_system_overview → dashboard system_overview); let the board settle and screenshot the whole dashboard BEFORE reading any DOM", "capture the dataset queries the widgets issue on load (the network trace) — each metric tile queries its sys_*_metrics dataset (count aggregate)", "first make the live-session predicate discriminate — a fresh boot holds no revoked or expired sys_session row, so the live count and the table count are equal and clause 1 proves nothing (QA run #23927 F3): sign the admin in a SECOND time (POST /api/v1/auth/sign-in/email; keep the returned token) and, from the first session, revoke the second one (POST /api/v1/auth/revoke-session {\"token\": the second token}). An interactive revoke TOMBSTONES the row in place — revoked_at and revoke_reason 'user_revoked' stamped, expires_at moved into the past (packages/plugins/plugin-auth/src/session-tombstone.ts#INTERACTIVE_REVOKE_REASON) — whereas sign-out deletes it, so use the revoke. Confirm the unfiltered sys_session count now exceeds the live-predicate count, then reload the board. THEN establish ground truth via the data API: a count aggregate on sys_user, and a count aggregate on sys_session restricted to LIVE sessions (revoked_at is null AND expires_at after now — the Active Sessions widget's own filter), recording both numbers and the unfiltered sys_session count", "read the rendered value of widget_total_users (Total Users) and widget_active_sessions (Active Sessions) from the DOM (only after the screenshot confirmed render) and compare each to its API count", @@ -1028,7 +1028,7 @@ "source": [ "packages/platform-objects/src/apps/dashboards/system_overview.dashboard.ts#requiresService (9 widget ids; requiresService / requiresObject gates; widget_active_sessions' live-session filter, #7531; the Row 2 note on the removed Permission Changes tile; globalFilters date range) + packages/rest/src/meta-item-read-gate.ts#filterDashboardForUser (the server strip of an unmet requiresService widget, ADR-0057 D10)", "packages/platform-objects/src/apps/dashboards/system.datasets.ts (the five sys_*_metrics datasets and their count measures)", - "packages/platform-objects/src/apps/setup-nav.contributions.ts#nav_system_overview (nav_system_overview → dashboard system_overview in the Setup app)" + "packages/platform-objects/src/apps/setup.app.ts#nav_system_overview (nav_system_overview → dashboard system_overview, pinned at the top of the Setup app)" ], "history": [ { diff --git a/packages/spec/authorable-surface/ui.json b/packages/spec/authorable-surface/ui.json index 338d3747210..fe3e5d27113 100644 --- a/packages/spec/authorable-surface/ui.json +++ b/packages/spec/authorable-surface/ui.json @@ -136,6 +136,7 @@ "ui/ActionNavItem:dataSource", "ui/ActionNavItem:icon", "ui/ActionNavItem:id", + "ui/ActionNavItem:keywords", "ui/ActionNavItem:label", "ui/ActionNavItem:order", "ui/ActionNavItem:requiredPermissions", @@ -315,6 +316,7 @@ "ui/ComponentNavItem:dataSource", "ui/ComponentNavItem:icon", "ui/ComponentNavItem:id", + "ui/ComponentNavItem:keywords", "ui/ComponentNavItem:label", "ui/ComponentNavItem:order", "ui/ComponentNavItem:params", @@ -357,6 +359,7 @@ "ui/DashboardNavItem:dataSource", "ui/DashboardNavItem:icon", "ui/DashboardNavItem:id", + "ui/DashboardNavItem:keywords", "ui/DashboardNavItem:label", "ui/DashboardNavItem:order", "ui/DashboardNavItem:requiredPermissions", @@ -447,6 +450,7 @@ "ui/DocNavItem:doc", "ui/DocNavItem:icon", "ui/DocNavItem:id", + "ui/DocNavItem:keywords", "ui/DocNavItem:label", "ui/DocNavItem:order", "ui/DocNavItem:requiredPermissions", @@ -701,6 +705,7 @@ "ui/GroupNavItem:expanded", "ui/GroupNavItem:icon", "ui/GroupNavItem:id", + "ui/GroupNavItem:keywords", "ui/GroupNavItem:label", "ui/GroupNavItem:order", "ui/GroupNavItem:renamedFrom", @@ -1076,6 +1081,7 @@ "ui/ObjectNavItem:filters", "ui/ObjectNavItem:icon", "ui/ObjectNavItem:id", + "ui/ObjectNavItem:keywords", "ui/ObjectNavItem:label", "ui/ObjectNavItem:objectName", "ui/ObjectNavItem:order", @@ -1178,6 +1184,7 @@ "ui/PageNavItem:dataSource", "ui/PageNavItem:icon", "ui/PageNavItem:id", + "ui/PageNavItem:keywords", "ui/PageNavItem:label", "ui/PageNavItem:order", "ui/PageNavItem:pageName", @@ -1358,6 +1365,7 @@ "ui/ReportNavItem:dataSource", "ui/ReportNavItem:icon", "ui/ReportNavItem:id", + "ui/ReportNavItem:keywords", "ui/ReportNavItem:label", "ui/ReportNavItem:order", "ui/ReportNavItem:reportName", @@ -1399,6 +1407,7 @@ "ui/UrlNavItem:dataSource", "ui/UrlNavItem:icon", "ui/UrlNavItem:id", + "ui/UrlNavItem:keywords", "ui/UrlNavItem:label", "ui/UrlNavItem:order", "ui/UrlNavItem:requiredPermissions", diff --git a/packages/spec/docs/references/api/metadata.md b/packages/spec/docs/references/api/metadata.md index abab9a8a1fb..c6a7882054c 100644 --- a/packages/spec/docs/references/api/metadata.md +++ b/packages/spec/docs/references/api/metadata.md @@ -86,7 +86,7 @@ const result = AppDefinitionResponseSchema.parse(data); | **isDefault** | `boolean` | optional (default: `false`) | Is default app | | **hidden** | `boolean` | optional | Hide from the App Switcher; the shell surfaces hidden apps via the avatar menu instead (navigation only — never an access gate) | | **_unpublished** | `boolean` | optional | Machine-managed publish gate (ADR-0045 §3) — true = unpublished, externally unobservable. Written by AI materialization, cleared by publish-drafts. Never authored. | -| **navigation** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | optional | Full navigation tree for the app sidebar | +| **navigation** | `({ id: string; label?: string \| Record; keywords?: string[]; icon?: string; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | optional | Full navigation tree for the app sidebar | | **areas** | `{ id: string; label: string \| Record; icon?: string; description?: string \| Record; … }[]` | optional | Navigation areas for partitioning navigation by business domain | | **contextSelectors** | `{ id: string; label: string \| Record; icon?: string; optionsSource: object; … }[]` | optional | App-level scope dropdowns whose value is injected into nav items as `{}` template vars | | **landing** | `{ item: string; visible: string \| object }[]` | optional | Per-audience landing: the first entry whose `visible` (CEL) holds for the reader names the navigation entry (`item`, an `id` of this app's own `navigation` or `areas[].navigation`) the app opens on; an entry whose `item` the reader's own navigation gates hide, or whose `visible` faults, is passed over. An `item` that names no entry of this app, or a `group` / `separator` / `action` / `url` entry, is refused at parse. No match, or no key: the app opens on its first navigation item by `order`, as before. | diff --git a/packages/spec/docs/references/api/package-api.md b/packages/spec/docs/references/api/package-api.md index f051e6e9b79..4e9fb4ad3c3 100644 --- a/packages/spec/docs/references/api/package-api.md +++ b/packages/spec/docs/references/api/package-api.md @@ -260,9 +260,9 @@ A navigation contribution: a package injecting nav items into an app it does not | Property | Type | Required | Description | | :--- | :--- | :--- | :--- | | **app** | `string` | ✅ | Target app name to contribute navigation into (e.g. "setup") | -| **group** | `string` | optional | Target group nav-item id to append into (e.g. "group_integrations"); omit to append at the app top level. A retired id that a group of the target app lists in its `renamedFrom` lands in that group, with a `nav_contribution_group_renamed` warning naming the new id. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time. | +| **group** | `string` | optional | Target group nav-item id to append into (e.g. "group_integrations_dev"); omit to append at the app top level. A retired id that a group of the target app lists in its `renamedFrom` lands in that group, with a `nav_contribution_group_renamed` warning naming the new id. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time. | | **priority** | `integer` | optional (default: `200`) | Merge priority within the target group — lower applied first (matches object extender priority) | -| **items** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Navigation items contributed into the target app/group | +| **items** | `({ id: string; label?: string \| Record; keywords?: string[]; icon?: string; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Navigation items contributed into the target app/group | ### Nested Shape: `PackageInstallBody[option 2].engine` @@ -370,9 +370,9 @@ A navigation contribution: a package injecting nav items into an app it does not | Property | Type | Required | Description | | :--- | :--- | :--- | :--- | | **app** | `string` | ✅ | Target app name to contribute navigation into (e.g. "setup") | -| **group** | `string` | optional | Target group nav-item id to append into (e.g. "group_integrations"); omit to append at the app top level. A retired id that a group of the target app lists in its `renamedFrom` lands in that group, with a `nav_contribution_group_renamed` warning naming the new id. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time. | +| **group** | `string` | optional | Target group nav-item id to append into (e.g. "group_integrations_dev"); omit to append at the app top level. A retired id that a group of the target app lists in its `renamedFrom` lands in that group, with a `nav_contribution_group_renamed` warning naming the new id. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time. | | **priority** | `integer` | optional (default: `200`) | Merge priority within the target group — lower applied first (matches object extender priority) | -| **items** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Navigation items contributed into the target app/group | +| **items** | `({ id: string; label?: string \| Record; keywords?: string[]; icon?: string; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Navigation items contributed into the target app/group | ### Nested Shape: `PackageInstallManifest.engine` diff --git a/packages/spec/docs/references/kernel/manifest.md b/packages/spec/docs/references/kernel/manifest.md index bc0784949af..adf43c5c456 100644 --- a/packages/spec/docs/references/kernel/manifest.md +++ b/packages/spec/docs/references/kernel/manifest.md @@ -114,9 +114,9 @@ A navigation contribution: a package injecting nav items into an app it does not | Property | Type | Required | Description | | :--- | :--- | :--- | :--- | | **app** | `string` | ✅ | Target app name to contribute navigation into (e.g. "setup") | -| **group** | `string` | optional | Target group nav-item id to append into (e.g. "group_integrations"); omit to append at the app top level. A retired id that a group of the target app lists in its `renamedFrom` lands in that group, with a `nav_contribution_group_renamed` warning naming the new id. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time. | +| **group** | `string` | optional | Target group nav-item id to append into (e.g. "group_integrations_dev"); omit to append at the app top level. A retired id that a group of the target app lists in its `renamedFrom` lands in that group, with a `nav_contribution_group_renamed` warning naming the new id. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time. | | **priority** | `integer` | optional (default: `200`) | Merge priority within the target group — lower applied first (matches object extender priority) | -| **items** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Navigation items contributed into the target app/group | +| **items** | `({ id: string; label?: string \| Record; keywords?: string[]; icon?: string; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Navigation items contributed into the target app/group | ### Nested Shape: `Manifest.engine` diff --git a/packages/spec/docs/references/system/translation.md b/packages/spec/docs/references/system/translation.md index 58712ea1155..426bc1df5db 100644 --- a/packages/spec/docs/references/system/translation.md +++ b/packages/spec/docs/references/system/translation.md @@ -242,7 +242,7 @@ Translation data for a single object | :--- | :--- | :--- | :--- | | **label** | `string` | optional | Translated app label | | **description** | `string` | optional | Translated app description | -| **navigation** | `Record` | optional | Navigation group translations keyed by group ID | +| **navigation** | `Record` | optional | Navigation group translations keyed by group ID | ### Nested Shape: `PlatformTranslationData.globalActions[string]` @@ -453,7 +453,7 @@ Translation data for a single object | :--- | :--- | :--- | :--- | | **label** | `string` | optional | Translated app label | | **description** | `string` | optional | Translated app description | -| **navigation** | `Record` | optional | Navigation group translations keyed by group ID | +| **navigation** | `Record` | optional | Navigation group translations keyed by group ID | ### Nested Shape: `ServedTranslationData.globalActions[string]` @@ -727,7 +727,7 @@ Translation data for a single object | :--- | :--- | :--- | :--- | | **label** | `string` | optional | Translated app label | | **description** | `string` | optional | Translated app description | -| **navigation** | `Record` | optional | Navigation group translations keyed by group ID | +| **navigation** | `Record` | optional | Navigation group translations keyed by group ID | ### Nested Shape: `TranslationData.globalActions[string]` @@ -970,7 +970,7 @@ Translation data for a single object | :--- | :--- | :--- | :--- | | **label** | `string` | optional | Translated app label | | **description** | `string` | optional | Translated app description | -| **navigation** | `Record` | optional | Navigation group translations keyed by group ID | +| **navigation** | `Record` | optional | Navigation group translations keyed by group ID | ### Nested Shape: `TranslationItem.globalActions[string]` diff --git a/packages/spec/liveness/app.json b/packages/spec/liveness/app.json index b8d3a4ea82c..bc8507cd007 100644 --- a/packages/spec/liveness/app.json +++ b/packages/spec/liveness/app.json @@ -98,6 +98,12 @@ "evidence": "packages/spec/src/system/i18n-resolver.ts#lookupNavLabel (reads `apps..navigation..label` — keyed by the node id, one flat keyspace regardless of tree depth); packages/spec/src/system/i18n-resolver.ts#translateApp (walks the tree and swaps the label in); ui/packages/layout/src/NavigationRenderer.tsx (:284-316 at objectui @940ba24) (resolveNavItemLabel)", "note": "rendered everywhere; translateApp swaps in the per-locale label by node id. 2026-08-28: RE-ANCHORED (commit 8f10a79f7) and REPOINTED — `:456` had rotted onto `opts?: ResolveOptions` in `lookupActionResultDialogText`'s signature, ~195 lines above `lookupNavLabel`. Re-closed by hand against 8cb96ec41." }, + "keywords": { + "status": "planned", + "verifiedAt": "2026-12-02", + "evidenceScope": "cross-repo", + "note": "PLANNED RECORD (#39052, 2026-12-02, Claim 7339233623 by seat repo:objectstack@os-support-ai; epic #39050 row 8, protocol half): search aliases on a navigation entry, `keywords: string[]`, declared on the shared nav base so the nine branches that spread it carry it (a separator refuses it with its own prescription). Named `keywords`, not `aliases`, because `aliases` is the retired-key rename map across packages/spec/src/ai/*.zod.ts. The per-locale half is the translation bundle's `apps..navigation..keywords`, keyed by the same entry id as `label` (translation.json's `apps` row, not drilled below the record value). PLANNED, not live: the declared reader is the command palette card #39055 (Blocked-by #39052), whose read points are ui/packages/app-shell/src/chrome/CommandPalette.tsx (matches label and machine name only today) and ui/packages/app-shell/src/views/appReportIndex.ts#flattenNavigation; objectui's nav mirror (ui/packages/types/src/zod/app.zod.ts) declares the key with the spec's accept set so the console parse keeps it, and the Studio nav editor's retype keeps it (ui/packages/app-shell/src/views/metadata-admin/inspectors/nav-target.ts NAV_ENTRY_BASE_KEYS), but no source reads it today. `authorWarn` is deliberately OFF: an authored alias that nothing reads costs a search hit, not a gate or a route, and the platform-items card #39057 authors it on the first-party Setup app, where a warning would fire on every stock build until the palette lands. Flip to `live` on the commit that cites the palette's reader, and drop the `[PLANNED — not yet read]` describe marker in the same edit." + }, "icon": { "status": "live", "verifiedAt": "2026-08-01", diff --git a/packages/spec/liveness/state-counts/app.md b/packages/spec/liveness/state-counts/app.md index 65913cfcd46..d60849a00c0 100644 --- a/packages/spec/liveness/state-counts/app.md +++ b/packages/spec/liveness/state-counts/app.md @@ -12,4 +12,4 @@ committed anywhere: `check:liveness` sums the shards when it reads them. | Type | live | exp | elsewhere | dead | planned | classified | |---|---|---|---|---|---|---| -| `app` | 53 | 0 | 0 | 0 | 6 | 59 | +| `app` | 53 | 0 | 0 | 0 | 7 | 60 | diff --git a/packages/spec/liveness/translation.json b/packages/spec/liveness/translation.json index a57122a25ce..fbf45a5f124 100644 --- a/packages/spec/liveness/translation.json +++ b/packages/spec/liveness/translation.json @@ -54,7 +54,7 @@ "status": "live", "verifiedAt": "2026-08-28", "evidence": "packages/spec/src/system/i18n-resolver.ts#lookupAppAttr (`apps..label` / `.description`); packages/spec/src/system/i18n-resolver.ts#lookupNavLabel (`apps..navigation..label`); packages/rest/src/rest-server.ts#translateMetaItem (the /meta read path that applies it — dispatches through `translateMetadataDocument` to `translateApp`)", - "note": "translateApp swaps app label/description and walks the navigation tree replacing node labels by id — applied on every /meta app read. 2026-08-28: RE-ANCHORED (commit 8f10a79f7) and REPOINTED, both legs — `i18n-resolver.ts:442` had rotted onto a PARAMETER in `lookupActionResultDialogNode`'s signature, and `rest-server.ts:2001` onto a blank line in the Server-Timing disclosure gate ~570 lines from the translate seam. The rest leg is also named more honestly than the note was: this repo has NO `translateApp` call site — the REST layer calls `translateMetaItem`, which reaches `translateApp` through the per-type translator map in `translateMetadataDocument`. Re-closed by hand against 8cb96ec41." + "note": "translateApp swaps app label/description and walks the navigation tree replacing node labels by id — applied on every /meta app read. 2026-08-28: RE-ANCHORED (commit 8f10a79f7) and REPOINTED, both legs — `i18n-resolver.ts:442` had rotted onto a PARAMETER in `lookupActionResultDialogNode`'s signature, and `rest-server.ts:2001` onto a blank line in the Server-Timing disclosure gate ~570 lines from the translate seam. The rest leg is also named more honestly than the note was: this repo has NO `translateApp` call site — the REST layer calls `translateMetaItem`, which reaches `translateApp` through the per-type translator map in `translateMetadataDocument`. Re-closed by hand against 8cb96ec41. 2026-12-02 (#39052): the navigation node gained `keywords` (`apps..navigation..keywords`, this locale's search aliases for the entry). It sits below this row's walk boundary, so it inherits this row's `live` verdict without being read: its reader is the command palette card #39055, and the nav item's own key is graded `planned` on app.json's `navigation.children.keywords`, which carries the record." }, "messages": { "status": "live", diff --git a/packages/spec/src/system/translation.zod.ts b/packages/spec/src/system/translation.zod.ts index 4760dffcfd1..c42579ecb81 100644 --- a/packages/spec/src/system/translation.zod.ts +++ b/packages/spec/src/system/translation.zod.ts @@ -1347,9 +1347,44 @@ const appTranslationDataShape = () => ({ navigation: z.record(z.string(), strictObject({ surface: 'this navigation group translation', history: TRANSLATION_HISTORY, - aliases: { name: 'label', title: 'label', text: 'label' }, + aliases: { + name: 'label', title: 'label', text: 'label', + // The nav item's own spellings for `keywords` (ui/app.zod.ts NAV_ITEM_ALIASES). + aliases: 'keywords', synonyms: 'keywords', searchterms: 'keywords', searchkeywords: 'keywords', + }, }, { label: z.string().describe('Translated navigation group label'), + /** + * This locale's search aliases for the entry (#39052) — the per-locale + * half of the nav item's `keywords`, keyed by the same entry id as + * `label`. The accept set is the nav item's (ui/app.zod.ts + * `navKeywordsSchema`: each trimmed, non-empty, at most 60 characters, + * at most 20), restated here because this module does not import the + * app schema; `app-nav-keywords.test.ts` holds both doors to the same + * verdicts. + * + * Per-locale on purpose, which is where it departs from a dataset + * member's `synonyms` ({@link DATASET_MEMBER_SYNONYMS_NOT_TRANSLATED}, + * matched in every language at once): the card asks that a page's + * aliases follow the current locale. Whether a locale's list replaces + * the source-language `keywords` or adds to them is the reader's + * contract (the command palette card, #39055), not settled here. + * Planned: nothing reads it yet. + */ + keywords: z.array( + z.string() + .max(60, { error: () => 'a navigation keyword is at most 60 characters — one word or short phrase a person would type to find the entry.' }) + .regex(/^\S(?:.*\S)?$/u, { + error: () => 'a navigation keyword is one word or phrase as a person types it in search: not empty, no ' + + 'leading or trailing whitespace, no line break. The schema refuses rather than trims it, so what is ' + + 'stored is what was written.', + }), + ).max(20, { error: () => 'an entry takes at most 20 keywords — keep the words people actually use for it.' }) + .optional().describe( + '[PLANNED — not yet read] Search aliases for this navigation entry in this locale: the words a person ' + + 'may type to find it, such as its old name after a rename. Each trimmed, non-empty, at most 60 ' + + 'characters; at most 20. Read by the command palette once it ships.', + ), })).optional().describe('Navigation group translations keyed by group ID'), })).optional().describe('App translations keyed by app name'), diff --git a/packages/spec/src/ui/app-nav-keywords.test.ts b/packages/spec/src/ui/app-nav-keywords.test.ts new file mode 100644 index 00000000000..6c67df925be --- /dev/null +++ b/packages/spec/src/ui/app-nav-keywords.test.ts @@ -0,0 +1,247 @@ +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. + +/** + * #39052 — a navigation entry declares search aliases, `keywords: string[]`, + * and a translation bundle gives them per locale. + * + * Epic #39050 renames Setup pages, so a page must still be found by its old + * name. The protocol half is two optional keys: + * + * - `keywords` on the shared nav base, so the nine branches that spread it + * carry it; the separator spreads nothing and refuses it with its own + * prescription; + * - `keywords` on the translation bundle's navigation node, beside `label`, + * keyed by the same entry id — at both translation doors (the file bundle + * and the registered `translation` item share the shape). + * + * Unknown keys stay refused in both places, and the spellings an author is + * likely to reach for (`aliases`, `synonyms`) are pointed at `keywords`. The + * reader is the command palette card (#39055); the key is `planned` on + * `liveness/app.json` until it ships, which is pinned here too. + */ +import { describe, it, expect } from 'vitest'; +import { readFileSync } from 'node:fs'; +import { fileURLToPath } from 'node:url'; + +import { + AppSchema, + ObjectNavItemSchema, + DashboardNavItemSchema, + PageNavItemSchema, + UrlNavItemSchema, + ReportNavItemSchema, + ActionNavItemSchema, + ComponentNavItemSchema, + DocNavItemSchema, + GroupNavItemSchema, + NavigationContributionSchema, +} from './app.zod'; +import { TranslationDataSchema, TranslationItemSchema } from '../system/translation.zod'; + +type Branch = { safeParse: (v: unknown) => { success: boolean; data?: unknown; error?: unknown } }; + +/** Every variant that spreads the nav base, with the payload its `type` requires. */ +const BRANCHES: Array<[string, Branch, Record]> = [ + ['object', ObjectNavItemSchema, { type: 'object', objectName: 'sys_position' }], + ['dashboard', DashboardNavItemSchema, { type: 'dashboard', dashboardName: 'sales' }], + ['page', PageNavItemSchema, { type: 'page', pageName: 'home' }], + ['url', UrlNavItemSchema, { type: 'url', url: 'https://example.com' }], + ['report', ReportNavItemSchema, { type: 'report', reportName: 'pipeline' }], + ['action', ActionNavItemSchema, { type: 'action', actionDef: { actionName: 'run_it' } }], + ['component', ComponentNavItemSchema, { type: 'component', componentRef: 'metadata:resource' }], + ['doc', DocNavItemSchema, { type: 'doc', book: 'admin_guide', doc: 'getting_started' }], + ['group', GroupNavItemSchema, { type: 'group' }], +]; + +const BASE = { id: 'nav_position_members', label: 'Position Members' }; +const KEYWORDS = ['Position Holders', 'Assignments']; + +/** Refused at both doors: blank, untrimmed, a line break, over 60 characters, over 20 entries, not strings. */ +const REFUSED_KEYWORDS: unknown[] = [ + [''], ['ok', ''], [' '], [' Holders'], ['Holders '], ['Position\nHolders'], ['x'.repeat(61)], + Array.from({ length: 21 }, (_, i) => `word ${i}`), [42], 'Position Holders', +]; +/** Accepted at both doors: an inner space, CJK, and the two bounds exactly. */ +const ACCEPTED_KEYWORDS: unknown[] = [ + ['Position Holders'], ['岗位持有人'], ['x'.repeat(60)], Array.from({ length: 20 }, (_, i) => `word ${i}`), +]; + +const messagesOf = (r: { error?: unknown }): string => + JSON.stringify((r.error as { issues?: unknown })?.issues ?? []); + +const app = (navigation: unknown[]) => ({ name: 'probe_app', label: 'Probe', navigation }); + +describe('nav item `keywords` (#39052)', () => { + it.each(BRANCHES)('the `%s` branch accepts and keeps `keywords`', (_name, schema, payload) => { + const r = schema.safeParse({ ...BASE, ...payload, keywords: KEYWORDS }); + expect(r.success, messagesOf(r)).toBe(true); + expect((r.data as { keywords?: string[] }).keywords).toEqual(KEYWORDS); + }); + + it.each(BRANCHES)('the `%s` branch still parses without it (the key is optional)', (_name, schema, payload) => { + const r = schema.safeParse({ ...BASE, ...payload }); + expect(r.success, messagesOf(r)).toBe(true); + expect((r.data as { keywords?: string[] }).keywords).toBeUndefined(); + }); + + it('survives the real door, nested under a group', () => { + const r = AppSchema.safeParse(app([ + { + id: 'group_users_org', type: 'group', label: 'Users & Organization', keywords: ['People'], + children: [{ ...BASE, type: 'object', objectName: 'sys_position', keywords: KEYWORDS }], + }, + ])); + expect(r.success, messagesOf(r)).toBe(true); + const group = (r.data as { navigation: Array<{ keywords?: string[]; children: Array<{ keywords?: string[] }> }> }).navigation[0]; + expect(group.keywords).toEqual(['People']); + expect(group.children[0].keywords).toEqual(KEYWORDS); + }); + + it('is accepted on a navigation contribution item, the door #39057 writes Setup items through', () => { + const r = NavigationContributionSchema.safeParse({ + app: 'setup', + group: 'group_users_org', + items: [{ ...BASE, type: 'object', objectName: 'sys_position', keywords: KEYWORDS }], + }); + expect(r.success, messagesOf(r)).toBe(true); + }); + + it('refuses what is not one trimmed word or phrase, and more than the bounds (the dataset synonym rule)', () => { + for (const keywords of REFUSED_KEYWORDS) { + const r = ObjectNavItemSchema.safeParse({ ...BASE, type: 'object', objectName: 'sys_position', keywords }); + expect(r.success, JSON.stringify(keywords)).toBe(false); + } + }); + + it('accepts the bounds themselves: 60 characters, 20 keywords, an inner space', () => { + for (const keywords of ACCEPTED_KEYWORDS) { + const r = ObjectNavItemSchema.safeParse({ ...BASE, type: 'object', objectName: 'sys_position', keywords }); + expect(r.success, JSON.stringify(keywords)).toBe(true); + } + }); + + it('the refusal says what to write, with no issue id', () => { + const r = ObjectNavItemSchema.safeParse({ ...BASE, type: 'object', objectName: 'sys_position', keywords: [' Holders'] }); + const issues = messagesOf(r); + expect(issues).toContain('no leading or trailing whitespace'); + expect(issues).not.toMatch(/#\d+/); + }); + + it('the separator refuses it with its own prescription, not a rename', () => { + const r = AppSchema.safeParse(app([{ type: 'separator', keywords: KEYWORDS }])); + expect(r.success).toBe(false); + const issues = messagesOf(r); + expect(issues).toContain('`keywords` is not a separator key'); + }); + + it('CONTROL — an unknown key is still refused on the item', () => { + const r = ObjectNavItemSchema.safeParse({ ...BASE, type: 'object', objectName: 'sys_position', searchWords: KEYWORDS }); + expect(r.success).toBe(false); + expect(messagesOf(r)).toContain('searchWords'); + }); + + it.each(['aliases', 'synonyms', 'searchTerms', 'searchKeywords'])( + '`%s` is refused and pointed at `keywords` (every branch but `group` for `aliases`)', + (written) => { + for (const [name, schema, payload] of BRANCHES) { + if (written === 'aliases' && name === 'group') continue; + const r = schema.safeParse({ ...BASE, ...payload, [written]: KEYWORDS }); + expect(r.success).toBe(false); + expect(messagesOf(r)).toContain('→ `keywords`'); + } + }, + ); + + it('on a `group`, `aliases` names BOTH keys it can mean — `keywords` and `renamedFrom` — not a bare rename', () => { + // A group's retired ids are an alias map too (`renamedFrom`); a bare rename + // to `keywords` would parse clean and resolve nothing for that author. + const r = GroupNavItemSchema.safeParse({ ...BASE, type: 'group', aliases: ['group_people_org'] }); + expect(r.success).toBe(false); + const issues = messagesOf(r); + expect(issues).toContain('`keywords`'); + expect(issues).toContain('`renamedFrom`'); + expect(issues).not.toContain('→ `keywords`'); + // Both destinations really parse on a group. + expect(GroupNavItemSchema.safeParse({ ...BASE, type: 'group', keywords: ['People'] }).success).toBe(true); + expect(GroupNavItemSchema.safeParse({ ...BASE, type: 'group', renamedFrom: ['group_people_org'] }).success).toBe(true); + }); + + it('describes itself as planned until the palette reads it', () => { + const shape = (ObjectNavItemSchema as unknown as { shape: Record }).shape; + expect(shape.keywords.description).toMatch(/^\[PLANNED — not yet read\]/); + expect(shape.keywords.description).toContain('command palette'); + // Customer-facing prose carries no issue id (check:doc-authoring). + expect(shape.keywords.description).not.toMatch(/#\d+/); + }); +}); + +describe('translation bundle nav node `keywords` (#39052)', () => { + const bundleEntry = (node: Record) => ({ + apps: { setup: { navigation: { nav_position_members: node } } }, + }); + + it('the file bundle door accepts this locale\'s aliases beside the label', () => { + const r = TranslationDataSchema.safeParse(bundleEntry({ label: '岗位成员', keywords: ['岗位持有人'] })); + expect(r.success, messagesOf(r)).toBe(true); + // Read through the inferred type, so the key is pinned on `TranslationData` too. + expect(r.data?.apps?.setup?.navigation?.nav_position_members?.keywords).toEqual(['岗位持有人']); + }); + + it('the registered `translation` item door accepts it too (one shared shape)', () => { + const r = TranslationItemSchema.safeParse({ + name: 'zh_cn_setup', locale: 'zh-CN', + ...bundleEntry({ label: '业务单元', keywords: ['部门', '组织架构', '事业部'] }), + }); + expect(r.success, messagesOf(r)).toBe(true); + }); + + it('CONTROL — the node still owes its `label`', () => { + const r = TranslationDataSchema.safeParse(bundleEntry({ keywords: ['岗位持有人'] })); + expect(r.success).toBe(false); + }); + + it('CONTROL — an unknown key is still refused on the node', () => { + const r = TranslationDataSchema.safeParse(bundleEntry({ label: '岗位成员', hint: '旧名' })); + expect(r.success).toBe(false); + expect(messagesOf(r)).toContain('hint'); + }); + + it('judges every keyword exactly as the nav item does (one rule at both doors)', () => { + for (const keywords of [...REFUSED_KEYWORDS, ...ACCEPTED_KEYWORDS]) { + const item = ObjectNavItemSchema.safeParse({ ...BASE, type: 'object', objectName: 'sys_position', keywords }).success; + const node = TranslationDataSchema.safeParse(bundleEntry({ label: '岗位成员', keywords })).success; + expect(node, JSON.stringify(keywords)).toBe(item); + } + }); + + it.each(['aliases', 'synonyms'])('`%s` on the node is pointed at `keywords`', (written) => { + const r = TranslationDataSchema.safeParse(bundleEntry({ label: '岗位成员', [written]: ['岗位持有人'] })); + expect(r.success).toBe(false); + expect(messagesOf(r)).toContain('→ `keywords`'); + }); +}); + +describe('the liveness ledger names the reader (#39052)', () => { + const ledger = JSON.parse( + readFileSync(fileURLToPath(new URL('../../liveness/app.json', import.meta.url)), 'utf8'), + ) as { props: { navigation: { children: Record } } }; + const row = ledger.props.navigation.children.keywords; + + it('grades `navigation.children.keywords` planned, with the palette card as its consumer', () => { + expect(row.status).toBe('planned'); + expect(row.note).toContain('#39055'); + expect(row.note).toContain('CommandPalette.tsx'); + }); + + it('keeps authorWarn off: an unread alias costs a search hit, not a gate', () => { + expect(row.authorWarn).toBeUndefined(); + }); +}); + +describe('the contribution `group` example names a new Setup group id (ruling D1)', () => { + it('describes `group` with `group_integrations_dev`, not the retired `group_integrations`', () => { + const shape = (NavigationContributionSchema as unknown as { shape: Record }).shape; + expect(shape.group.description).toContain('"group_integrations_dev"'); + expect(shape.group.description).not.toMatch(/"group_integrations"/); + }); +}); diff --git a/packages/spec/src/ui/app.zod.ts b/packages/spec/src/ui/app.zod.ts index c81ac828c1c..7042eb1a697 100644 --- a/packages/spec/src/ui/app.zod.ts +++ b/packages/spec/src/ui/app.zod.ts @@ -69,6 +69,12 @@ const NAV_ITEM_ALIASES: Readonly> = { requiresobjects: 'requiresObject', badgecolor: 'badgeVariant', badgestyle: 'badgeVariant', + // `synonyms` is the dataset member's word for the same idea (ADR-0149 D1). + // `aliases` is NOT here: on a `group` it can also mean the retired group ids + // of `renamedFrom`, so it is assembled per variant in {@link navItemSurface}. + synonyms: 'keywords', + searchterms: 'keywords', + searchkeywords: 'keywords', }; /** @@ -161,7 +167,7 @@ const SEPARATOR_NAV_ITEM_ALIASES: Readonly> = { * of answering with one). */ const SEPARATOR_NAV_ITEM_GUIDANCE: Readonly> = Object.fromEntries( - ['label', 'title', 'icon', 'badge', 'badgeVariant', 'visible', 'dataSource', 'requiredPermissions', 'requiresObject', 'requiresService'] + ['label', 'title', 'keywords', 'icon', 'badge', 'badgeVariant', 'visible', 'dataSource', 'requiredPermissions', 'requiresObject', 'requiresService'] .map((key) => [ key, `\`${key}\` is not a separator key — a separator is a divider and declares only ` @@ -170,6 +176,46 @@ const SEPARATOR_NAV_ITEM_GUIDANCE: Readonly> = Object.fro ]), ); +/** + * What a `group` answers for `aliases`, which names two different keys there. + * + * Everywhere else `aliases` can only mean search words, so it is renamed to + * `keywords`. On a group it can also mean the retired group ids the group took + * over (`renamedFrom`, the old-to-new map a navigation contribution is folded + * through). A bare rename to `keywords` would parse clean and resolve nothing + * for the author who meant the second, so the prescription names both. + */ +const NAV_GROUP_ALIASES_GUIDANCE = + '`aliases` is not a navigation key. On a `group` it can mean two things: the words a person may type ' + + 'to find the group — write them in `keywords`; or the retired group ids this group took over, so a ' + + 'contribution still naming one lands here — write them in `renamedFrom`.'; + +/** + * The accept set of one search alias, shared by a nav item's `keywords` and a + * translation bundle node's `keywords` (`system/translation.zod.ts` restates + * the same three numbers and rule; `app-nav-keywords.test.ts` holds the two + * doors to the same verdicts). The rule is the dataset synonym's (ADR-0149 D1), + * the repo's precedent for match-input words: one word or short phrase as a + * person types it, refused rather than trimmed, so what is stored is what was + * written. + */ +const NAV_KEYWORD_MAX_LENGTH = 60; +const NAV_KEYWORDS_MAX = 20; +const NAV_KEYWORD_NOT_TRIMMED = + 'a navigation keyword is one word or phrase as a person types it in search: not empty, no leading or ' + + 'trailing whitespace, no line break. The schema refuses rather than trims it, so what is stored is ' + + 'what was written.'; +const navKeywordsSchema = () => z.array( + z.string() + .max(NAV_KEYWORD_MAX_LENGTH, { + error: () => `a navigation keyword is at most ${NAV_KEYWORD_MAX_LENGTH} characters — one word or short ` + + 'phrase a person would type to find the entry.', + }) + .regex(/^\S(?:.*\S)?$/u, { error: () => NAV_KEYWORD_NOT_TRIMMED }), +).max(NAV_KEYWORDS_MAX, { + error: () => `an entry takes at most ${NAV_KEYWORDS_MAX} keywords — keep the words people actually use for it.`, +}); + /** * Authoring-surface options for one nav-item variant. * @@ -223,6 +269,10 @@ const navItemSurface = (variant: NavItemVariant): StrictObjectOptions => ({ // "start expanded" is a sidebar-wide idea. It exists on `group` alone, so // only `group` may answer with the bare key name (#5555). ...(variant !== 'group' ? NAV_EXPANDED_ALIASES_ELSEWHERE : NAV_EXPANDED_ALIASES_ON_GROUP), + // `aliases` is a bare rename to `keywords` wherever it can mean only search + // words. A `group` answers it with a prescription instead (below), and a + // separator declares neither key. + ...(variant !== 'group' && variant !== 'separator' ? { aliases: 'keywords' } : {}), }, // The recursive `children` key, which lives on the UNION member rather than on // the branch — see {@link NAV_VARIANTS_ACCEPTING_CHILDREN}. Naming it keeps a @@ -244,6 +294,7 @@ const navItemSurface = (variant: NavItemVariant): StrictObjectOptions => ({ 'views). Nest entries under `{ type: \'group\', children: [...] }`.', }), ...(variant === 'separator' ? SEPARATOR_NAV_ITEM_GUIDANCE : {}), + ...(variant === 'group' ? { aliases: NAV_GROUP_ALIASES_GUIDANCE } : {}), }, history: 'Until this shape was closed these were dropped silently — the entry still parsed, so a mis-spelled ' + @@ -346,6 +397,40 @@ const BaseNavItemSchema = z.object({ + 'materialised for the absent case.', ), + /** + * Search aliases — other words a person may type to find this entry (#39052). + * + * A renamed page is still found by its old name, and a page is found by the + * words its users say for it (部门 / 组织架构 for 业务单元). Source-language + * strings, as authored; another locale's aliases come from the translation + * bundle entry `apps..navigation..keywords`, keyed by this entry's + * `id` like the label. Search only: never shown as the entry's text, never a + * route, never a gate. + * + * Named `keywords` and NOT `aliases`: across `packages/spec/src/ai/*.zod.ts` + * `aliases` is the retired-key rename map, so a nav key of that name would + * read as one. An author who reaches for `synonyms` is pointed here by + * {@link NAV_ITEM_ALIASES}, and for `aliases` by {@link navItemSurface} (on + * a `group`, a prescription naming both `keywords` and `renamedFrom`). + * + * ## Planned, not yet read + * + * No console reads it yet. Its reader is the command palette card (#39055), + * which matches a query against these words, resolved for the current + * locale, and shows 「原名 X」 when the match came through one. The liveness + * row is `liveness/app.json` → `navigation.children.keywords` (`planned`). + * When the palette ships, the `[PLANNED — not yet read]` marker leaves this + * describe and the row flips to `live`. + */ + keywords: navKeywordsSchema().optional().describe( + '[PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old ' + + 'name after a rename. Source-language strings as authored; another locale\'s aliases come from the ' + + "translation bundle entry `apps..navigation..keywords`, keyed by this entry's `id`. Search only: " + + 'never shown as the entry\'s text, never a route, never a gate. Each trimmed, non-empty, at most 60 ' + + 'characters; at most 20. The command palette is its reader; ' + + 'until it ships, nothing reads the key.', + ), + /** Icon name (Lucide) */ icon: z.string().optional().describe('Icon name'), @@ -1222,7 +1307,7 @@ export const NavigationItemSchema: z.ZodType strictObject( }, { app: SnakeCaseIdentifierSchema.describe('Target app name to contribute navigation into (e.g. "setup")'), - group: SnakeCaseIdentifierSchema.optional().describe('Target group nav-item id to append into (e.g. "group_integrations"); omit to append at the app top level. A retired id that a group of the target app lists in its `renamedFrom` lands in that group, with a `nav_contribution_group_renamed` warning naming the new id. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time.'), + group: SnakeCaseIdentifierSchema.optional().describe('Target group nav-item id to append into (e.g. "group_integrations_dev"); omit to append at the app top level. A retired id that a group of the target app lists in its `renamedFrom` lands in that group, with a `nav_contribution_group_renamed` warning naming the new id. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time.'), priority: z.number().int().min(0).default(200).describe('Merge priority within the target group — lower applied first (matches object extender priority)'), items: z.array(NavigationItemSchema).describe('Navigation items contributed into the target app/group'), }).describe('A navigation contribution: a package injecting nav items into an app it does not own (ADR-0029 D7)')); diff --git a/ui/packages/app-shell/src/views/metadata-admin/inspectors/nav-target.navEntryTypes-11790.test.ts b/ui/packages/app-shell/src/views/metadata-admin/inspectors/nav-target.navEntryTypes-11790.test.ts index c70fa82982d..516b3443799 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/inspectors/nav-target.navEntryTypes-11790.test.ts +++ b/ui/packages/app-shell/src/views/metadata-admin/inspectors/nav-target.navEntryTypes-11790.test.ts @@ -93,6 +93,7 @@ const SPEC_BASE_KEYS = SPEC_MEMBERS.filter((m) => m.type !== 'separator') const BASE_VALUES: Record = { id: 'nav_item_3', label: 'Tasks', + keywords: ['Todo list'], icon: 'list-checks', order: 3, badge: 'NEW', diff --git a/ui/packages/app-shell/src/views/metadata-admin/inspectors/nav-target.ts b/ui/packages/app-shell/src/views/metadata-admin/inspectors/nav-target.ts index 007881baa64..1adc3116a89 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/inspectors/nav-target.ts +++ b/ui/packages/app-shell/src/views/metadata-admin/inspectors/nav-target.ts @@ -64,6 +64,9 @@ export function isNavEntryType(value: unknown): value is NavigationItemType { const NAV_ENTRY_BASE_KEYS = [ 'id', 'label', + // The entry's search aliases (objectstack#39052): they describe the entry, + // not what it opens, so a change of type keeps them. + 'keywords', 'icon', 'order', 'badge', diff --git a/ui/packages/types/src/zod/app.zod.ts b/ui/packages/types/src/zod/app.zod.ts index 8ca145a5db1..0b85f8d0ad6 100644 --- a/ui/packages/types/src/zod/app.zod.ts +++ b/ui/packages/types/src/zod/app.zod.ts @@ -282,6 +282,14 @@ const NavigationItemObject = z.looseObject({ // below still refuses an empty STRING — the one stated divergence. label: stripImportedDefaults(SpecI18nLabelSchema).optional().describe("Display label: a plain string, or an inline locale map ({ en, 'zh-CN' }) rendered in the viewer's locale. Optional: absent ⇒ the entry inherits its target's current label at render time (view, else object / dashboard, else the target's machine name); present ⇒ rendered as authored. Never an empty string"), icon: z.string().optional().describe('Icon name (Lucide)'), + // Declared for the reason `runAction` is (objectstack#4115): this schema + // strips unknown keys, so an entry's search aliases would have validated + // clean here and been thrown away. Spec: the nav base's `keywords` + // (objectstack#39052), read by the command palette (objectstack#39055); + // nothing in objectui reads it yet. The spec's accept set, restated (each + // trimmed, non-empty, at most 60 characters; at most 20), so `objectui + // validate` refuses what the platform's save door refuses. + keywords: z.array(z.string().max(60).regex(/^\S(?:.*\S)?$/u)).max(20).optional().describe('Search aliases: other words a person may type to find this entry, such as its old name after a rename (spec field name)'), // Type-specific target fields objectName: z.string().optional().describe('Target object name (type: object)'),