diff --git a/.changeset/39055-palette-nav-keywords.md b/.changeset/39055-palette-nav-keywords.md new file mode 100644 index 00000000000..cfd52b9c9f5 --- /dev/null +++ b/.changeset/39055-palette-nav-keywords.md @@ -0,0 +1,20 @@ +--- +'@objectstack/spec': patch +'@object-ui/app-shell': patch +'@object-ui/i18n': patch +--- + +feat(app-shell): the command palette finds a navigation entry by its old name or another alias, and shows each navigation result under its group path + +Clause-②: yes (widening) +Metadata-protocol: none + +A navigation entry's `keywords` now have their reader. + +- **The served app carries each entry's aliases for the reader's locale.** `translateApp` gives every navigation node its own source-language `keywords` plus the reader's locale's `apps..navigation..keywords` from the translation bundle (the first locale along the chain that lists any), each word once. A locale's words add to the source words; they never replace them. So an English alias still finds the entry in a Chinese session, and a Chinese-only alias finds it there and not in English. A node whose bundle lists no keywords is served as before. +- **The ⌘K palette matches navigation entries on their `keywords`** as well as on their label and machine name, under the same word-prefix and substring rule. When only an alias found the entry, the row shows it after the entry's name: 「原名 岗位持有人」 in Chinese, "Formerly Position Holders" in English (a new `console.commandPalette.formerName` string in every console locale). A group's label and `keywords` find the visible entries under it, so a renamed group is still found by its old name, and each of its entries shows the group's matched alias. An entry found through an alias counts as found, so the palette does not offer to create a record from those words. `action` and `doc` entries accept `keywords`, but nothing reads them yet. +- **Every navigation result shows its group path** before its name, 「人员与组织 › 业务单元」, nested groups outermost first; an entry at the top level of the menu shows its name alone. + +The key's liveness row (`navigation.children.keywords`) is now `live`, and its describe no longer carries the `[PLANNED — not yet read]` marker. + +No action needed for existing metadata. diff --git a/content/docs/references/ui/app.mdx b/content/docs/references/ui/app.mdx index f5c41779950..a7de43ad952 100644 --- a/content/docs/references/ui/app.mdx +++ b/content/docs/references/ui/app.mdx @@ -30,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -107,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -132,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -151,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -171,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -191,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -210,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -229,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -251,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -279,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -399,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -432,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -466,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -499,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -542,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -567,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -586,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -606,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -645,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -664,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -686,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -714,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -751,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -776,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -795,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -815,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -835,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -854,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -873,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -895,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -923,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -957,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -996,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -1029,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -1063,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -1097,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -1130,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -1170,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -1206,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -1254,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -1290,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -1327,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -1360,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 | @@ -1392,7 +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. | +| **keywords** | `string[]` | optional | 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 reads it on object, dashboard, page, report, component and url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, but nothing reads it there yet. | | **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 9e0d026d0c1..2bc2aa98fab 100644 --- a/content/docs/ui/apps.mdx +++ b/content/docs/ui/apps.mdx @@ -293,7 +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) | +| `keywords` | `string[]` | Search aliases, such as a page's old name after a rename; the command palette matches 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 | @@ -313,9 +313,15 @@ console's own name for the index. A `label` you write renders verbatim; never wr 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`. +name after a rename; they never gate anything, and a translation bundle gives each +locale its own under `apps..navigation..keywords`, beside that entry's +`label`. A locale's words add to the entry's own, never replace them, so a word +written in the source language finds the entry in every language. The ⌘K command +palette finds an `object`, `dashboard`, `page`, `report`, `component` or `url` entry +by any of them, and when only one of these words matched it shows that word beside +the entry ("Formerly …"). A `group`'s label and `keywords` find the entries under +it, so a renamed group is still found by its old name. An `action` or `doc` entry +accepts `keywords`, but nothing reads them there yet. ## Designing the navigation diff --git a/packages/spec/liveness/app.json b/packages/spec/liveness/app.json index bc8507cd007..4853ce141ed 100644 --- a/packages/spec/liveness/app.json +++ b/packages/spec/liveness/app.json @@ -99,10 +99,11 @@ "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", + "status": "live", "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." + "evidenceScope": "in-repo", + "evidence": "packages/spec/src/system/i18n-resolver.ts#translateApp (serves each node's match set for the reader's locale: its own `keywords` plus the first `apps..navigation..keywords` along the locale chain); packages/spec/src/system/i18n-nav-keywords.ts#mergeNavKeywords (the add rule: source words first, the locale's words added, each once); ui/packages/app-shell/src/chrome/CommandPalette.tsx#CommandPalette (matches the six navigation entry kinds it offers, `object`, `dashboard`, `page`, `report`, `component` and `url`, on label, machine name and `keywords`, plus the label and `keywords` of each group above an entry, and shows the alias that found it); ui/packages/app-shell/src/chrome/paletteNavKeywords.ts#paletteKeywordHit (a keyword is tried only when the label and machine name miss, so the hint names the alias that found the entry); ui/packages/app-shell/src/chrome/paletteNavKeywords.ts#paletteNavEntryHit (a `group`'s label or `keywords` find the visible entries under it, the group keyword named when only it matched)", + "note": "LIVE (#39055): search aliases on a navigation entry, `keywords: string[]`, declared on the shared nav base (#39052; 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`. A locale's list ADDS to the source list, never replaces it (seat ruling 7347779833 (a), after ADR-0149 D1): `translateApp` merges the two at the /meta boundary, so the console reads one list and resolves no bundle itself. The command palette finds an `object`, `dashboard`, `page`, `report`, `component` or `url` entry by any of them and, when only an alias matched, shows 「原名 X」 beside the entry. A `group`'s keywords (a renamed group's old name) find the visible entries under it, each with the hint. An `action` or `doc` entry accepts the key (it is on the shared nav base) but NOTHING READS IT there yet (#39168); the grade is `live` because the six kinds and groups are read. `authorWarn` stays OFF: the key now has its reader, and an author is never warned for writing it." }, "icon": { "status": "live", diff --git a/packages/spec/liveness/state-counts/app.md b/packages/spec/liveness/state-counts/app.md index d60849a00c0..8eea589f5fb 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 | 7 | 60 | +| `app` | 54 | 0 | 0 | 0 | 6 | 60 | diff --git a/packages/spec/liveness/translation.json b/packages/spec/liveness/translation.json index fbf45a5f124..f1cf152ba91 100644 --- a/packages/spec/liveness/translation.json +++ b/packages/spec/liveness/translation.json @@ -53,8 +53,8 @@ "apps": { "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. 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." + "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`); packages/spec/src/system/i18n-nav-keywords.ts#mergeNavKeywords (`apps..navigation..keywords`, added to the node's own keywords)", + "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 and inherits this row's `live` verdict. 2026-12-02 (#39055): it is READ — `translateApp` serves each node's own `keywords` plus the first locale list along the chain (`i18n-nav-keywords.ts#mergeNavKeywords`; a locale's list ADDS to the source list, never replaces it, seat ruling 7347779833 (a)), and the console command palette matches the served list; the nav item's own key is graded `live` on app.json's `navigation.children.keywords`, which carries the record." }, "messages": { "status": "live", diff --git a/packages/spec/src/system/i18n-nav-keywords.ts b/packages/spec/src/system/i18n-nav-keywords.ts new file mode 100644 index 00000000000..dc922afaf6e --- /dev/null +++ b/packages/spec/src/system/i18n-nav-keywords.ts @@ -0,0 +1,49 @@ +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. + +/** + * A navigation entry's search aliases for the reader's locale — the add rule + * (#39055, seat ruling 7347779833 (a), following ADR-0149 D1). + * + * An entry's `keywords` (`ui/app.zod.ts`) are source-language words, as + * authored. A translation bundle node `apps..navigation..keywords` + * gives one locale's own. The match set for the entry is the source list PLUS + * the current locale's list: a locale's words never replace the source words, + * so an English source alias still finds the entry in a zh session, and a + * zh-only alias joins it there and nowhere else. + * + * "The current locale's list" is the first list found along the locale chain, + * the same rung order a translated label takes ({@link translateApp} walks + * the chain and stops at the first locale that answers). + * + * Bundle keywords are not translations of the source list — they are further + * words for the same entry — so ADR-0146 D2's changed/unchanged question, + * which picks the catalog a TRANSLATED string is read from, does not drop + * them when an override changes the source list: they are read from the + * unchanged catalog (the override pair's, then the deployment's, locale by + * locale), and the override's own list is always the source half. + * + * Internal to `@objectstack/spec`: {@link translateApp} is the one caller. + */ + +/** The non-empty strings of an authored or bundled `keywords` value, or `undefined` when it holds none. */ +function keywordList(value: unknown): string[] | undefined { + if (!Array.isArray(value)) return undefined; + const words = value.filter((word): word is string => typeof word === 'string' && word.length > 0); + return words.length > 0 ? words : undefined; +} + +/** + * The entry's merged `keywords`: `source` first, then the first non-empty + * list among `localeNodes` (the bundle's nav nodes for this entry, one per + * locale of the chain, in chain order), each word once. `undefined` when the + * bundle adds nothing, so the caller leaves the node's own key as it is. + */ +export function mergeNavKeywords(source: unknown, localeNodes: Iterable): string[] | undefined { + let added: string[] | undefined; + for (const node of localeNodes) { + added = node !== null && typeof node === 'object' ? keywordList((node as { keywords?: unknown }).keywords) : undefined; + if (added) break; + } + if (!added) return undefined; + return [...new Set([...(keywordList(source) ?? []), ...added])]; +} diff --git a/packages/spec/src/system/i18n-resolver.nav-keywords.test.ts b/packages/spec/src/system/i18n-resolver.nav-keywords.test.ts new file mode 100644 index 00000000000..61e674811dd --- /dev/null +++ b/packages/spec/src/system/i18n-resolver.nav-keywords.test.ts @@ -0,0 +1,92 @@ +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. + +/** + * Pin: `translateApp` serves a navigation entry's search aliases for the + * reader's locale under the add rule (#39055, seat ruling 7347779833 (a), + * after ADR-0149 D1): the entry's own source-language `keywords` PLUS the + * locale's bundle `apps..navigation..keywords`, never one in place + * of the other. The command palette reads the merged list off the served app + * and resolves no bundle itself. + */ +import { describe, it, expect } from 'vitest'; +import { translateApp } from './i18n-resolver'; +import type { TranslationBundle } from './translation.zod'; + +const app = { + name: 'setup_39055', + label: 'Setup', + navigation: [ + { + id: 'group_people_org', + type: 'group', + label: 'People & Organization', + children: [ + { id: 'nav_position_members', type: 'object', objectName: 'sys_position_member', label: 'Position Members', keywords: ['Position Holders'] }, + { id: 'nav_business_units', type: 'object', objectName: 'sys_business_unit', label: 'Business Units' }, + ], + }, + ], +}; + +const bundle: TranslationBundle = { + 'zh-CN': { + apps: { + setup_39055: { + navigation: { + group_people_org: { label: '人员与组织' }, + nav_position_members: { label: '岗位成员', keywords: ['岗位持有人', 'Position Holders'] }, + nav_business_units: { label: '业务单元', keywords: ['部门', '组织架构'] }, + }, + }, + }, + }, + en: { + apps: { + setup_39055: { + navigation: { + nav_position_members: { label: 'Position Members' }, + }, + }, + }, + }, +}; + +const leaf = (out: typeof app, index: number) => out.navigation[0].children[index] as { label: string; keywords?: string[] }; + +describe('translateApp — a nav entry\'s keywords follow the locale under the add rule (#39055)', () => { + it('zh-CN: the locale\'s words are added after the source words, each once', () => { + const out = translateApp(app, bundle, { locale: 'zh-CN' }); + expect(leaf(out, 0).label).toBe('岗位成员'); + expect(leaf(out, 0).keywords).toEqual(['Position Holders', '岗位持有人']); + }); + + it('zh-CN: an entry with no source words gets the locale\'s words', () => { + const out = translateApp(app, bundle, { locale: 'zh-CN' }); + expect(leaf(out, 1).keywords).toEqual(['部门', '组织架构']); + }); + + it('en: a zh-only word is not served; the source words stay as authored', () => { + const out = translateApp(app, bundle, { locale: 'en' }); + expect(leaf(out, 0).keywords).toEqual(['Position Holders']); + expect(leaf(out, 1).keywords).toBeUndefined(); + }); + + it('the first locale along the chain that lists words is the one added', () => { + const out = translateApp(app, bundle, { locale: 'fr', fallbackChain: ['zh-CN'] }); + expect(leaf(out, 1).keywords).toEqual(['部门', '组织架构']); + }); + + it('a group node takes keywords the same way', () => { + const withGroupWords: TranslationBundle = { + 'zh-CN': { apps: { setup_39055: { navigation: { group_people_org: { label: '人员与组织', keywords: ['组织'] } } } } }, + }; + const out = translateApp(app, withGroupWords, { locale: 'zh-CN' }); + expect((out.navigation[0] as { keywords?: string[] }).keywords).toEqual(['组织']); + }); + + it('does not mutate the input app', () => { + const snapshot = JSON.parse(JSON.stringify(app)); + translateApp(app, bundle, { locale: 'zh-CN' }); + expect(app).toEqual(snapshot); + }); +}); diff --git a/packages/spec/src/system/i18n-resolver.ts b/packages/spec/src/system/i18n-resolver.ts index 96c17d7d372..712b7adecac 100644 --- a/packages/spec/src/system/i18n-resolver.ts +++ b/packages/spec/src/system/i18n-resolver.ts @@ -92,6 +92,7 @@ import { flowScreenFieldOptionKey } from '../automation/flow-screen-option-key.j import { pageComponentSlotPositions } from '../ui/component.zod.js'; import { templateSlotSource } from '../automation/flow-text-slot-template.js'; import { PLATFORM_LOCALE_TAGS, platformLocaleTagOf } from './platform-locales.js'; +import { mergeNavKeywords } from './i18n-nav-keywords.js'; import type { PlatformTranslationBundle, @@ -2205,6 +2206,13 @@ function packagedNavNodes(base: Record | undefined): (id: strin * reads only the pair's translations and otherwise keeps its own text; a * string it left alone takes the pair's translation, then the base's. No base * supplied: the catalog applies to every string, as before. + * + * ## A navigation node's `keywords` — the add rule + * + * A node's search aliases are its own source-language `keywords` plus the + * reader's locale's `apps..navigation..keywords`, never one in place + * of the other ({@link mergeNavKeywords}), so the served app already carries + * the match set the command palette reads. */ export function translateApp( doc: T, @@ -2232,6 +2240,12 @@ export function translateApp( const changed = valueOverridesPackagedBase(packagedNode(node.id), 'label', node.label); const translated = lookupNavLabel(catalogFor(catalogs, changed), appName, node.id, opts); if (translated) next.label = translated; + const navId = node.id; + const keywords = mergeNavKeywords( + node.keywords, + localeChain(opts).map((code) => pickData(catalogs.unchanged, code)?.apps?.[appName]?.navigation?.[navId]), + ); + if (keywords) next.keywords = keywords; } if (Array.isArray(node.children)) { next.children = node.children.map(translateNav); diff --git a/packages/spec/src/system/translation.zod.ts b/packages/spec/src/system/translation.zod.ts index c42579ecb81..d7e1972695e 100644 --- a/packages/spec/src/system/translation.zod.ts +++ b/packages/spec/src/system/translation.zod.ts @@ -1366,10 +1366,12 @@ const appTranslationDataShape = () => ({ * 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. + * aliases follow the current locale. A locale's list ADDS to the + * entry's source-language `keywords`, never replaces them (seat ruling + * 7347779833 (a), #39055): `translateApp` serves the entry with its own + * words plus the first list found along the locale chain + * (`i18n-nav-keywords.ts` `mergeNavKeywords`), and the command palette + * matches the served list. */ keywords: z.array( z.string() @@ -1381,9 +1383,10 @@ const appTranslationDataShape = () => ({ }), ).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 ' + '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.', + + 'characters; at most 20. They add to the entry\'s own keywords, never replace them; the command ' + + 'palette matches both.', ), })).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 index 6c67df925be..d215215dee4 100644 --- a/packages/spec/src/ui/app-nav-keywords.test.ts +++ b/packages/spec/src/ui/app-nav-keywords.test.ts @@ -16,8 +16,8 @@ * * 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. + * reader is the command palette (#39055); the key is `live` on + * `liveness/app.json`, which is pinned here too. */ import { describe, it, expect } from 'vitest'; import { readFileSync } from 'node:fs'; @@ -166,9 +166,9 @@ describe('nav item `keywords` (#39052)', () => { expect(GroupNavItemSchema.safeParse({ ...BASE, type: 'group', renamedFrom: ['group_people_org'] }).success).toBe(true); }); - it('describes itself as planned until the palette reads it', () => { + it('describes itself as read by the palette, with no planned marker (#39055)', () => { const shape = (ObjectNavItemSchema as unknown as { shape: Record }).shape; - expect(shape.keywords.description).toMatch(/^\[PLANNED — not yet read\]/); + expect(shape.keywords.description).not.toMatch(/PLANNED/); expect(shape.keywords.description).toContain('command palette'); // Customer-facing prose carries no issue id (check:doc-authoring). expect(shape.keywords.description).not.toMatch(/#\d+/); @@ -221,19 +221,19 @@ describe('translation bundle nav node `keywords` (#39052)', () => { }); }); -describe('the liveness ledger names the reader (#39052)', () => { +describe('the liveness ledger names the reader (#39052, #39055)', () => { const ledger = JSON.parse( readFileSync(fileURLToPath(new URL('../../liveness/app.json', import.meta.url)), 'utf8'), - ) as { props: { navigation: { children: Record } } }; + ) 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('grades `navigation.children.keywords` live, citing translateApp and the palette as its readers', () => { + expect(row.status).toBe('live'); + expect(row.evidence).toContain('i18n-resolver.ts#translateApp'); + expect(row.evidence).toContain('CommandPalette.tsx'); }); - it('keeps authorWarn off: an unread alias costs a search hit, not a gate', () => { + it('keeps authorWarn off: writing an alias is never warned', () => { expect(row.authorWarn).toBeUndefined(); }); }); diff --git a/packages/spec/src/ui/app.zod.ts b/packages/spec/src/ui/app.zod.ts index 7042eb1a697..be9347f0858 100644 --- a/packages/spec/src/ui/app.zod.ts +++ b/packages/spec/src/ui/app.zod.ts @@ -413,22 +413,29 @@ const BaseNavItemSchema = z.object({ * {@link NAV_ITEM_ALIASES}, and for `aliases` by {@link navItemSurface} (on * a `group`, a prescription naming both `keywords` and `renamedFrom`). * - * ## Planned, not yet read + * ## Read by the command palette * - * 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`. + * `translateApp` serves the entry's match set for the reader's locale: these + * source words plus that locale's bundle `keywords`, never one in place of + * the other (the add rule, #39055). The console's command palette matches a + * query against them as well as the label and machine name, and shows + * 「原名 X」 when the match came only through one. The liveness row is + * `liveness/app.json` → `navigation.children.keywords` (`live`). + * + * Read on the six kinds the palette offers: `object`, `dashboard`, `page`, + * `report`, `component` and `url`; and on a `group`, whose keywords (a + * renamed group's old name) find the visible entries under it. An `action` + * or `doc` entry accepts the key (it sits on the shared base) but nothing + * reads it there yet (#39168). */ keywords: navKeywordsSchema().optional().describe( - '[PLANNED — not yet read] Search aliases: other words a person may type to find this entry, such as its old ' + '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.', + + 'characters; at most 20. The command palette reads it on object, dashboard, page, report, component and ' + + 'url entries, and on a group, whose keywords find the entries under it; an action or doc entry accepts it, ' + + 'but nothing reads it there yet.', ), /** Icon name (Lucide) */ diff --git a/ui/packages/app-shell/src/chrome/CommandPalette.navKeywords-39055.test.tsx b/ui/packages/app-shell/src/chrome/CommandPalette.navKeywords-39055.test.tsx new file mode 100644 index 00000000000..77126a6fdf0 --- /dev/null +++ b/ui/packages/app-shell/src/chrome/CommandPalette.navKeywords-39055.test.tsx @@ -0,0 +1,317 @@ +/** + * ObjectUI + * Copyright (c) 2024-present ObjectStack Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** + * The ⌘K palette finds a navigation entry by its old name or another alias, + * and shows every navigation result under its group path (objectstack#39055). + * + * A navigation entry declares `keywords`, source-language words; a translation + * bundle adds a locale's own at `apps.APP.navigation.ID.keywords`. The served + * app carries the two merged for the viewer's locale (`translateApp`, the add + * rule: a locale's words add to the source words, never replace them), so the + * fixture app here is put through the real `translateApp` once per locale, + * exactly as the `/meta` boundary serves it. A hit that came only through a + * keyword shows that keyword (「原名 X」); every navigation result shows the + * groups it sits in before it (「分组 › 页面」). + * + * Fixture apps only: Setup's own navigation data and locale packs are another + * card's. + */ + +import * as React from 'react'; +import { describe, it, expect, vi, afterEach } from 'vitest'; +import { render, fireEvent, cleanup, act } from '@testing-library/react'; +import { MemoryRouter } from 'react-router-dom'; +import { createI18n, I18nProvider } from '@object-ui/i18n'; +import { translateApp, type TranslationBundle } from '@objectstack/spec/system'; + +vi.mock('@object-ui/auth', async (importOriginal) => ({ + ...(await importOriginal>()), + useAuth: () => ({ user: { id: 'u1' }, activeOrganization: null }), +})); + +/** The member holds every permission but `denied_39055`. */ +const PERMS = { + isLoaded: true, + can: (subject: string) => subject !== 'denied_39055', + cannot: (subject: string) => subject === 'denied_39055', + check: () => ({ allowed: true }), + checkField: () => true, + getFieldPermissions: () => [], + getRowFilter: () => undefined, + getObjectApiOperations: () => undefined, + roles: [], + userId: 'u1', + systemPermissions: undefined, + hasCapabilities: (perms: string[]) => !perms.includes('denied_39055'), + hasAnyQueue: undefined, + objectsUsingQueues: undefined, +}; +vi.mock('@object-ui/permissions', async (importOriginal) => ({ + ...(await importOriginal>()), + usePermissions: () => PERMS, +})); + +// The record preview's key fields draw through `lazy()`: load the detail entry +// at module scope, so its cost is paid at import (ui/AGENTS.md, lazy boundaries). +import '@object-ui/plugin-detail'; + +import { CommandPalette } from './CommandPalette'; +import { CommandPaletteProvider } from '../context/CommandPaletteProvider'; + +/** The app as authored, in its source language (English), with source-language keywords. */ +const SOURCE_APP = { + name: 'admin_39055', + label: 'Admin', + navigation: [ + { id: 'nav_home', type: 'page', pageName: 'admin_home', label: 'Home' }, + { + id: 'group_people_org', + type: 'group', + label: 'People & Organization', + children: [ + { + id: 'nav_position_members', + type: 'object', + objectName: 'sys_position_member', + label: 'Position Members', + keywords: ['Position Holders'], + }, + { id: 'nav_business_units', type: 'object', objectName: 'sys_business_unit', label: 'Business Units' }, + { + id: 'group_people_more', + type: 'group', + label: 'More', + children: [{ id: 'nav_org_chart', type: 'component', componentRef: 'org:chart', label: 'Org Chart' }], + }, + ], + }, + { + id: 'group_configuration', + type: 'group', + label: 'Configuration', + children: [ + { id: 'nav_settings_mail', type: 'url', label: 'Mail Delivery', url: '/apps/admin_39055/system/settings/mail' }, + ], + }, + { + // A renamed group: its old name is a keyword of the group itself. + id: 'group_operations', + type: 'group', + label: 'Operations', + keywords: ['旧组名'], + children: [ + { id: 'nav_jobs', type: 'url', label: 'Jobs', url: '/apps/admin_39055/system/jobs' }, + { id: 'nav_queues', type: 'url', label: 'Queues', url: '/apps/admin_39055/system/queues' }, + // A permission the member lacks: the sidebar hides it, so the group's keyword does not find it. + { id: 'nav_secret_ops', type: 'url', label: 'Secret Ops', url: '/apps/admin_39055/system/secret', requiredPermissions: ['denied_39055'] }, + ], + }, + ], +}; + +/** The zh-CN bundle: labels, and this locale's own aliases. */ +const BUNDLE: TranslationBundle = { + 'zh-CN': { + apps: { + admin_39055: { + navigation: { + nav_home: { label: '首页' }, + group_people_org: { label: '人员与组织' }, + nav_position_members: { label: '岗位成员', keywords: ['岗位持有人'] }, + nav_business_units: { label: '业务单元', keywords: ['部门', '组织架构'] }, + group_people_more: { label: '更多' }, + nav_org_chart: { label: '组织图' }, + group_configuration: { label: '配置' }, + nav_settings_mail: { label: '邮件投递' }, + group_operations: { label: '运维' }, + nav_jobs: { label: '作业' }, + nav_queues: { label: '队列' }, + nav_secret_ops: { label: '运维密钥' }, + }, + }, + }, + }, +}; + +const OBJECTS = [ + { name: 'sys_position_member', label: '岗位成员' }, + { name: 'sys_business_unit', label: '业务单元', nameField: 'name', fields: { name: { type: 'text', label: 'Name' } } }, +]; + +type Locale = 'zh-CN' | 'en'; + +function mount(locale: Locale, query: string, path = '/apps/admin_39055/page/admin_home') { + const app = translateApp(SOURCE_APP, BUNDLE, { locale, defaultLocale: 'en' }); + const language = locale === 'zh-CN' ? 'zh' : 'en'; + render( + + + + {}} /> + + + , + ); + const input = document.querySelector('[cmdk-input]') as HTMLInputElement | null; + if (!input) throw new Error('the palette did not open'); + if (query) fireEvent.change(input, { target: { value: query } }); + return input; +} + +const NAV_KINDS = ['object', 'dashboard', 'page', 'report', 'component', 'url']; + +/** Every navigation entry the palette rendered: its path text, and the keyword hint it shows, if any. */ +function navEntries(): Array<{ path: string; keyword?: string }> { + return Array.from(document.querySelectorAll('[cmdk-item]')) + .filter((el) => NAV_KINDS.some((kind) => (el.getAttribute('data-value') ?? '').startsWith(`${kind} `))) + .map((el) => { + const path = (el.querySelector('[data-testid="palette-nav-entry-path"]')?.textContent ?? '').trim(); + const keyword = el.querySelector('[data-testid="palette-nav-entry-keyword"]')?.textContent?.trim(); + return keyword === undefined ? { path } : { path, keyword }; + }); +} + +afterEach(() => { + cleanup(); + vi.restoreAllMocks(); +}); + +describe('objectstack#39055 — a navigation entry is found by its old name', () => { + it('zh-CN: 岗位持有人 finds 岗位成员 and shows 「原名 岗位持有人」', () => { + mount('zh-CN', '岗位持有人'); + expect(navEntries()).toEqual([{ path: '人员与组织 › 岗位成员', keyword: '原名 岗位持有人' }]); + }); + + it('zh-CN: 部门 finds 业务单元', () => { + mount('zh-CN', '部门'); + expect(navEntries()).toEqual([{ path: '人员与组织 › 业务单元', keyword: '原名 部门' }]); + }); + + it('a hit through the entry\'s own label names no keyword: 岗位 finds 岗位成员 by its label', () => { + mount('zh-CN', '岗位'); + expect(navEntries()).toEqual([{ path: '人员与组织 › 岗位成员' }]); + }); + + it('CONTROL: a word that is neither a label nor a keyword finds no entry', () => { + mount('zh-CN', '薪资'); + expect(navEntries()).toEqual([]); + }); +}); + +describe('objectstack#39055 — aliases follow the current locale under the add rule', () => { + it('a zh keyword matches in zh', () => { + mount('zh-CN', '组织架构'); + expect(navEntries()).toEqual([{ path: '人员与组织 › 业务单元', keyword: '原名 组织架构' }]); + }); + + it('a source keyword matches in zh and in en', () => { + mount('zh-CN', 'position holders'); + expect(navEntries()).toEqual([{ path: '人员与组织 › 岗位成员', keyword: '原名 Position Holders' }]); + cleanup(); + + mount('en', 'position holders'); + expect(navEntries()).toEqual([{ path: 'People & Organization › Position Members', keyword: 'Formerly Position Holders' }]); + }); + + it('a zh-only keyword does not match in en', () => { + mount('en', '岗位持有人'); + expect(navEntries()).toEqual([]); + cleanup(); + + mount('en', '部门'); + expect(navEntries()).toEqual([]); + }); +}); + +describe('objectstack#39055 — every navigation result shows its group path', () => { + it('each entry under its groups, outermost first; a top-level entry under none', () => { + // `m` starts "Members", "Mail" and the group "More", whose entry it lists. + mount('en', 'm'); + expect(navEntries()).toEqual([ + { path: 'People & Organization › Position Members' }, + { path: 'People & Organization › More › Org Chart' }, + { path: 'Configuration › Mail Delivery' }, + ]); + cleanup(); + + mount('en', 'org chart'); + expect(navEntries()).toEqual([{ path: 'People & Organization › More › Org Chart' }]); + cleanup(); + + mount('en', 'home'); + expect(navEntries()).toEqual([{ path: 'Home' }]); + }); + + it('zh-CN: the group path is in the reader\'s language too', () => { + mount('zh-CN', '邮件'); + expect(navEntries()).toEqual([{ path: '配置 › 邮件投递' }]); + cleanup(); + + mount('zh-CN', '组织图'); + expect(navEntries()).toEqual([{ path: '人员与组织 › 更多 › 组织图' }]); + }); +}); + +describe('objectstack#39055 — a keyword hit is an entry found, so it asks for no record', () => { + const settle = () => + act(async () => { + await new Promise((resolve) => setTimeout(resolve, 300)); + }); + const createRows = () => + Array.from(document.querySelectorAll('[cmdk-item]')) + .filter((el) => (el.getAttribute('data-value') ?? '').startsWith('create ')) + .map((el) => (el.textContent ?? '').trim()); + + it('on an object\'s page, 部门 finds 业务单元 and offers no "create as" row', async () => { + mount('zh-CN', '部门', '/apps/admin_39055/sys_business_unit'); + await settle(); + expect(navEntries()).toEqual([{ path: '人员与组织 › 业务单元', keyword: '原名 部门' }]); + expect(createRows()).toEqual([]); + }); + + it('CONTROL: words that find nothing are still offered as a record of the page\'s object', async () => { + mount('zh-CN', '华东区', '/apps/admin_39055/sys_business_unit'); + await settle(); + expect(createRows()).toEqual(['新建「华东区」为业务单元']); + }); +}); + +describe('objectstack#39055 — a group\'s keywords (its old name) find the entries under it', () => { + it('zh-CN: 旧组名 lists the group\'s two visible entries, each naming the group keyword that found it', () => { + mount('zh-CN', '旧组名'); + expect(navEntries()).toEqual([ + { path: '运维 › 作业', keyword: '原名 旧组名' }, + { path: '运维 › 队列', keyword: '原名 旧组名' }, + ]); + }); + + it('en: the same source keyword finds them in en too', () => { + mount('en', '旧组名'); + expect(navEntries()).toEqual([ + { path: 'Operations › Jobs', keyword: 'Formerly 旧组名' }, + { path: 'Operations › Queues', keyword: 'Formerly 旧组名' }, + ]); + }); + + it('the group\'s label finds them with no keyword named; an entry hidden from the member is not listed', () => { + mount('zh-CN', '运维'); + expect(navEntries()).toEqual([{ path: '运维 › 作业' }, { path: '运维 › 队列' }]); + }); + + it('a group-keyword hit is entries found, so it asks for no record', async () => { + mount('zh-CN', '旧组名', '/apps/admin_39055/sys_business_unit'); + await act(async () => { + await new Promise((resolve) => setTimeout(resolve, 300)); + }); + const createRows = Array.from(document.querySelectorAll('[cmdk-item]')).filter((el) => + (el.getAttribute('data-value') ?? '').startsWith('create '), + ); + expect(createRows).toEqual([]); + }); +}); diff --git a/ui/packages/app-shell/src/chrome/CommandPalette.navMatch-11812.test.tsx b/ui/packages/app-shell/src/chrome/CommandPalette.navMatch-11812.test.tsx index 4a220cbd51f..8c1d74bd006 100644 --- a/ui/packages/app-shell/src/chrome/CommandPalette.navMatch-11812.test.tsx +++ b/ui/packages/app-shell/src/chrome/CommandPalette.navMatch-11812.test.tsx @@ -45,6 +45,10 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({ useAuth: () => ({ user: { id: 'u1' }, activeOrganization: null }), })); +// The record preview's key fields draw through `lazy()`: load the detail entry +// at module scope, so its cost is paid at import (ui/AGENTS.md, lazy boundaries). +import '@object-ui/plugin-detail'; + import { CommandPalette } from './CommandPalette'; import { CommandPaletteProvider } from '../context/CommandPaletteProvider'; @@ -178,19 +182,19 @@ describe('objectui#11812 — the ⌘K palette matches navigation entries on word it('a word prefix, a mid-word substring and a Han substring each show their entry', () => { mount('field'); - expect(entries()).toEqual(['Field Zoo']); + expect(entries()).toEqual(['Data Model › Field Zoo']); cleanup(); mount('view'); - expect(entries()).toEqual(['Task Overview']); + expect(entries()).toEqual(['Analytics › Task Overview']); cleanup(); mount('大屏'); - expect(entries()).toEqual(['Command Center (大屏)']); + expect(entries()).toEqual(['Analytics › Command Center (大屏)']); cleanup(); mount('屏'); - expect(entries()).toEqual(['Command Center (大屏)']); + expect(entries()).toEqual(['Analytics › Command Center (大屏)']); }); it('apps, the theme commands and the full-search command follow the same rule', () => { @@ -220,16 +224,23 @@ describe('objectui#11812 — the ⌘K palette matches navigation entries on word it('CONTROL: an empty query shows every entry, app and command', () => { mount(''); - expect(shown('object')).toEqual(['Tasks', 'Accounts', 'Field Zoo', 'Cascading Select', 'In-Progress Tasks']); + // Each navigation entry under its group path (objectstack#39055). + expect(shown('object')).toEqual([ + 'Data Model › Tasks', + 'Data Model › Accounts', + 'Data Model › Field Zoo', + 'Data Model › Cascading Select', + 'Data Model › In-Progress Tasks', + ]); expect(shown('page')).toEqual([ 'Page Authoring', - 'New Project (Wizard)', - 'Command Center (大屏)', + 'Workspace › New Project (Wizard)', + 'Analytics › Command Center (大屏)', 'Styling (ADR-0065)', 'Replay Queue', ]); - expect(shown('dashboard')).toEqual(['Delivery Operations']); - expect(shown('report')).toEqual(['Task Overview']); + expect(shown('dashboard')).toEqual(['Analytics › Delivery Operations']); + expect(shown('report')).toEqual(['Analytics › Task Overview']); expect(shown('app')).toEqual(['ShowcaseCurrent', 'CRM']); expect(shown('theme')).toEqual(['Light Theme', 'Dark Theme', 'System Theme']); expect(shown('search')).toEqual(['Open Full Search Page']); diff --git a/ui/packages/app-shell/src/chrome/CommandPalette.setupPages-39038.test.tsx b/ui/packages/app-shell/src/chrome/CommandPalette.setupPages-39038.test.tsx index 06af610576d..8c458a5710c 100644 --- a/ui/packages/app-shell/src/chrome/CommandPalette.setupPages-39038.test.tsx +++ b/ui/packages/app-shell/src/chrome/CommandPalette.setupPages-39038.test.tsx @@ -94,6 +94,22 @@ const EN: Labels = { status: 'Service Status', }; +/** The group each entry sits in: the palette shows an entry under its group path (objectstack#39055). */ +const GROUP_OF: Partial> = { + users: 'org', + units: 'org', + localization: 'config', + mail: 'config', + mailSecret: 'config', + audit: 'diagnostics', + bin: 'diagnostics', + help: 'diagnostics', + status: 'diagnostics', +}; + +/** An entry's text as the palette shows it: 「分组 › 页面」. */ +const at = (l: Labels, key: keyof Labels) => `${l[GROUP_OF[key] as keyof Labels]} › ${l[key]}`; + /** Setup's navigation in its own shape: groups of `object`, `url` and `component` entries. */ function setupApp(l: Labels) { return { @@ -195,33 +211,33 @@ afterEach(() => { describe('objectstack#39038 — Setup pages are found by their label', () => { it('zh-CN: 邮件 finds 邮件投递, 审计 finds 审计日志, 本地化 finds itself', () => { mount(ZH, '邮件'); - expect(navEntries()).toEqual([ZH.mail]); + expect(navEntries()).toEqual([at(ZH, 'mail')]); cleanup(); mount(ZH, '审计'); - expect(navEntries()).toEqual([ZH.audit]); + expect(navEntries()).toEqual([at(ZH, 'audit')]); cleanup(); mount(ZH, '本地化'); - expect(navEntries()).toEqual([ZH.localization]); + expect(navEntries()).toEqual([at(ZH, 'localization')]); }); it('en: mail finds Mail Delivery, audit finds Audit Log, recycle finds Recycle Bin', () => { mount(EN, 'mail'); - expect(navEntries()).toEqual([EN.mail]); + expect(navEntries()).toEqual([at(EN, 'mail')]); cleanup(); mount(EN, 'audit'); - expect(navEntries()).toEqual([EN.audit]); + expect(navEntries()).toEqual([at(EN, 'audit')]); cleanup(); mount(EN, 'recycle'); - expect(navEntries()).toEqual([EN.bin]); + expect(navEntries()).toEqual([at(EN, 'bin')]); }); it('a component entry is found by its componentRef too: audit finds 审计日志 under zh-CN', () => { mount(ZH, 'audit'); - expect(navEntries()).toEqual([ZH.audit]); + expect(navEntries()).toEqual([at(ZH, 'audit')]); }); it('a url entry is not found by its address: setup and apps find no page', () => { @@ -240,7 +256,7 @@ describe('objectstack#39038 — Setup pages are found by their label', () => { it('CONTROL: object entries are found as before, and 时区 names no entry', () => { mount(ZH, '用户'); - expect(navEntries()).toEqual([ZH.users]); + expect(navEntries()).toEqual([at(ZH, 'users')]); cleanup(); mount(ZH, '时区'); @@ -251,7 +267,7 @@ describe('objectstack#39038 — Setup pages are found by their label', () => { describe('objectstack#39038 — a found Setup page opens where its sidebar row does', () => { it('a url entry: Enter opens its address', () => { const input = mount(ZH, '邮件投递'); - expect(navEntries()).toEqual([ZH.mail]); + expect(navEntries()).toEqual([at(ZH, 'mail')]); fireEvent.keyDown(input, { key: 'Enter' }); expect(location()).toBe('/apps/setup/system/settings/mail'); }); @@ -259,14 +275,14 @@ describe('objectstack#39038 — a found Setup page opens where its sidebar row d it('a component entry: its component route, with its params as the query string', () => { mount(EN, 'audit log'); act(() => { - fireEvent.click(item(EN.audit)); + fireEvent.click(item(at(EN, 'audit'))); }); expect(location()).toBe('/apps/setup/component/audit/log'); cleanup(); mount(EN, 'packages'); act(() => { - fireEvent.click(item('Packages')); + fireEvent.click(item(`${EN.diagnostics} › Packages`)); }); expect(location()).toBe('/apps/setup/component/developer/packages?face=admin'); }); @@ -277,7 +293,7 @@ describe('objectstack#39038 — a found Setup page opens where its sidebar row d const open = vi.spyOn(window, 'open').mockImplementation(() => null); mount(EN, 'service status'); act(() => { - fireEvent.click(item(EN.status)); + fireEvent.click(item(at(EN, 'status'))); }); expect(assign).toHaveBeenCalledWith('https://status.example.com/setup'); expect(open).not.toHaveBeenCalled(); @@ -288,7 +304,7 @@ describe('objectstack#39038 — a found Setup page opens where its sidebar row d const open = vi.spyOn(window, 'open').mockImplementation(() => null); mount(ZH, '帮助'); act(() => { - fireEvent.click(item(ZH.help)); + fireEvent.click(item(at(ZH, 'help'))); }); expect(open).toHaveBeenCalledWith('https://help.example.com/setup', '_blank', 'noopener,noreferrer'); expect(location()).toBe('/apps/setup/dashboard/system_overview'); @@ -321,7 +337,7 @@ describe('objectstack#39038 — no create row a query does not ask for', () => { it('on an object\'s page, words that find a Setup page are a search for it: 邮件 offers no create row', async () => { mount(ZH, '邮件', '/apps/setup/sys_business_unit'); await settle(); - expect(navEntries()).toEqual([ZH.mail]); + expect(navEntries()).toEqual([at(ZH, 'mail')]); expect(createRows()).toEqual([]); }); diff --git a/ui/packages/app-shell/src/chrome/CommandPalette.tsx b/ui/packages/app-shell/src/chrome/CommandPalette.tsx index d49aef3b7b8..34be376b140 100644 --- a/ui/packages/app-shell/src/chrome/CommandPalette.tsx +++ b/ui/packages/app-shell/src/chrome/CommandPalette.tsx @@ -87,7 +87,9 @@ import { fetchPackages, type PkgEntry } from '../views/studio-design/packages-io import { isPackageLessItem, packageLessItemPath } from '../views/studio-design/studioScope.js'; import { studioItemPath } from '../views/studio-design/studioAddress.js'; import { studioPackageOverviewPath } from '../views/studio-design/studioOverviewAddress.js'; -import { flattenNavigation, useAppReportEntries } from '../views/appReportIndex.js'; +import { flattenNavigationWithGroups, useAppReportEntries } from '../views/appReportIndex.js'; +import { navEntryKeywords, paletteNavEntryHit } from './paletteNavKeywords.js'; +import { PaletteNavEntryText } from './PaletteNavEntryText.js'; import { useServedApps } from '../hooks/useLauncherApps.js'; import { servedObjectLabel } from '../hooks/servedObjectLabel.js'; import { @@ -370,8 +372,11 @@ function CommandPaletteBody(props: CommandPaletteProps & { gates: NavMemberGates // then flattened. Filtering the flattened leaves by their own `visible` // alone, as this once did, offered an entry the sidebar hides by // `requiredPermissions`, by a runtime-capability gate, or by its group's - // `visible`, and opened it empty. - const navItems = gates ? flattenNavigation(navEntriesShownToMember(activeApp?.navigation || [], gates)) : []; + // `visible`, and opened it empty. Each entry keeps the groups it sits in, + // shown before it as 「分组 › 页面」 (objectstack#39055). + const navLeaves = gates ? flattenNavigationWithGroups(navEntriesShownToMember(activeApp?.navigation || [], gates)) : []; + const navItems = navLeaves.map((leaf) => leaf.item); + const navGroups = new Map(navLeaves.map((leaf) => [leaf.item, leaf.groups])); // The entries the palette shows for the query: a navigation entry or app by // its label and its machine name, a built-in command by its label and its @@ -380,8 +385,30 @@ function CommandPaletteBody(props: CommandPaletteProps & { gates: NavMemberGates // (it found "Field Zoo" for `zzzz`) no longer decides what shows // (objectui#11812). const matches = (...terms: Array) => matchesPaletteQuery(inputValue, terms); + // objectstack#39055 — a navigation entry is also found by its `keywords`, + // served already merged for the viewer's locale; only when its own terms + // miss, and then the row names the keyword that found it. The groups it + // sits in find it too, by their label or their `keywords` (a renamed + // group's old name), so a group hit lists the visible entries under it. + const navKeywordHits = new Map(); + const matchesNav = (item: NavigationItem, ...terms: Array) => { + const groups = (navGroups.get(item) ?? []).map((group) => ({ + terms: [navLabel(group)], + keywords: navEntryKeywords(group as { keywords?: unknown }), + })); + const hit = paletteNavEntryHit(inputValue, terms, navEntryKeywords(item as { keywords?: unknown }), groups); + if (hit.keyword !== undefined) navKeywordHits.set(item, hit.keyword); + return hit.found; + }; + const navEntryText = (item: NavigationItem) => ( + navLabel(group))} + keyword={navKeywordHits.get(item)} + /> + ); const navOfType = (type: string, nameKey: string) => - navItems.filter((item) => item.type === type && matches(navLabel(item), item[nameKey])); + navItems.filter((item) => item.type === type && matchesNav(item, navLabel(item), item[nameKey])); const objectItems = navOfType('object', 'objectName'); const dashboardItems = navOfType('dashboard', 'dashboardName'); const pageItems = navOfType('page', 'pageName'); @@ -395,8 +422,8 @@ function CommandPaletteBody(props: CommandPaletteProps & { gates: NavMemberGates // An entry that resolves to no address (`#`) opens nothing and is skipped. const addressItems = navItems.filter( (item) => - ((item.type === 'component' && matches(navLabel(item), item.componentRef)) || - (item.type === 'url' && matches(navLabel(item)))) && + ((item.type === 'component' && matchesNav(item, navLabel(item), item.componentRef)) || + (item.type === 'url' && matchesNav(item, navLabel(item)))) && resolveHref(item, baseUrl, templateContext).href !== '#', ); // objectui#13020 — the app's reports beyond its navigation: the ones it @@ -784,7 +811,7 @@ function CommandPaletteBody(props: CommandPaletteProps & { gates: NavMemberGates onSelect={() => leaveTo(resolveHref(item, baseUrl, templateContext).href)} > - {navLabel(item)} + {navEntryText(item)} ); })} @@ -802,7 +829,7 @@ function CommandPaletteBody(props: CommandPaletteProps & { gates: NavMemberGates onSelect={() => leaveTo(resolveHref(item, baseUrl, templateContext).href)} > - {navLabel(item)} + {navEntryText(item)} ))} @@ -819,7 +846,7 @@ function CommandPaletteBody(props: CommandPaletteProps & { gates: NavMemberGates onSelect={() => leaveTo(resolveHref(item, baseUrl, templateContext).href)} > - {navLabel(item)} + {navEntryText(item)} ))} {/* objectstack#39038 — component and url entries, drawn with their own icon as the sidebar draws them. */} @@ -832,7 +859,7 @@ function CommandPaletteBody(props: CommandPaletteProps & { gates: NavMemberGates onSelect={() => openNavEntry(item)} > - {navLabel(item)} + {navEntryText(item)} ); })} @@ -850,7 +877,7 @@ function CommandPaletteBody(props: CommandPaletteProps & { gates: NavMemberGates onSelect={() => leaveTo(resolveHref(item, baseUrl, templateContext).href)} > - {navLabel(item)} + {navEntryText(item)} ))} {appReports.map((entry) => ( diff --git a/ui/packages/app-shell/src/chrome/PaletteNavEntryText.tsx b/ui/packages/app-shell/src/chrome/PaletteNavEntryText.tsx new file mode 100644 index 00000000000..0629acc5977 --- /dev/null +++ b/ui/packages/app-shell/src/chrome/PaletteNavEntryText.tsx @@ -0,0 +1,44 @@ +/** + * ObjectUI + * Copyright (c) 2024-present ObjectStack Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import { useObjectTranslation } from '@object-ui/i18n'; + +/** What a ⌘K navigation entry's row shows beside its icon. */ +export interface PaletteNavEntryTextProps { + /** The entry's text, as the sidebar shows it. */ + label: string; + /** The texts of the groups it sits in, outermost first. */ + groups: readonly string[]; + /** The search alias that found the entry, when none of its own terms did. */ + keyword?: string; +} + +/** + * A navigation entry's text in the ⌘K palette (objectstack#39055): its group + * path before it, 「分组 › 页面」, so two entries of one name in different + * groups are told apart and the reader sees where the page lives; and, when + * the entry was found only through one of its search aliases, that alias + * after it (「原名 X」), so the reader sees why a query that is not the + * entry's name found it. + */ +export function PaletteNavEntryText({ label, groups, keyword }: PaletteNavEntryTextProps) { + const { t } = useObjectTranslation(); + return ( + + + {groups.length > 0 && {`${groups.join(' › ')} › `}} + {label} + + {keyword !== undefined && ( + + {t('console.commandPalette.formerName', { keyword, defaultValue: 'Formerly {{keyword}}' })} + + )} + + ); +} diff --git a/ui/packages/app-shell/src/chrome/paletteNavKeywords.ts b/ui/packages/app-shell/src/chrome/paletteNavKeywords.ts new file mode 100644 index 00000000000..ef384e9e319 --- /dev/null +++ b/ui/packages/app-shell/src/chrome/paletteNavKeywords.ts @@ -0,0 +1,89 @@ +/** + * ObjectUI + * Copyright (c) 2024-present ObjectStack Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** + * A ⌘K navigation entry found by one of its search aliases (objectstack#39055). + * + * A navigation entry declares `keywords`: other words a person types to find + * it, such as its old name after a rename. The server serves them already + * merged for the viewer's locale (the entry's source words plus that locale's + * bundle words, `translateApp` in `@objectstack/spec`), so the palette reads + * the one list on the entry and resolves no bundle itself. + * + * An entry is found by its own terms (label, machine name) first; only when + * none of them answers is a keyword tried, and then the hit names that + * keyword, which the palette shows beside the entry. A keyword hit is a found + * entry like any other. + * + * A `group` is not itself a palette entry, but its label and its `keywords` + * find the entries under it (at any depth): a renamed group is still found by + * its old name, and the reader lands on its pages. The entry's own terms and + * keywords come first, then each group's, and a group hit names its keyword + * only when no group's label answered. + */ + +import { matchesPaletteQuery } from './paletteMatch.js'; + +/** What matching a navigation entry answered. */ +export interface PaletteNavHit { + /** Whether the entry answers the query. */ + found: boolean; + /** The keyword that found it, when none of its own terms did. */ + keyword?: string; +} + +/** The entry's served `keywords`: its string members, in order. */ +export function navEntryKeywords(item: { keywords?: unknown }): string[] { + const { keywords } = item; + return Array.isArray(keywords) ? keywords.filter((word): word is string => typeof word === 'string') : []; +} + +/** + * Whether `query` finds an entry with these `terms` and `keywords` + * ({@link matchesPaletteQuery}'s rule for each): by a term, with no keyword + * named; else by the first keyword that matches, named. + */ +export function paletteKeywordHit( + query: string, + terms: ReadonlyArray, + keywords: readonly string[], +): PaletteNavHit { + if (matchesPaletteQuery(query, terms)) return { found: true }; + const keyword = keywords.find((word) => matchesPaletteQuery(query, [word])); + return keyword === undefined ? { found: false } : { found: true, keyword }; +} + +/** What a group above an entry is matched on: its label and its served `keywords`. */ +export interface PaletteNavGroupTerms { + terms: ReadonlyArray; + keywords: readonly string[]; +} + +/** + * Whether `query` finds an entry by its own `terms` and `keywords` + * ({@link paletteKeywordHit}), else through one of the `groups` it sits in: + * a group's label finds it with no keyword named, else a group's keyword + * finds it, named. + */ +export function paletteNavEntryHit( + query: string, + terms: ReadonlyArray, + keywords: readonly string[], + groups: readonly PaletteNavGroupTerms[], +): PaletteNavHit { + const own = paletteKeywordHit(query, terms, keywords); + if (own.found) return own; + let viaGroupKeyword: string | undefined; + for (const group of groups) { + const hit = paletteKeywordHit(query, group.terms, group.keywords); + if (!hit.found) continue; + if (hit.keyword === undefined) return { found: true }; + viaGroupKeyword ??= hit.keyword; + } + return viaGroupKeyword === undefined ? { found: false } : { found: true, keyword: viaGroupKeyword }; +} diff --git a/ui/packages/app-shell/src/views/appReportIndex.ts b/ui/packages/app-shell/src/views/appReportIndex.ts index 5ad02051333..6bebaa1884a 100644 --- a/ui/packages/app-shell/src/views/appReportIndex.ts +++ b/ui/packages/app-shell/src/views/appReportIndex.ts @@ -139,23 +139,42 @@ function packageOf(app: unknown): string | undefined { return nonEmptyString(id) ? id : undefined; } +/** One entry of a flattened navigation tree, with the groups it sits in. */ +export interface NavigationLeaf { + /** The entry itself. */ + item: any; + /** The groups above it, outermost first; empty for a top-level entry. */ + groups: any[]; +} + /** - * Every entry of a navigation tree, its groups opened at any depth: a group - * with children stands for them. The ⌘K palette's walk, shared so the palette - * and the report index read the same navigation. + * Every entry of a navigation tree with its group path, its groups opened at + * any depth: a group with children stands for them, and each entry keeps the + * groups it was under, so the ⌘K palette can show 「分组 › 页面」 + * (objectstack#39055). */ -export function flattenNavigation(items: readonly any[]): any[] { - const result: any[] = []; +export function flattenNavigationWithGroups(items: readonly any[], groups: readonly any[] = []): NavigationLeaf[] { + const result: NavigationLeaf[] = []; for (const item of items) { if (item.type === 'group' && item.children) { - result.push(...flattenNavigation(item.children)); + result.push(...flattenNavigationWithGroups(item.children, [...groups, item])); } else { - result.push(item); + result.push({ item, groups: [...groups] }); } } return result; } +/** + * Every entry of a navigation tree, its groups opened at any depth: a group + * with children stands for them. The ⌘K palette's walk + * ({@link flattenNavigationWithGroups} without the paths), shared so the + * palette and the report index read the same navigation. + */ +export function flattenNavigation(items: readonly any[]): any[] { + return flattenNavigationWithGroups(items).map((leaf) => leaf.item); +} + /** The app's served navigation tree, or `undefined` when it serves none. */ function navigationOf(app: unknown): unknown[] | undefined { const navigation = app && typeof app === 'object' ? (app as { navigation?: unknown }).navigation : undefined; diff --git a/ui/packages/i18n/src/locales/ar.ts b/ui/packages/i18n/src/locales/ar.ts index 64d32e8d418..78cdd0a4702 100644 --- a/ui/packages/i18n/src/locales/ar.ts +++ b/ui/packages/i18n/src/locales/ar.ts @@ -2959,6 +2959,7 @@ const ar = { enterApplyTheme: "تطبيق المظهر", enterOpen: "فتح", currentPage: "الصفحة الحالية", + formerName: "سابقًا {{keyword}}", searching: "جارٍ البحث…", records: "السجلات", recentRecords: "شوهد مؤخراً", diff --git a/ui/packages/i18n/src/locales/de.ts b/ui/packages/i18n/src/locales/de.ts index 923c48b9a6c..563ca5b6e0b 100644 --- a/ui/packages/i18n/src/locales/de.ts +++ b/ui/packages/i18n/src/locales/de.ts @@ -2679,6 +2679,7 @@ const de = { enterApplyTheme: "Design anwenden", enterOpen: "Öffnen", currentPage: "Aktuelle Seite", + formerName: "Früher {{keyword}}", searching: "Suche…", records: "Datensätze", recentRecords: "Zuletzt angesehen", diff --git a/ui/packages/i18n/src/locales/en.ts b/ui/packages/i18n/src/locales/en.ts index b051ea53622..2706c5420b4 100644 --- a/ui/packages/i18n/src/locales/en.ts +++ b/ui/packages/i18n/src/locales/en.ts @@ -3051,6 +3051,7 @@ const en = { enterApplyTheme: 'Apply theme', enterOpen: 'Open', currentPage: 'Current page', + formerName: 'Formerly {{keyword}}', }, ai: { pendingDrafts: { diff --git a/ui/packages/i18n/src/locales/es.ts b/ui/packages/i18n/src/locales/es.ts index 845344453a0..ddcc2fcd0db 100644 --- a/ui/packages/i18n/src/locales/es.ts +++ b/ui/packages/i18n/src/locales/es.ts @@ -2751,6 +2751,7 @@ const es = { enterApplyTheme: "Aplicar tema", enterOpen: "Abrir", currentPage: "Página actual", + formerName: "Antes {{keyword}}", searching: "Buscando…", records: "Registros", recentRecords: "Visto recientemente", diff --git a/ui/packages/i18n/src/locales/fr.ts b/ui/packages/i18n/src/locales/fr.ts index ea5d3d55153..2dc3d307997 100644 --- a/ui/packages/i18n/src/locales/fr.ts +++ b/ui/packages/i18n/src/locales/fr.ts @@ -2747,6 +2747,7 @@ const fr = { enterApplyTheme: "Appliquer le thème", enterOpen: "Ouvrir", currentPage: "Page actuelle", + formerName: "Anciennement {{keyword}}", searching: "Recherche…", records: "Enregistrements", recentRecords: "Récemment consultés", diff --git a/ui/packages/i18n/src/locales/ja.ts b/ui/packages/i18n/src/locales/ja.ts index 8caf4f8dbce..52ceb528c1f 100644 --- a/ui/packages/i18n/src/locales/ja.ts +++ b/ui/packages/i18n/src/locales/ja.ts @@ -2681,6 +2681,7 @@ const ja = { enterApplyTheme: "テーマを適用", enterOpen: "開く", currentPage: "現在のページ", + formerName: "旧名 {{keyword}}", searching: "検索中…", records: "レコード", recentRecords: "最近閲覧", diff --git a/ui/packages/i18n/src/locales/ko.ts b/ui/packages/i18n/src/locales/ko.ts index bf13eb281ea..95ab36a983e 100644 --- a/ui/packages/i18n/src/locales/ko.ts +++ b/ui/packages/i18n/src/locales/ko.ts @@ -2679,6 +2679,7 @@ const ko = { enterApplyTheme: "테마 적용", enterOpen: "열기", currentPage: "현재 페이지", + formerName: "이전 이름 {{keyword}}", searching: "검색 중…", records: "레코드", recentRecords: "최근 본 항목", diff --git a/ui/packages/i18n/src/locales/pt-BR.ts b/ui/packages/i18n/src/locales/pt-BR.ts index 4f109cfe5f1..ee04c999439 100644 --- a/ui/packages/i18n/src/locales/pt-BR.ts +++ b/ui/packages/i18n/src/locales/pt-BR.ts @@ -2746,6 +2746,7 @@ const pt = { enterApplyTheme: "Aplicar tema", enterOpen: "Abrir", currentPage: "Página atual", + formerName: "Antigo nome {{keyword}}", searching: "Pesquisando…", records: "Registros", recentRecords: "Vistos recentemente", diff --git a/ui/packages/i18n/src/locales/ru.ts b/ui/packages/i18n/src/locales/ru.ts index b04824012fd..3e3cc9f0e95 100644 --- a/ui/packages/i18n/src/locales/ru.ts +++ b/ui/packages/i18n/src/locales/ru.ts @@ -2825,6 +2825,7 @@ const ru = { enterApplyTheme: "Применить тему", enterOpen: "Открыть", currentPage: "Текущая страница", + formerName: "Ранее {{keyword}}", searching: "Поиск…", records: "Записи", recentRecords: "Недавно просмотренные", diff --git a/ui/packages/i18n/src/locales/zh-Hans.ts b/ui/packages/i18n/src/locales/zh-Hans.ts index c75d466e65f..4553adc3dc3 100644 --- a/ui/packages/i18n/src/locales/zh-Hans.ts +++ b/ui/packages/i18n/src/locales/zh-Hans.ts @@ -2588,6 +2588,7 @@ const zh = { enterApplyTheme: '应用主题', enterOpen: '打开', currentPage: '当前页面', + formerName: '原名 {{keyword}}', }, ai: { pendingDrafts: { diff --git a/ui/packages/i18n/src/locales/zh-Hant.ts b/ui/packages/i18n/src/locales/zh-Hant.ts index 3b2ea2ce56c..b97bf5665ad 100644 --- a/ui/packages/i18n/src/locales/zh-Hant.ts +++ b/ui/packages/i18n/src/locales/zh-Hant.ts @@ -2588,6 +2588,7 @@ const zhHant = { enterApplyTheme: '應用主題', enterOpen: '開啟', currentPage: '當前頁面', + formerName: '原名 {{keyword}}', }, ai: { pendingDrafts: {