From 95c75cf8d87ab9d6d95db1774867c547d92bf8ca Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Dec 2026 06:45:05 +0000 Subject: [PATCH 01/12] wip(#39053): Setup nav ten group anchors with renamedFrom aliases Claude-Session: https://claude.ai/code/session_01WGufzfhZDUp9rF94Nz3frb Co-authored-by: Claude --- packages/cli/src/commands/compile.ts | 39 +++-- packages/cli/src/commands/validate.ts | 39 +++-- packages/objectql/src/core.ts | 6 + packages/objectql/src/index.ts | 6 + .../src/nav-contribution-diagnostics.ts | 165 ++++++++++++++++-- packages/objectql/src/registry-apps.ts | 58 +++++- .../src/apps/setup-nav.contributions.ts | 12 +- .../platform-objects/src/apps/setup.app.ts | 120 ++++++++----- .../src/apps/translations/ar.source-hashes.ts | 19 +- .../src/apps/translations/ar.ts | 19 +- .../src/apps/translations/de.source-hashes.ts | 19 +- .../src/apps/translations/de.ts | 19 +- .../src/apps/translations/en.ts | 19 +- .../apps/translations/es-ES.source-hashes.ts | 19 +- .../src/apps/translations/es-ES.ts | 19 +- .../src/apps/translations/fr.source-hashes.ts | 19 +- .../src/apps/translations/fr.ts | 19 +- .../apps/translations/ja-JP.source-hashes.ts | 19 +- .../src/apps/translations/ja-JP.ts | 19 +- .../src/apps/translations/ko.source-hashes.ts | 19 +- .../src/apps/translations/ko.ts | 19 +- .../apps/translations/pt-BR.source-hashes.ts | 19 +- .../src/apps/translations/pt-BR.ts | 19 +- .../src/apps/translations/ru.source-hashes.ts | 19 +- .../src/apps/translations/ru.ts | 19 +- .../apps/translations/zh-CN.source-hashes.ts | 19 +- .../src/apps/translations/zh-CN.ts | 19 +- .../translations/zh-Hant.source-hashes.ts | 19 +- .../src/apps/translations/zh-Hant.ts | 19 +- .../src/dispatcher-error-vocabulary.ts | 17 ++ .../spec/src/ui/app-nav-group-renamed-from.ts | 144 +++++++++++++++ packages/spec/src/ui/app.zod.ts | 33 +++- 32 files changed, 755 insertions(+), 283 deletions(-) create mode 100644 packages/spec/src/ui/app-nav-group-renamed-from.ts diff --git a/packages/cli/src/commands/compile.ts b/packages/cli/src/commands/compile.ts index 654e76d4c7d..0ed7640ca08 100644 --- a/packages/cli/src/commands/compile.ts +++ b/packages/cli/src/commands/compile.ts @@ -68,7 +68,7 @@ import { // [#14553] The compile-time half of the navigation-contribution group ruling. // Reports; never refuses — the runtime still relocates, deliberately. import { findNavGroupDiagnostics } from '../utils/nav-contribution-groups.js'; -import type { NavContributionGroupDiagnostic } from '@objectstack/objectql'; +import { NAV_CONTRIBUTION_GROUP_MISSING, type NavContributionGroupDiagnostic } from '@objectstack/objectql'; // [#18024] The compile-time half of the #17516 permission-set name-collision // ruling. Reports; never refuses — the runtime still drops the set, deliberately // (ADR-0086 D4), and what was missing was the author hearing about it. @@ -838,15 +838,34 @@ export default class Compile extends Command { // is a read-time fold. Only the composed case can be judged here. navGroupWarnings = await findNavGroupDiagnostics(result.data as Record); if (navGroupWarnings.length > 0 && !flags.json) { - console.log(''); - printWarning( - `Navigation contributions aimed at a group the target app does not declare ` + - `(${navGroupWarnings.length}) — the items still install, RELOCATED to the app's top level`, - ); - printBulletList( - navGroupWarnings.map((d) => `[${d.code}] ${d.message} Fix: ${d.fix}`), - { noun: 'navigation-contribution diagnostic' }, - ); + // [#39053] Two findings ride this list: a group the target app does not + // declare (the items are RELOCATED to its top level), and a retired + // group id a group took over through `renamedFrom` (the items land + // there). Each gets its own headline, so neither reads as the other. + const relocated = navGroupWarnings.filter((d) => d.code === NAV_CONTRIBUTION_GROUP_MISSING); + const renamed = navGroupWarnings.filter((d) => d.code !== NAV_CONTRIBUTION_GROUP_MISSING); + if (relocated.length > 0) { + console.log(''); + printWarning( + `Navigation contributions aimed at a group the target app does not declare ` + + `(${relocated.length}) — the items still install, RELOCATED to the app's top level`, + ); + printBulletList( + relocated.map((d) => `[${d.code}] ${d.message} Fix: ${d.fix}`), + { noun: 'navigation-contribution diagnostic' }, + ); + } + if (renamed.length > 0) { + console.log(''); + printWarning( + `Navigation contributions aimed at a retired group id (${renamed.length}) — ` + + `the items land in the group that replaced it; name the new id`, + ); + printBulletList( + renamed.map((d) => `[${d.code}] ${d.message} Fix: ${d.fix}`), + { noun: 'navigation-contribution diagnostic' }, + ); + } } // 3b-ter. [#18024] Permission sets declared under a name another package diff --git a/packages/cli/src/commands/validate.ts b/packages/cli/src/commands/validate.ts index 652a02019de..4c690c1d8e5 100644 --- a/packages/cli/src/commands/validate.ts +++ b/packages/cli/src/commands/validate.ts @@ -67,7 +67,7 @@ import { readSpecReleaseChanges } from '../utils/spec-release-changes.js'; // [#14553] The navigation-contribution group check, shared with `os compile`. // Reports; never refuses — the runtime still relocates, deliberately. import { findNavGroupDiagnostics } from '../utils/nav-contribution-groups.js'; -import type { NavContributionGroupDiagnostic } from '@objectstack/objectql'; +import { NAV_CONTRIBUTION_GROUP_MISSING, type NavContributionGroupDiagnostic } from '@objectstack/objectql'; // [#18024] The permission-set name-collision check, shared with `os compile`. // Reports; never refuses — the runtime still drops the foreign set, correctly // (ADR-0086 D4); what was missing was the author hearing about it. @@ -1033,15 +1033,34 @@ export default class Validate extends Command { // NOT reported — that is the supported cross-artifact case. navGroupWarnings = await findNavGroupDiagnostics(result.data as Record); if (navGroupWarnings.length > 0 && !flags.json) { - console.log(''); - printWarning( - `Navigation contributions aimed at a group the target app does not declare ` + - `(${navGroupWarnings.length}) — the items still install, RELOCATED to the app's top level`, - ); - printBulletList( - navGroupWarnings.map((d) => `[${d.code}] ${d.message} Fix: ${d.fix}`), - { noun: 'navigation-contribution diagnostic' }, - ); + // [#39053] Two findings ride this list: a group the target app does not + // declare (the items are RELOCATED to its top level), and a retired + // group id a group took over through `renamedFrom` (the items land + // there). Each gets its own headline, so neither reads as the other. + const relocated = navGroupWarnings.filter((d) => d.code === NAV_CONTRIBUTION_GROUP_MISSING); + const renamed = navGroupWarnings.filter((d) => d.code !== NAV_CONTRIBUTION_GROUP_MISSING); + if (relocated.length > 0) { + console.log(''); + printWarning( + `Navigation contributions aimed at a group the target app does not declare ` + + `(${relocated.length}) — the items still install, RELOCATED to the app's top level`, + ); + printBulletList( + relocated.map((d) => `[${d.code}] ${d.message} Fix: ${d.fix}`), + { noun: 'navigation-contribution diagnostic' }, + ); + } + if (renamed.length > 0) { + console.log(''); + printWarning( + `Navigation contributions aimed at a retired group id (${renamed.length}) — ` + + `the items land in the group that replaced it; name the new id`, + ); + printBulletList( + renamed.map((d) => `[${d.code}] ${d.message} Fix: ${d.fix}`), + { noun: 'navigation-contribution diagnostic' }, + ); + } } // [#18024] Permission sets declared under a name another package in this diff --git a/packages/objectql/src/core.ts b/packages/objectql/src/core.ts index 0183e930f8d..1307dd69f39 100644 --- a/packages/objectql/src/core.ts +++ b/packages/objectql/src/core.ts @@ -39,13 +39,19 @@ export { PackageScopedNameRefusedError } from './package-scoped-read.js'; // reads two arrays. export { NAV_CONTRIBUTION_GROUP_MISSING, + NAV_CONTRIBUTION_GROUP_RENAMED, findNavGroup, + resolveNavGroup, navContributionGroupDiagnostic, + navContributionGroupRenamedDiagnostic, formatNavContributionGroupDiagnostic, checkNavContributionGroups, } from './nav-contribution-diagnostics.js'; export type { NavContributionGroupDiagnostic, + NavContributionGroupMissingDiagnostic, + NavContributionGroupRenamedDiagnostic, + NavGroupResolution, NavGroupHostApp, NavGroupContribution, } from './nav-contribution-diagnostics.js'; diff --git a/packages/objectql/src/index.ts b/packages/objectql/src/index.ts index 4d6fed96b6b..ec3c37f7250 100644 --- a/packages/objectql/src/index.ts +++ b/packages/objectql/src/index.ts @@ -184,13 +184,19 @@ export { // consumer asks these; it does not re-derive the walk. export { NAV_CONTRIBUTION_GROUP_MISSING, + NAV_CONTRIBUTION_GROUP_RENAMED, findNavGroup, + resolveNavGroup, navContributionGroupDiagnostic, + navContributionGroupRenamedDiagnostic, formatNavContributionGroupDiagnostic, checkNavContributionGroups, } from './nav-contribution-diagnostics.js'; export type { NavContributionGroupDiagnostic, + NavContributionGroupMissingDiagnostic, + NavContributionGroupRenamedDiagnostic, + NavGroupResolution, NavGroupHostApp, NavGroupContribution, } from './nav-contribution-diagnostics.js'; diff --git a/packages/objectql/src/nav-contribution-diagnostics.ts b/packages/objectql/src/nav-contribution-diagnostics.ts index 45477a98c8d..1b8c8d1213f 100644 --- a/packages/objectql/src/nav-contribution-diagnostics.ts +++ b/packages/objectql/src/nav-contribution-diagnostics.ts @@ -55,6 +55,11 @@ * `metadata-protocol/src/build-probes.ts`), which is also what lets one stream * carry the runtime and the build finding. * + * The retired-id notice {@link NAV_CONTRIBUTION_GROUP_RENAMED} (#39053) is the + * same family on the same four tests — payload of a success, an artifact + * finding, `warning` only, never routed to `error.code` — so everything below + * holds for it too, including its own classification row. + * * ⛔ So: **no `ERROR_CODE_LEDGER` registration.** What it does need is a * CLASSIFICATION row, and which gate wants one was measured rather than * assumed — the first guess was wrong in a way worth recording. @@ -87,8 +92,20 @@ */ export const NAV_CONTRIBUTION_GROUP_MISSING = 'nav_contribution_group_missing'; +/** + * The diagnostics code for a contribution that named a RETIRED group id and + * landed in the group that declares it in `renamedFrom` (#39053). + * + * The contribution is not relocated: it lands exactly where its author meant, + * because the app says which group took that id over. What is left to say is + * a deprecation notice to the contributing package — the id it names has been + * replaced, so the package should name the new one before the alias is + * removed. Same D6c vocabulary as {@link NAV_CONTRIBUTION_GROUP_MISSING}. + */ +export const NAV_CONTRIBUTION_GROUP_RENAMED = 'nav_contribution_group_renamed'; + /** One relocated-contribution finding (ADR-0038 BuildIssue family; ADR-0112 D6c). */ -export interface NavContributionGroupDiagnostic { +export interface NavContributionGroupMissingDiagnostic { /** Always {@link NAV_CONTRIBUTION_GROUP_MISSING}. */ readonly code: typeof NAV_CONTRIBUTION_GROUP_MISSING; /** Never `error`: the platform relocates and carries on — no refusal (option A not taken). */ @@ -105,6 +122,38 @@ export interface NavContributionGroupDiagnostic { readonly fix: string; } +/** + * One contribution that named a retired group id and landed in the group that + * took the id over through `renamedFrom` (#39053). Same family as the missing + * finding; the items are NOT relocated. + */ +export interface NavContributionGroupRenamedDiagnostic { + /** Always {@link NAV_CONTRIBUTION_GROUP_RENAMED}. */ + readonly code: typeof NAV_CONTRIBUTION_GROUP_RENAMED; + /** A deprecation notice: the items landed where their author meant. */ + readonly severity: 'warning'; + /** The app whose group answered for the retired id. */ + readonly app: string; + /** The contributing package, when the registration carried one. */ + readonly packageId?: string; + /** The retired `group` id the contribution names. */ + readonly group: string; + /** The id of the group that lists {@link group} in its `renamedFrom`, and that received the items. */ + readonly renamedTo: string; + /** Ids of the items that landed in {@link renamedTo}, in contribution order. */ + readonly items: readonly string[]; + readonly message: string; + readonly fix: string; +} + +/** + * Every navigation-contribution finding, discriminated on `code`. Both doors + * (the registry fold and `os build` / `os validate`) carry this one union. + */ +export type NavContributionGroupDiagnostic = + | NavContributionGroupMissingDiagnostic + | NavContributionGroupRenamedDiagnostic; + /** The shape this module needs from an app — its name and its nav tree. */ export interface NavGroupHostApp { readonly name?: unknown; @@ -122,27 +171,65 @@ export interface NavGroupContribution { /** How an item with no `id` is named in {@link NavContributionGroupDiagnostic.relocated}. */ const UNNAMED_ITEM = '(unnamed)'; -/** - * Depth-first search for a `type: 'group'` nav item by id. - * - * ⚠️ BOTH conditions, and the pair is load-bearing: an `object`-type nav item - * that happens to share the id is not a container, so naming it is the same - * authoring error as naming nothing and must reach the same diagnostic. The - * registry's fold and `os build` call THIS function, so the two doors cannot - * disagree about what "the group exists" means. - */ -export function findNavGroup(items: unknown, groupId: string): Record | undefined { +/** How a group id resolved: by its own id, or through a group's `renamedFrom`. */ +export interface NavGroupResolution { + /** The `type: 'group'` node the id resolved to. */ + readonly group: Record; + /** `id` — the node's own id; `renamedFrom` — a retired id the node declares it took over (#39053). */ + readonly matchedBy: 'id' | 'renamedFrom'; +} + +/** Depth-first search for a `type: 'group'` node satisfying `match`. */ +function findGroupNode( + items: unknown, + match: (node: Record) => boolean, +): Record | undefined { if (!Array.isArray(items)) return undefined; for (const item of items) { if (!item || typeof item !== 'object') continue; const node = item as Record; - if (node.id === groupId && node.type === 'group') return node; - const found = findNavGroup(node.children, groupId); + if (node.type === 'group' && match(node)) return node; + const found = findGroupNode(node.children, match); if (found) return found; } return undefined; } +/** + * Resolve a contribution's `group` id against an app's navigation tree. + * + * ⚠️ TWO PASSES, and the order is load-bearing: a group whose own id is + * `groupId` wins over any group that lists `groupId` in `renamedFrom`, + * wherever the two sit in the tree. An id that is still declared was never + * renamed away from, so the exact match is the author's group; the spec + * refuses an app that declares both (`app-nav-group-renamed-from.ts`), and a + * contributed group cannot shadow a live one through this lookup either. + * + * ⚠️ Only `type: 'group'` nodes count, for either pass: an `object`-type nav + * item that happens to share the id is not a container, so naming it is the + * same authoring error as naming nothing and must reach the same diagnostic. + * The registry's fold and `os build` call THIS function, so the two doors + * cannot disagree about what "the group exists" means. + */ +export function resolveNavGroup(items: unknown, groupId: string): NavGroupResolution | undefined { + const exact = findGroupNode(items, (node) => node.id === groupId); + if (exact) return { group: exact, matchedBy: 'id' }; + const renamed = findGroupNode( + items, + (node) => Array.isArray(node.renamedFrom) && node.renamedFrom.includes(groupId), + ); + if (renamed) return { group: renamed, matchedBy: 'renamedFrom' }; + return undefined; +} + +/** + * The `type: 'group'` node a contribution's `group` id lands in — by its own + * id, else through a group's `renamedFrom` (see {@link resolveNavGroup}). + */ +export function findNavGroup(items: unknown, groupId: string): Record | undefined { + return resolveNavGroup(items, groupId)?.group; +} + /** The ids a contribution's items are reported under. */ function relocatedIds(items: unknown): string[] { if (!Array.isArray(items)) return []; @@ -162,7 +249,7 @@ export function navContributionGroupDiagnostic(input: { group: string; packageId?: string; items?: unknown; -}): NavContributionGroupDiagnostic { +}): NavContributionGroupMissingDiagnostic { const relocated = relocatedIds(input.items); const who = input.packageId ?? '(unknown package)'; const what = relocated.length === 1 ? '1 navigation item' : `${relocated.length} navigation items`; @@ -184,6 +271,39 @@ export function navContributionGroupDiagnostic(input: { }; } +/** + * Build the deprecation notice for one contribution that named a retired + * group id `group` and landed in `renamedTo`, the group declaring it in + * `renamedFrom` (#39053). + */ +export function navContributionGroupRenamedDiagnostic(input: { + app: string; + group: string; + renamedTo: string; + packageId?: string; + items?: unknown; +}): NavContributionGroupRenamedDiagnostic { + const items = relocatedIds(input.items); + const who = input.packageId ?? '(unknown package)'; + const what = items.length === 1 ? '1 navigation item' : `${items.length} navigation items`; + return { + code: NAV_CONTRIBUTION_GROUP_RENAMED, + severity: 'warning', + app: input.app, + ...(input.packageId === undefined ? {} : { packageId: input.packageId }), + group: input.group, + renamedTo: input.renamedTo, + items, + message: + `Package "${who}" contributes ${what} [${items.join(', ')}] into group ` + + `"${input.group}" of app "${input.app}", a retired group id: group "${input.renamedTo}" ` + + `took it over (its \`renamedFrom\` lists "${input.group}"), so the item(s) landed there. ` + + `The retired id is accepted only as an alias.`, + fix: + `Change the contribution's \`group\` from "${input.group}" to "${input.renamedTo}".`, + }; +} + /** One line carrying the whole finding — the text both doors print. */ export function formatNavContributionGroupDiagnostic(d: NavContributionGroupDiagnostic): string { return `[Registry] [${d.code}] ${d.message} Fix: ${d.fix}`; @@ -191,7 +311,9 @@ export function formatNavContributionGroupDiagnostic(d: NavContributionGroupDiag /** * The COMPILE-TIME half: every contribution in one composed artifact whose - * `group` names no group in the target app. + * `group` names no group in the target app, and — as a deprecation notice — + * every one whose `group` is a retired id a group of the target app took over + * through `renamedFrom` (#39053). * * ⚠️ A contribution whose target app is NOT among `apps` yields nothing, and * that silence is a decision rather than an oversight. A package may legally @@ -216,7 +338,18 @@ export function checkNavContributionGroups( if (!Array.isArray(c.items) || c.items.length === 0) continue; const target = byName.get(c.app); if (!target) continue; - if (findNavGroup(target.navigation, c.group)) continue; + const resolved = resolveNavGroup(target.navigation, c.group); + if (resolved?.matchedBy === 'id') continue; + if (resolved) { + found.push(navContributionGroupRenamedDiagnostic({ + app: c.app, + group: c.group, + renamedTo: String(resolved.group.id), + ...(c.packageId === undefined ? {} : { packageId: c.packageId }), + items: c.items, + })); + continue; + } found.push(navContributionGroupDiagnostic({ app: c.app, group: c.group, diff --git a/packages/objectql/src/registry-apps.ts b/packages/objectql/src/registry-apps.ts index d1be00c257b..3f5beb7b197 100644 --- a/packages/objectql/src/registry-apps.ts +++ b/packages/objectql/src/registry-apps.ts @@ -31,8 +31,8 @@ * evaluation cycle. `index.ts` re-exports nothing from this module. */ -import { formatNavContributionGroupDiagnostic, navContributionGroupDiagnostic, findNavGroup as resolveNavGroup } from './nav-contribution-diagnostics.js'; -import type { NavContributionGroupDiagnostic } from './nav-contribution-diagnostics.js'; +import { formatNavContributionGroupDiagnostic, navContributionGroupDiagnostic, navContributionGroupRenamedDiagnostic, NAV_CONTRIBUTION_GROUP_MISSING, findNavGroup as resolveNavGroup } from './nav-contribution-diagnostics.js'; +import type { NavContributionGroupDiagnostic, NavContributionGroupMissingDiagnostic } from './nav-contribution-diagnostics.js'; import type { SchemaRegistry } from './registry.js'; /** @@ -135,7 +135,7 @@ export class AppsFacet { } /** The body of `SchemaRegistry#applyNavContributions`; the method's docblock there is its contract. */ - static applyNavContributions(this: Pick, app: any): any { + static applyNavContributions(this: Pick, app: any): any { const contributions = this.appNavContributions.get(app?.name); if (!contributions || contributions.length === 0) return app; @@ -157,6 +157,10 @@ export class AppsFacet { if (group) { if (!Array.isArray(group.children)) group.children = []; group.children.push(...c.items); + // [#39053] Found under a retired id that this group lists in + // `renamedFrom`: the items land where their author meant, and the + // contributing package is told to name the new id. + if (group.id !== c.group) recordNavGroupRename(this, String(app.name), c, String(group.id)); } else { // [#14553] The relocation itself is UNCHANGED — the fold stays // order-independent and contributions into optional groups keep @@ -209,8 +213,50 @@ export class AppsFacet { this.warn(formatNavContributionGroupDiagnostic(diagnostic)); } - /** The body of `SchemaRegistry#getAppNavDiagnostics`; the method's docblock there is its contract. */ - static getAppNavDiagnostics(this: Pick, appName: string): NavContributionGroupDiagnostic[] { - return [...(this.navGroupDiagnostics.get(appName)?.values() ?? [])]; + /** + * The body of `SchemaRegistry#getAppNavDiagnostics`; the method's docblock there is its contract. + * + * [#39053] It answers the RELOCATIONS only — what happened to the app's + * tree. A retired-id notice (`recordNavGroupRename`) shares the per-app map + * for its once-per-process dedupe, but its items landed where their author + * meant, so it is a log line to the contributing package, not a change to + * the app; a reader of this list (the upgrade-impact report) counts every + * entry as a relocated contribution. + */ + static getAppNavDiagnostics(this: Pick, appName: string): NavContributionGroupMissingDiagnostic[] { + return [...(this.navGroupDiagnostics.get(appName)?.values() ?? [])].filter( + (d): d is NavContributionGroupMissingDiagnostic => d.code === NAV_CONTRIBUTION_GROUP_MISSING, + ); } } + +/** + * [#39053] Record — and, the first time, announce — one contribution that + * named a retired group id and landed in `renamedTo`, the group listing that + * id in `renamedFrom`. + * + * Deduplicated per registry on the same map and for the same reason as + * `recordNavGroupMiss`: the fold runs on every read of the app. A module + * function rather than a facet method, because a facet method mirrors a + * `SchemaRegistry` method of the same name and this one has none. + */ +function recordNavGroupRename( + host: Pick, + appName: string, + c: { packageId?: string; group?: string; items: any[] }, + renamedTo: string, +): void { + const perApp = host.navGroupDiagnostics.get(appName) ?? new Map(); + const key = `renamed|${c.packageId ?? ''}|${c.group}`; + if (perApp.has(key)) return; + const diagnostic = navContributionGroupRenamedDiagnostic({ + app: appName, + group: String(c.group), + renamedTo, + ...(c.packageId === undefined ? {} : { packageId: c.packageId }), + items: c.items, + }); + perApp.set(key, diagnostic); + host.navGroupDiagnostics.set(appName, perApp); + host.warn(formatNavContributionGroupDiagnostic(diagnostic)); +} diff --git a/packages/platform-objects/src/apps/setup-nav.contributions.ts b/packages/platform-objects/src/apps/setup-nav.contributions.ts index afb2b60cf11..cc0970ab904 100644 --- a/packages/platform-objects/src/apps/setup-nav.contributions.ts +++ b/packages/platform-objects/src/apps/setup-nav.contributions.ts @@ -30,15 +30,11 @@ const BASE_PRIORITY = 100; // marketplace plugins (cloud ADR-0009: the nav lives and dies with the // capability — no plugin, no entry). What is installed is listed by this // package's own Packages entry below (objectstack#36834). +// +// The System Overview entry is not contributed: it is the pinned top item of +// `setup.app.ts` itself (#39053), because a contribution without `group` is +// appended at the end of the top level and cannot pin itself. export const SETUP_NAV_CONTRIBUTIONS: NavigationContribution[] = [ - { - app: 'setup', - group: 'group_overview', - priority: BASE_PRIORITY, - items: [ - { id: 'nav_system_overview', type: 'dashboard', label: 'System Overview', dashboardName: 'system_overview', icon: 'activity' }, - ], - }, { app: 'setup', group: 'group_apps', diff --git a/packages/platform-objects/src/apps/setup.app.ts b/packages/platform-objects/src/apps/setup.app.ts index 6c11784d989..d5e897e224e 100644 --- a/packages/platform-objects/src/apps/setup.app.ts +++ b/packages/platform-objects/src/apps/setup.app.ts @@ -13,7 +13,7 @@ * `SETUP_NAV_CONTRIBUTIONS` (see `setup-nav.contributions.ts`), registered * alongside this app. * - Items owned by a capability plugin are contributed by that plugin — e.g. - * `@objectstack/plugin-webhooks` fills `group_integrations` with its + * `@objectstack/plugin-webhooks` fills `group_integrations_dev` with its * `sys_webhook` entry (ADR-0029 K2.a). * * The runtime merges all contributions into this app's `navigation` tree by @@ -45,57 +45,70 @@ export const SETUP_APP: App = { primaryColor: '#475569', // Slate-600 — neutral admin palette }, requiredPermissions: ['setup.access'], - // Shell only — the stable group anchors. Children are supplied by - // `navigationContributions` from the packages that own the objects. + // Shell only — the pinned overview entry and the stable group anchors. + // Children are supplied by `navigationContributions` from the packages that + // own the objects. + // + // [#39053, epic #39050 ruling D1] Ten groups, in the ruled order: the first + // five (day-to-day administration) open by default, the last five (set once) + // start closed. Every group id was replaced; each retired id survives only in + // the `renamedFrom` of the group that took it over, so a third-party + // contribution still naming it lands there, and the contributing package is + // warned (`nav_contribution_group_renamed`) to name the new id. Each retired + // id maps to exactly one group. `group_overview` maps to none: its one entry + // is the pinned item below, and a contribution into it moves to the top + // level with the missing-group warning. navigation: [ + // Pinned at the top, outside every group. Written here because a + // contribution without `group` is appended at the END of the top level, so + // it cannot pin itself. It carries the gate `group_overview` gave it. { - id: 'group_overview', - type: 'group', - label: 'Overview', - icon: 'layout-dashboard', + id: 'nav_system_overview', + type: 'dashboard', + label: 'System Overview', + dashboardName: 'system_overview', + icon: 'activity', requiredPermissions: ['manage_platform_settings'], - children: [], - }, - { - id: 'group_apps', - type: 'group', - label: 'Apps', - icon: 'package', - children: [], }, { - id: 'group_people_org', + id: 'group_users_org', type: 'group', - label: 'People & Organization', + label: 'Users & Organization', icon: 'users', + renamedFrom: ['group_people_org'], children: [], }, { - id: 'group_access_control', + id: 'group_access_sharing', type: 'group', - label: 'Access Control', + label: 'Access & Sharing', icon: 'shield', + renamedFrom: ['group_access_control'], children: [], }, { - id: 'group_approvals', + id: 'group_apps_ai', type: 'group', - label: 'Approvals', - icon: 'check-circle', - requiredPermissions: ['manage_platform_settings'], + label: 'Apps & AI', + icon: 'package', + renamedFrom: ['group_apps'], children: [], }, { - id: 'group_configuration', + id: 'group_routing_approvals', type: 'group', - label: 'Configuration', - icon: 'sliders-horizontal', + label: 'Routing & Approvals', + icon: 'check-circle', + // The gate `group_approvals` carried, kept so the entries landing here + // through `renamedFrom` are served to exactly the members they were. + requiredPermissions: ['manage_platform_settings'], + renamedFrom: ['group_approvals'], children: [], }, { - id: 'group_diagnostics', + id: 'group_audit_data', type: 'group', - label: 'Diagnostics', + label: 'Audit & Data', icon: 'stethoscope', // No group gate: each entry carries its own. A group's // `requiredPermissions` prunes its whole subtree before any child is @@ -103,28 +116,55 @@ export const SETUP_APP: App = { // console's sidebar guard alike), so a group gate here hid the Audit // Log entry from a holder of `view_all_audit_log`, its own read // capability, who does not also hold `manage_platform_settings` — the - // separation-of-duties auditor. The gate moved down onto the entries - // that need it (`setup-nav.contributions.ts`; `@objectstack/plugin-audit` - // gates its entry on `view_all_audit_log`), as `group_configuration` - // already does. ⛔ A contributor into this slot gates its own entry: the - // slot no longer gates it. + // separation-of-duties auditor. The gate sits on the entries that need + // it (`setup-nav.contributions.ts`; `@objectstack/plugin-audit` gates + // its entry on `view_all_audit_log`). ⛔ A contributor into this slot + // gates its own entry: the slot does not gate it. + renamedFrom: ['group_diagnostics'], children: [], }, { - id: 'group_integrations', + id: 'group_company', type: 'group', - label: 'Integrations', - icon: 'plug', - requiredPermissions: ['manage_platform_settings'], + label: 'Company Settings', + icon: 'building-2', + expanded: false, + renamedFrom: ['group_configuration'], children: [], }, { - id: 'group_advanced', + id: 'group_currency_units', type: 'group', - label: 'Advanced', - icon: 'wrench', + label: 'Currency & Units', + icon: 'coins', + expanded: false, + children: [], + }, + { + id: 'group_notifications', + type: 'group', + label: 'Notifications', + icon: 'bell', + expanded: false, + children: [], + }, + { + id: 'group_login_security', + type: 'group', + label: 'Login & Security', + icon: 'lock-keyhole', + expanded: false, + children: [], + }, + { + id: 'group_integrations_dev', + type: 'group', + label: 'Integrations & Developer', + icon: 'plug', expanded: false, + // The gate both retired groups carried. requiredPermissions: ['manage_platform_settings'], + renamedFrom: ['group_integrations', 'group_advanced'], children: [], }, ], diff --git a/packages/platform-objects/src/apps/translations/ar.source-hashes.ts b/packages/platform-objects/src/apps/translations/ar.source-hashes.ts index 1f6b04eff03..84b391bfe65 100644 --- a/packages/platform-objects/src/apps/translations/ar.source-hashes.ts +++ b/packages/platform-objects/src/apps/translations/ar.source-hashes.ts @@ -71,18 +71,19 @@ export const arSourceHashes: Readonly> = { 'apps.account.navigation.nav_connect_agent.label': 'a4542422fb5e8a68', 'apps.setup.label': 'e4bb0d8bcd47c273', 'apps.setup.description': 'deacdfc679232a4a', - 'apps.setup.navigation.group_overview.label': 'eebdbe1cc7b59cdf', - 'apps.setup.navigation.group_apps.label': '699b367291abcbe6', + 'apps.setup.navigation.group_users_org.label': '0319b6b83dc6d419', + 'apps.setup.navigation.group_access_sharing.label': '1b327a86538c8799', + 'apps.setup.navigation.group_apps_ai.label': '9a72ed19ba9c78b5', + 'apps.setup.navigation.group_routing_approvals.label': 'f4c3fc86150a067a', + 'apps.setup.navigation.group_audit_data.label': '907b6f0bb492a8b7', + 'apps.setup.navigation.group_company.label': '51357bad83fcaa20', + 'apps.setup.navigation.group_currency_units.label': '05f3d81d414dfc78', + 'apps.setup.navigation.group_notifications.label': 'e0fdb90b1d31078d', + 'apps.setup.navigation.group_login_security.label': 'c20a3fe111222f9d', + 'apps.setup.navigation.group_integrations_dev.label': '108f3557a21159e3', 'apps.setup.navigation.nav_marketplace_browse.label': '2afbe021f5419fdd', 'apps.setup.navigation.nav_packages.label': '8cd8f29658025f73', 'apps.setup.navigation.nav_cloud_connection.label': '3a7caad0cb98e71d', - 'apps.setup.navigation.group_people_org.label': 'd313f656b6f0ab65', - 'apps.setup.navigation.group_access_control.label': 'a1a4dd47bcbfaf67', - 'apps.setup.navigation.group_approvals.label': '318a820df22a684b', - 'apps.setup.navigation.group_configuration.label': '5e77c0af10f4252c', - 'apps.setup.navigation.group_integrations.label': '1c83392f57463173', - 'apps.setup.navigation.group_diagnostics.label': '62d648cd434b395c', - 'apps.setup.navigation.group_advanced.label': 'bc9e9a0da37ea229', 'apps.setup.navigation.nav_system_overview.label': '574b2a4b7fb7f979', 'apps.setup.navigation.nav_connect_agent.label': 'a4542422fb5e8a68', 'apps.setup.navigation.nav_users.label': 'eee81f7307a66c40', diff --git a/packages/platform-objects/src/apps/translations/ar.ts b/packages/platform-objects/src/apps/translations/ar.ts index fb0b41fdef1..1c19fb58896 100644 --- a/packages/platform-objects/src/apps/translations/ar.ts +++ b/packages/platform-objects/src/apps/translations/ar.ts @@ -40,18 +40,19 @@ export const ar: TranslationData = { label: 'الإعداد', description: 'إعدادات المنصة وإدارتها', navigation: { - group_overview: { label: 'نظرة عامة' }, - group_apps: { label: 'التطبيقات' }, + group_users_org: { label: 'المستخدمون والمؤسسة' }, + group_access_sharing: { label: 'الوصول والمشاركة' }, + group_apps_ai: { label: 'التطبيقات والذكاء الاصطناعي' }, + group_routing_approvals: { label: 'التوزيع والموافقات' }, + group_audit_data: { label: 'التدقيق والبيانات' }, + group_company: { label: 'إعدادات الشركة' }, + group_currency_units: { label: 'العملات والوحدات' }, + group_notifications: { label: 'الإشعارات' }, + group_login_security: { label: 'تسجيل الدخول والأمان' }, + group_integrations_dev: { label: 'التكاملات والتطوير' }, nav_marketplace_browse: { label: 'تصفح السوق' }, nav_packages: { label: 'الحزم' }, nav_cloud_connection: { label: 'الاتصال السحابي' }, - group_people_org: { label: 'الأشخاص والمؤسسة' }, - group_access_control: { label: 'التحكم في الوصول' }, - group_approvals: { label: 'الموافقات' }, - group_configuration: { label: 'التهيئة' }, - group_integrations: { label: 'عمليات التكامل' }, - group_diagnostics: { label: 'التشخيص' }, - group_advanced: { label: 'متقدم' }, nav_system_overview: { label: 'نظرة عامة على النظام' }, nav_connect_agent: { label: 'ربط مساعد ذكاء اصطناعي' }, diff --git a/packages/platform-objects/src/apps/translations/de.source-hashes.ts b/packages/platform-objects/src/apps/translations/de.source-hashes.ts index 7beb9517e63..af7ba2bb414 100644 --- a/packages/platform-objects/src/apps/translations/de.source-hashes.ts +++ b/packages/platform-objects/src/apps/translations/de.source-hashes.ts @@ -71,18 +71,19 @@ export const deSourceHashes: Readonly> = { 'apps.account.navigation.nav_connect_agent.label': 'a4542422fb5e8a68', 'apps.setup.label': 'e4bb0d8bcd47c273', 'apps.setup.description': 'deacdfc679232a4a', - 'apps.setup.navigation.group_overview.label': 'eebdbe1cc7b59cdf', - 'apps.setup.navigation.group_apps.label': '699b367291abcbe6', + 'apps.setup.navigation.group_users_org.label': '0319b6b83dc6d419', + 'apps.setup.navigation.group_access_sharing.label': '1b327a86538c8799', + 'apps.setup.navigation.group_apps_ai.label': '9a72ed19ba9c78b5', + 'apps.setup.navigation.group_routing_approvals.label': 'f4c3fc86150a067a', + 'apps.setup.navigation.group_audit_data.label': '907b6f0bb492a8b7', + 'apps.setup.navigation.group_company.label': '51357bad83fcaa20', + 'apps.setup.navigation.group_currency_units.label': '05f3d81d414dfc78', + 'apps.setup.navigation.group_notifications.label': 'e0fdb90b1d31078d', + 'apps.setup.navigation.group_login_security.label': 'c20a3fe111222f9d', + 'apps.setup.navigation.group_integrations_dev.label': '108f3557a21159e3', 'apps.setup.navigation.nav_marketplace_browse.label': '2afbe021f5419fdd', 'apps.setup.navigation.nav_packages.label': '8cd8f29658025f73', 'apps.setup.navigation.nav_cloud_connection.label': '3a7caad0cb98e71d', - 'apps.setup.navigation.group_people_org.label': 'd313f656b6f0ab65', - 'apps.setup.navigation.group_access_control.label': 'a1a4dd47bcbfaf67', - 'apps.setup.navigation.group_approvals.label': '318a820df22a684b', - 'apps.setup.navigation.group_configuration.label': '5e77c0af10f4252c', - 'apps.setup.navigation.group_integrations.label': '1c83392f57463173', - 'apps.setup.navigation.group_diagnostics.label': '62d648cd434b395c', - 'apps.setup.navigation.group_advanced.label': 'bc9e9a0da37ea229', 'apps.setup.navigation.nav_system_overview.label': '574b2a4b7fb7f979', 'apps.setup.navigation.nav_connect_agent.label': 'a4542422fb5e8a68', 'apps.setup.navigation.nav_users.label': 'eee81f7307a66c40', diff --git a/packages/platform-objects/src/apps/translations/de.ts b/packages/platform-objects/src/apps/translations/de.ts index 792dd8a8df8..8af6234784f 100644 --- a/packages/platform-objects/src/apps/translations/de.ts +++ b/packages/platform-objects/src/apps/translations/de.ts @@ -40,18 +40,19 @@ export const de: TranslationData = { label: 'Setup', description: 'Plattformeinstellungen und Administration', navigation: { - group_overview: { label: 'Übersicht' }, - group_apps: { label: 'Apps' }, + group_users_org: { label: 'Benutzer & Organisation' }, + group_access_sharing: { label: 'Zugriff & Freigabe' }, + group_apps_ai: { label: 'Apps & KI' }, + group_routing_approvals: { label: 'Zuweisung & Genehmigungen' }, + group_audit_data: { label: 'Audit & Daten' }, + group_company: { label: 'Unternehmenseinstellungen' }, + group_currency_units: { label: 'Währungen & Einheiten' }, + group_notifications: { label: 'Benachrichtigungen' }, + group_login_security: { label: 'Anmeldung & Sicherheit' }, + group_integrations_dev: { label: 'Integrationen & Entwicklung' }, nav_marketplace_browse: { label: 'Marketplace durchsuchen' }, nav_packages: { label: 'Pakete' }, nav_cloud_connection: { label: 'Cloud-Verbindung' }, - group_people_org: { label: 'Personen und Organisation' }, - group_access_control: { label: 'Zugriffssteuerung' }, - group_approvals: { label: 'Genehmigungen' }, - group_configuration: { label: 'Konfiguration' }, - group_integrations: { label: 'Integrationen' }, - group_diagnostics: { label: 'Diagnose' }, - group_advanced: { label: 'Erweitert' }, nav_system_overview: { label: 'Systemübersicht' }, nav_connect_agent: { label: 'KI-Assistenten verbinden' }, diff --git a/packages/platform-objects/src/apps/translations/en.ts b/packages/platform-objects/src/apps/translations/en.ts index e3ba6bb88a1..b6cb43e43c5 100644 --- a/packages/platform-objects/src/apps/translations/en.ts +++ b/packages/platform-objects/src/apps/translations/en.ts @@ -62,15 +62,16 @@ export const en: TranslationData = { description: 'Platform settings and administration', navigation: { // Groups - group_overview: { label: 'Overview' }, - group_apps: { label: 'Apps' }, - group_people_org: { label: 'People & Organization' }, - group_access_control: { label: 'Access Control' }, - group_approvals: { label: 'Approvals' }, - group_configuration: { label: 'Configuration' }, - group_integrations: { label: 'Integrations' }, - group_diagnostics: { label: 'Diagnostics' }, - group_advanced: { label: 'Advanced' }, + group_users_org: { label: 'Users & Organization' }, + group_access_sharing: { label: 'Access & Sharing' }, + group_apps_ai: { label: 'Apps & AI' }, + group_routing_approvals: { label: 'Routing & Approvals' }, + group_audit_data: { label: 'Audit & Data' }, + group_company: { label: 'Company Settings' }, + group_currency_units: { label: 'Currency & Units' }, + group_notifications: { label: 'Notifications' }, + group_login_security: { label: 'Login & Security' }, + group_integrations_dev: { label: 'Integrations & Developer' }, // Overview nav_system_overview: { label: 'System Overview' }, diff --git a/packages/platform-objects/src/apps/translations/es-ES.source-hashes.ts b/packages/platform-objects/src/apps/translations/es-ES.source-hashes.ts index 82490f1639d..36df316ab2c 100644 --- a/packages/platform-objects/src/apps/translations/es-ES.source-hashes.ts +++ b/packages/platform-objects/src/apps/translations/es-ES.source-hashes.ts @@ -70,18 +70,19 @@ export const esESSourceHashes: Readonly> = { 'apps.account.navigation.nav_connect_agent.label': 'a4542422fb5e8a68', 'apps.setup.label': 'e4bb0d8bcd47c273', 'apps.setup.description': 'deacdfc679232a4a', - 'apps.setup.navigation.group_overview.label': 'eebdbe1cc7b59cdf', - 'apps.setup.navigation.group_apps.label': '699b367291abcbe6', + 'apps.setup.navigation.group_users_org.label': '0319b6b83dc6d419', + 'apps.setup.navigation.group_access_sharing.label': '1b327a86538c8799', + 'apps.setup.navigation.group_apps_ai.label': '9a72ed19ba9c78b5', + 'apps.setup.navigation.group_routing_approvals.label': 'f4c3fc86150a067a', + 'apps.setup.navigation.group_audit_data.label': '907b6f0bb492a8b7', + 'apps.setup.navigation.group_company.label': '51357bad83fcaa20', + 'apps.setup.navigation.group_currency_units.label': '05f3d81d414dfc78', + 'apps.setup.navigation.group_notifications.label': 'e0fdb90b1d31078d', + 'apps.setup.navigation.group_login_security.label': 'c20a3fe111222f9d', + 'apps.setup.navigation.group_integrations_dev.label': '108f3557a21159e3', 'apps.setup.navigation.nav_marketplace_browse.label': '2afbe021f5419fdd', 'apps.setup.navigation.nav_packages.label': '8cd8f29658025f73', 'apps.setup.navigation.nav_cloud_connection.label': '3a7caad0cb98e71d', - 'apps.setup.navigation.group_people_org.label': 'd313f656b6f0ab65', - 'apps.setup.navigation.group_access_control.label': 'a1a4dd47bcbfaf67', - 'apps.setup.navigation.group_approvals.label': '318a820df22a684b', - 'apps.setup.navigation.group_configuration.label': '5e77c0af10f4252c', - 'apps.setup.navigation.group_integrations.label': '1c83392f57463173', - 'apps.setup.navigation.group_diagnostics.label': '62d648cd434b395c', - 'apps.setup.navigation.group_advanced.label': 'bc9e9a0da37ea229', 'apps.setup.navigation.nav_system_overview.label': '574b2a4b7fb7f979', 'apps.setup.navigation.nav_users.label': 'eee81f7307a66c40', 'apps.setup.navigation.nav_organization.label': '3e55836156e1c1de', diff --git a/packages/platform-objects/src/apps/translations/es-ES.ts b/packages/platform-objects/src/apps/translations/es-ES.ts index ab961c19588..2267ff41fa0 100644 --- a/packages/platform-objects/src/apps/translations/es-ES.ts +++ b/packages/platform-objects/src/apps/translations/es-ES.ts @@ -40,18 +40,19 @@ export const esES: TranslationData = { label: 'Configuración', description: 'Configuración y administración de la plataforma', navigation: { - group_overview: { label: 'Resumen' }, - group_apps: { label: 'Aplicaciones' }, + group_users_org: { label: 'Usuarios y organización' }, + group_access_sharing: { label: 'Acceso y uso compartido' }, + group_apps_ai: { label: 'Aplicaciones e IA' }, + group_routing_approvals: { label: 'Asignación y aprobaciones' }, + group_audit_data: { label: 'Auditoría y datos' }, + group_company: { label: 'Configuración de la empresa' }, + group_currency_units: { label: 'Monedas y unidades' }, + group_notifications: { label: 'Notificaciones' }, + group_login_security: { label: 'Inicio de sesión y seguridad' }, + group_integrations_dev: { label: 'Integraciones y desarrollo' }, nav_marketplace_browse: { label: 'Explorar Marketplace' }, nav_packages: { label: 'Paquetes' }, nav_cloud_connection: { label: 'Conexión a la nube' }, - group_people_org: { label: 'Personas y Organización' }, - group_access_control: { label: 'Control de Acceso' }, - group_approvals: { label: 'Aprobaciones' }, - group_configuration: { label: 'Configuración' }, - group_integrations: { label: 'Integraciones' }, - group_diagnostics: { label: 'Diagnóstico' }, - group_advanced: { label: 'Avanzado' }, nav_system_overview: { label: 'Resumen del Sistema' }, nav_connect_agent: { label: 'Conectar un asistente de IA' }, diff --git a/packages/platform-objects/src/apps/translations/fr.source-hashes.ts b/packages/platform-objects/src/apps/translations/fr.source-hashes.ts index c26eaae19ee..b8a52565021 100644 --- a/packages/platform-objects/src/apps/translations/fr.source-hashes.ts +++ b/packages/platform-objects/src/apps/translations/fr.source-hashes.ts @@ -71,18 +71,19 @@ export const frSourceHashes: Readonly> = { 'apps.account.navigation.nav_connect_agent.label': 'a4542422fb5e8a68', 'apps.setup.label': 'e4bb0d8bcd47c273', 'apps.setup.description': 'deacdfc679232a4a', - 'apps.setup.navigation.group_overview.label': 'eebdbe1cc7b59cdf', - 'apps.setup.navigation.group_apps.label': '699b367291abcbe6', + 'apps.setup.navigation.group_users_org.label': '0319b6b83dc6d419', + 'apps.setup.navigation.group_access_sharing.label': '1b327a86538c8799', + 'apps.setup.navigation.group_apps_ai.label': '9a72ed19ba9c78b5', + 'apps.setup.navigation.group_routing_approvals.label': 'f4c3fc86150a067a', + 'apps.setup.navigation.group_audit_data.label': '907b6f0bb492a8b7', + 'apps.setup.navigation.group_company.label': '51357bad83fcaa20', + 'apps.setup.navigation.group_currency_units.label': '05f3d81d414dfc78', + 'apps.setup.navigation.group_notifications.label': 'e0fdb90b1d31078d', + 'apps.setup.navigation.group_login_security.label': 'c20a3fe111222f9d', + 'apps.setup.navigation.group_integrations_dev.label': '108f3557a21159e3', 'apps.setup.navigation.nav_marketplace_browse.label': '2afbe021f5419fdd', 'apps.setup.navigation.nav_packages.label': '8cd8f29658025f73', 'apps.setup.navigation.nav_cloud_connection.label': '3a7caad0cb98e71d', - 'apps.setup.navigation.group_people_org.label': 'd313f656b6f0ab65', - 'apps.setup.navigation.group_access_control.label': 'a1a4dd47bcbfaf67', - 'apps.setup.navigation.group_approvals.label': '318a820df22a684b', - 'apps.setup.navigation.group_configuration.label': '5e77c0af10f4252c', - 'apps.setup.navigation.group_integrations.label': '1c83392f57463173', - 'apps.setup.navigation.group_diagnostics.label': '62d648cd434b395c', - 'apps.setup.navigation.group_advanced.label': 'bc9e9a0da37ea229', 'apps.setup.navigation.nav_system_overview.label': '574b2a4b7fb7f979', 'apps.setup.navigation.nav_connect_agent.label': 'a4542422fb5e8a68', 'apps.setup.navigation.nav_users.label': 'eee81f7307a66c40', diff --git a/packages/platform-objects/src/apps/translations/fr.ts b/packages/platform-objects/src/apps/translations/fr.ts index 71b9b02fa85..4b0351d7579 100644 --- a/packages/platform-objects/src/apps/translations/fr.ts +++ b/packages/platform-objects/src/apps/translations/fr.ts @@ -40,18 +40,19 @@ export const fr: TranslationData = { label: 'Configuration', description: 'Paramètres et administration de la plateforme', navigation: { - group_overview: { label: 'Aperçu' }, - group_apps: { label: 'Applications' }, + group_users_org: { label: 'Utilisateurs et organisation' }, + group_access_sharing: { label: 'Accès et partage' }, + group_apps_ai: { label: 'Applications et IA' }, + group_routing_approvals: { label: 'Affectation et approbations' }, + group_audit_data: { label: 'Audit et données' }, + group_company: { label: 'Paramètres de l’entreprise' }, + group_currency_units: { label: 'Devises et unités' }, + group_notifications: { label: 'Notifications' }, + group_login_security: { label: 'Connexion et sécurité' }, + group_integrations_dev: { label: 'Intégrations et développement' }, nav_marketplace_browse: { label: 'Parcourir la Marketplace' }, nav_packages: { label: 'Packages' }, nav_cloud_connection: { label: 'Connexion au cloud' }, - group_people_org: { label: 'Personnes et organisation' }, - group_access_control: { label: 'Contrôle d’accès' }, - group_approvals: { label: 'Approbations' }, - group_configuration: { label: 'Configuration' }, - group_integrations: { label: 'Intégrations' }, - group_diagnostics: { label: 'Diagnostics' }, - group_advanced: { label: 'Avancé' }, nav_system_overview: { label: 'Aperçu du système' }, nav_connect_agent: { label: 'Connecter un assistant IA' }, diff --git a/packages/platform-objects/src/apps/translations/ja-JP.source-hashes.ts b/packages/platform-objects/src/apps/translations/ja-JP.source-hashes.ts index 22759fc409b..85f5aaae67f 100644 --- a/packages/platform-objects/src/apps/translations/ja-JP.source-hashes.ts +++ b/packages/platform-objects/src/apps/translations/ja-JP.source-hashes.ts @@ -70,18 +70,19 @@ export const jaJPSourceHashes: Readonly> = { 'apps.account.navigation.nav_connect_agent.label': 'a4542422fb5e8a68', 'apps.setup.label': 'e4bb0d8bcd47c273', 'apps.setup.description': 'deacdfc679232a4a', - 'apps.setup.navigation.group_overview.label': 'eebdbe1cc7b59cdf', - 'apps.setup.navigation.group_apps.label': '699b367291abcbe6', + 'apps.setup.navigation.group_users_org.label': '0319b6b83dc6d419', + 'apps.setup.navigation.group_access_sharing.label': '1b327a86538c8799', + 'apps.setup.navigation.group_apps_ai.label': '9a72ed19ba9c78b5', + 'apps.setup.navigation.group_routing_approvals.label': 'f4c3fc86150a067a', + 'apps.setup.navigation.group_audit_data.label': '907b6f0bb492a8b7', + 'apps.setup.navigation.group_company.label': '51357bad83fcaa20', + 'apps.setup.navigation.group_currency_units.label': '05f3d81d414dfc78', + 'apps.setup.navigation.group_notifications.label': 'e0fdb90b1d31078d', + 'apps.setup.navigation.group_login_security.label': 'c20a3fe111222f9d', + 'apps.setup.navigation.group_integrations_dev.label': '108f3557a21159e3', 'apps.setup.navigation.nav_marketplace_browse.label': '2afbe021f5419fdd', 'apps.setup.navigation.nav_packages.label': '8cd8f29658025f73', 'apps.setup.navigation.nav_cloud_connection.label': '3a7caad0cb98e71d', - 'apps.setup.navigation.group_people_org.label': 'd313f656b6f0ab65', - 'apps.setup.navigation.group_access_control.label': 'a1a4dd47bcbfaf67', - 'apps.setup.navigation.group_approvals.label': '318a820df22a684b', - 'apps.setup.navigation.group_configuration.label': '5e77c0af10f4252c', - 'apps.setup.navigation.group_integrations.label': '1c83392f57463173', - 'apps.setup.navigation.group_diagnostics.label': '62d648cd434b395c', - 'apps.setup.navigation.group_advanced.label': 'bc9e9a0da37ea229', 'apps.setup.navigation.nav_system_overview.label': '574b2a4b7fb7f979', 'apps.setup.navigation.nav_users.label': 'eee81f7307a66c40', 'apps.setup.navigation.nav_organization.label': '3e55836156e1c1de', diff --git a/packages/platform-objects/src/apps/translations/ja-JP.ts b/packages/platform-objects/src/apps/translations/ja-JP.ts index 1117b5d0ada..bf48f629be8 100644 --- a/packages/platform-objects/src/apps/translations/ja-JP.ts +++ b/packages/platform-objects/src/apps/translations/ja-JP.ts @@ -40,18 +40,19 @@ export const jaJP: TranslationData = { label: 'セットアップ', description: 'プラットフォーム設定と管理', navigation: { - group_overview: { label: '概要' }, - group_apps: { label: 'アプリ' }, + group_users_org: { label: 'ユーザーと組織' }, + group_access_sharing: { label: 'アクセスと共有' }, + group_apps_ai: { label: 'アプリと AI' }, + group_routing_approvals: { label: '割り当てと承認' }, + group_audit_data: { label: '監査とデータ' }, + group_company: { label: '会社設定' }, + group_currency_units: { label: '通貨と単位' }, + group_notifications: { label: '通知' }, + group_login_security: { label: 'ログインとセキュリティ' }, + group_integrations_dev: { label: '連携と開発' }, nav_marketplace_browse: { label: 'マーケットプレイスを閲覧' }, nav_packages: { label: 'パッケージ' }, nav_cloud_connection: { label: 'クラウド接続' }, - group_people_org: { label: 'ユーザーと組織' }, - group_access_control: { label: 'アクセス制御' }, - group_approvals: { label: '承認' }, - group_configuration: { label: '構成' }, - group_integrations: { label: '統合' }, - group_diagnostics: { label: '診断' }, - group_advanced: { label: '詳細' }, nav_system_overview: { label: 'システム概要' }, nav_connect_agent: { label: 'AI アシスタントを接続' }, diff --git a/packages/platform-objects/src/apps/translations/ko.source-hashes.ts b/packages/platform-objects/src/apps/translations/ko.source-hashes.ts index d70aa56d4e2..222a3a2d960 100644 --- a/packages/platform-objects/src/apps/translations/ko.source-hashes.ts +++ b/packages/platform-objects/src/apps/translations/ko.source-hashes.ts @@ -71,18 +71,19 @@ export const koSourceHashes: Readonly> = { 'apps.account.navigation.nav_connect_agent.label': 'a4542422fb5e8a68', 'apps.setup.label': 'e4bb0d8bcd47c273', 'apps.setup.description': 'deacdfc679232a4a', - 'apps.setup.navigation.group_overview.label': 'eebdbe1cc7b59cdf', - 'apps.setup.navigation.group_apps.label': '699b367291abcbe6', + 'apps.setup.navigation.group_users_org.label': '0319b6b83dc6d419', + 'apps.setup.navigation.group_access_sharing.label': '1b327a86538c8799', + 'apps.setup.navigation.group_apps_ai.label': '9a72ed19ba9c78b5', + 'apps.setup.navigation.group_routing_approvals.label': 'f4c3fc86150a067a', + 'apps.setup.navigation.group_audit_data.label': '907b6f0bb492a8b7', + 'apps.setup.navigation.group_company.label': '51357bad83fcaa20', + 'apps.setup.navigation.group_currency_units.label': '05f3d81d414dfc78', + 'apps.setup.navigation.group_notifications.label': 'e0fdb90b1d31078d', + 'apps.setup.navigation.group_login_security.label': 'c20a3fe111222f9d', + 'apps.setup.navigation.group_integrations_dev.label': '108f3557a21159e3', 'apps.setup.navigation.nav_marketplace_browse.label': '2afbe021f5419fdd', 'apps.setup.navigation.nav_packages.label': '8cd8f29658025f73', 'apps.setup.navigation.nav_cloud_connection.label': '3a7caad0cb98e71d', - 'apps.setup.navigation.group_people_org.label': 'd313f656b6f0ab65', - 'apps.setup.navigation.group_access_control.label': 'a1a4dd47bcbfaf67', - 'apps.setup.navigation.group_approvals.label': '318a820df22a684b', - 'apps.setup.navigation.group_configuration.label': '5e77c0af10f4252c', - 'apps.setup.navigation.group_integrations.label': '1c83392f57463173', - 'apps.setup.navigation.group_diagnostics.label': '62d648cd434b395c', - 'apps.setup.navigation.group_advanced.label': 'bc9e9a0da37ea229', 'apps.setup.navigation.nav_system_overview.label': '574b2a4b7fb7f979', 'apps.setup.navigation.nav_connect_agent.label': 'a4542422fb5e8a68', 'apps.setup.navigation.nav_users.label': 'eee81f7307a66c40', diff --git a/packages/platform-objects/src/apps/translations/ko.ts b/packages/platform-objects/src/apps/translations/ko.ts index 61f2474c19c..e1a07a55375 100644 --- a/packages/platform-objects/src/apps/translations/ko.ts +++ b/packages/platform-objects/src/apps/translations/ko.ts @@ -40,18 +40,19 @@ export const ko: TranslationData = { label: '설정', description: '플랫폼 설정 및 관리', navigation: { - group_overview: { label: '개요' }, - group_apps: { label: '앱' }, + group_users_org: { label: '사용자 및 조직' }, + group_access_sharing: { label: '액세스 및 공유' }, + group_apps_ai: { label: '앱 및 AI' }, + group_routing_approvals: { label: '배정 및 승인' }, + group_audit_data: { label: '감사 및 데이터' }, + group_company: { label: '회사 설정' }, + group_currency_units: { label: '통화 및 단위' }, + group_notifications: { label: '알림' }, + group_login_security: { label: '로그인 및 보안' }, + group_integrations_dev: { label: '통합 및 개발' }, nav_marketplace_browse: { label: '마켓플레이스 둘러보기' }, nav_packages: { label: '패키지' }, nav_cloud_connection: { label: '클라우드 연결' }, - group_people_org: { label: '사용자 및 조직' }, - group_access_control: { label: '액세스 제어' }, - group_approvals: { label: '승인' }, - group_configuration: { label: '구성' }, - group_integrations: { label: '통합' }, - group_diagnostics: { label: '진단' }, - group_advanced: { label: '고급' }, nav_system_overview: { label: '시스템 개요' }, nav_connect_agent: { label: 'AI 어시스턴트 연결' }, diff --git a/packages/platform-objects/src/apps/translations/pt-BR.source-hashes.ts b/packages/platform-objects/src/apps/translations/pt-BR.source-hashes.ts index ac7f0d5b849..b52ed596175 100644 --- a/packages/platform-objects/src/apps/translations/pt-BR.source-hashes.ts +++ b/packages/platform-objects/src/apps/translations/pt-BR.source-hashes.ts @@ -71,18 +71,19 @@ export const ptBRSourceHashes: Readonly> = { 'apps.account.navigation.nav_connect_agent.label': 'a4542422fb5e8a68', 'apps.setup.label': 'e4bb0d8bcd47c273', 'apps.setup.description': 'deacdfc679232a4a', - 'apps.setup.navigation.group_overview.label': 'eebdbe1cc7b59cdf', - 'apps.setup.navigation.group_apps.label': '699b367291abcbe6', + 'apps.setup.navigation.group_users_org.label': '0319b6b83dc6d419', + 'apps.setup.navigation.group_access_sharing.label': '1b327a86538c8799', + 'apps.setup.navigation.group_apps_ai.label': '9a72ed19ba9c78b5', + 'apps.setup.navigation.group_routing_approvals.label': 'f4c3fc86150a067a', + 'apps.setup.navigation.group_audit_data.label': '907b6f0bb492a8b7', + 'apps.setup.navigation.group_company.label': '51357bad83fcaa20', + 'apps.setup.navigation.group_currency_units.label': '05f3d81d414dfc78', + 'apps.setup.navigation.group_notifications.label': 'e0fdb90b1d31078d', + 'apps.setup.navigation.group_login_security.label': 'c20a3fe111222f9d', + 'apps.setup.navigation.group_integrations_dev.label': '108f3557a21159e3', 'apps.setup.navigation.nav_marketplace_browse.label': '2afbe021f5419fdd', 'apps.setup.navigation.nav_packages.label': '8cd8f29658025f73', 'apps.setup.navigation.nav_cloud_connection.label': '3a7caad0cb98e71d', - 'apps.setup.navigation.group_people_org.label': 'd313f656b6f0ab65', - 'apps.setup.navigation.group_access_control.label': 'a1a4dd47bcbfaf67', - 'apps.setup.navigation.group_approvals.label': '318a820df22a684b', - 'apps.setup.navigation.group_configuration.label': '5e77c0af10f4252c', - 'apps.setup.navigation.group_integrations.label': '1c83392f57463173', - 'apps.setup.navigation.group_diagnostics.label': '62d648cd434b395c', - 'apps.setup.navigation.group_advanced.label': 'bc9e9a0da37ea229', 'apps.setup.navigation.nav_system_overview.label': '574b2a4b7fb7f979', 'apps.setup.navigation.nav_connect_agent.label': 'a4542422fb5e8a68', 'apps.setup.navigation.nav_users.label': 'eee81f7307a66c40', diff --git a/packages/platform-objects/src/apps/translations/pt-BR.ts b/packages/platform-objects/src/apps/translations/pt-BR.ts index 61197f64e47..8f55db31070 100644 --- a/packages/platform-objects/src/apps/translations/pt-BR.ts +++ b/packages/platform-objects/src/apps/translations/pt-BR.ts @@ -40,18 +40,19 @@ export const ptBR: TranslationData = { label: 'Configuração', description: 'Configurações e administração da plataforma', navigation: { - group_overview: { label: 'Visão geral' }, - group_apps: { label: 'Aplicativos' }, + group_users_org: { label: 'Usuários e organização' }, + group_access_sharing: { label: 'Acesso e compartilhamento' }, + group_apps_ai: { label: 'Apps e IA' }, + group_routing_approvals: { label: 'Atribuição e aprovações' }, + group_audit_data: { label: 'Auditoria e dados' }, + group_company: { label: 'Configurações da empresa' }, + group_currency_units: { label: 'Moedas e unidades' }, + group_notifications: { label: 'Notificações' }, + group_login_security: { label: 'Login e segurança' }, + group_integrations_dev: { label: 'Integrações e desenvolvimento' }, nav_marketplace_browse: { label: 'Explorar o Marketplace' }, nav_packages: { label: 'Pacotes' }, nav_cloud_connection: { label: 'Conexão com a nuvem' }, - group_people_org: { label: 'Pessoas e organização' }, - group_access_control: { label: 'Controle de acesso' }, - group_approvals: { label: 'Aprovações' }, - group_configuration: { label: 'Configuração' }, - group_integrations: { label: 'Integrações' }, - group_diagnostics: { label: 'Diagnóstico' }, - group_advanced: { label: 'Avançado' }, nav_system_overview: { label: 'Visão geral do sistema' }, nav_connect_agent: { label: 'Conectar um assistente de IA' }, diff --git a/packages/platform-objects/src/apps/translations/ru.source-hashes.ts b/packages/platform-objects/src/apps/translations/ru.source-hashes.ts index d1d84e7fb6f..3fb5b90443c 100644 --- a/packages/platform-objects/src/apps/translations/ru.source-hashes.ts +++ b/packages/platform-objects/src/apps/translations/ru.source-hashes.ts @@ -71,18 +71,19 @@ export const ruSourceHashes: Readonly> = { 'apps.account.navigation.nav_connect_agent.label': 'a4542422fb5e8a68', 'apps.setup.label': 'e4bb0d8bcd47c273', 'apps.setup.description': 'deacdfc679232a4a', - 'apps.setup.navigation.group_overview.label': 'eebdbe1cc7b59cdf', - 'apps.setup.navigation.group_apps.label': '699b367291abcbe6', + 'apps.setup.navigation.group_users_org.label': '0319b6b83dc6d419', + 'apps.setup.navigation.group_access_sharing.label': '1b327a86538c8799', + 'apps.setup.navigation.group_apps_ai.label': '9a72ed19ba9c78b5', + 'apps.setup.navigation.group_routing_approvals.label': 'f4c3fc86150a067a', + 'apps.setup.navigation.group_audit_data.label': '907b6f0bb492a8b7', + 'apps.setup.navigation.group_company.label': '51357bad83fcaa20', + 'apps.setup.navigation.group_currency_units.label': '05f3d81d414dfc78', + 'apps.setup.navigation.group_notifications.label': 'e0fdb90b1d31078d', + 'apps.setup.navigation.group_login_security.label': 'c20a3fe111222f9d', + 'apps.setup.navigation.group_integrations_dev.label': '108f3557a21159e3', 'apps.setup.navigation.nav_marketplace_browse.label': '2afbe021f5419fdd', 'apps.setup.navigation.nav_packages.label': '8cd8f29658025f73', 'apps.setup.navigation.nav_cloud_connection.label': '3a7caad0cb98e71d', - 'apps.setup.navigation.group_people_org.label': 'd313f656b6f0ab65', - 'apps.setup.navigation.group_access_control.label': 'a1a4dd47bcbfaf67', - 'apps.setup.navigation.group_approvals.label': '318a820df22a684b', - 'apps.setup.navigation.group_configuration.label': '5e77c0af10f4252c', - 'apps.setup.navigation.group_integrations.label': '1c83392f57463173', - 'apps.setup.navigation.group_diagnostics.label': '62d648cd434b395c', - 'apps.setup.navigation.group_advanced.label': 'bc9e9a0da37ea229', 'apps.setup.navigation.nav_system_overview.label': '574b2a4b7fb7f979', 'apps.setup.navigation.nav_connect_agent.label': 'a4542422fb5e8a68', 'apps.setup.navigation.nav_users.label': 'eee81f7307a66c40', diff --git a/packages/platform-objects/src/apps/translations/ru.ts b/packages/platform-objects/src/apps/translations/ru.ts index 5126553a8dd..2c7865151b9 100644 --- a/packages/platform-objects/src/apps/translations/ru.ts +++ b/packages/platform-objects/src/apps/translations/ru.ts @@ -40,18 +40,19 @@ export const ru: TranslationData = { label: 'Настройка', description: 'Настройки и администрирование платформы', navigation: { - group_overview: { label: 'Обзор' }, - group_apps: { label: 'Приложения' }, + group_users_org: { label: 'Пользователи и организация' }, + group_access_sharing: { label: 'Доступ и совместное использование' }, + group_apps_ai: { label: 'Приложения и ИИ' }, + group_routing_approvals: { label: 'Назначение и согласования' }, + group_audit_data: { label: 'Аудит и данные' }, + group_company: { label: 'Настройки компании' }, + group_currency_units: { label: 'Валюты и единицы' }, + group_notifications: { label: 'Уведомления' }, + group_login_security: { label: 'Вход и безопасность' }, + group_integrations_dev: { label: 'Интеграции и разработка' }, nav_marketplace_browse: { label: 'Обзор Marketplace' }, nav_packages: { label: 'Пакеты' }, nav_cloud_connection: { label: 'Подключение к облаку' }, - group_people_org: { label: 'Люди и организация' }, - group_access_control: { label: 'Управление доступом' }, - group_approvals: { label: 'Согласования' }, - group_configuration: { label: 'Конфигурация' }, - group_integrations: { label: 'Интеграции' }, - group_diagnostics: { label: 'Диагностика' }, - group_advanced: { label: 'Дополнительно' }, nav_system_overview: { label: 'Обзор системы' }, nav_connect_agent: { label: 'Подключить ИИ-ассистента' }, diff --git a/packages/platform-objects/src/apps/translations/zh-CN.source-hashes.ts b/packages/platform-objects/src/apps/translations/zh-CN.source-hashes.ts index 37bd167fa6e..42b180729b9 100644 --- a/packages/platform-objects/src/apps/translations/zh-CN.source-hashes.ts +++ b/packages/platform-objects/src/apps/translations/zh-CN.source-hashes.ts @@ -70,18 +70,19 @@ export const zhCNSourceHashes: Readonly> = { 'apps.account.navigation.nav_connect_agent.label': 'a4542422fb5e8a68', 'apps.setup.label': 'e4bb0d8bcd47c273', 'apps.setup.description': 'deacdfc679232a4a', - 'apps.setup.navigation.group_overview.label': 'eebdbe1cc7b59cdf', - 'apps.setup.navigation.group_apps.label': '699b367291abcbe6', + 'apps.setup.navigation.group_users_org.label': '0319b6b83dc6d419', + 'apps.setup.navigation.group_access_sharing.label': '1b327a86538c8799', + 'apps.setup.navigation.group_apps_ai.label': '9a72ed19ba9c78b5', + 'apps.setup.navigation.group_routing_approvals.label': 'f4c3fc86150a067a', + 'apps.setup.navigation.group_audit_data.label': '907b6f0bb492a8b7', + 'apps.setup.navigation.group_company.label': '51357bad83fcaa20', + 'apps.setup.navigation.group_currency_units.label': '05f3d81d414dfc78', + 'apps.setup.navigation.group_notifications.label': 'e0fdb90b1d31078d', + 'apps.setup.navigation.group_login_security.label': 'c20a3fe111222f9d', + 'apps.setup.navigation.group_integrations_dev.label': '108f3557a21159e3', 'apps.setup.navigation.nav_marketplace_browse.label': '2afbe021f5419fdd', 'apps.setup.navigation.nav_packages.label': '8cd8f29658025f73', 'apps.setup.navigation.nav_cloud_connection.label': '3a7caad0cb98e71d', - 'apps.setup.navigation.group_people_org.label': 'd313f656b6f0ab65', - 'apps.setup.navigation.group_access_control.label': 'a1a4dd47bcbfaf67', - 'apps.setup.navigation.group_approvals.label': '318a820df22a684b', - 'apps.setup.navigation.group_configuration.label': '5e77c0af10f4252c', - 'apps.setup.navigation.group_integrations.label': '1c83392f57463173', - 'apps.setup.navigation.group_diagnostics.label': '62d648cd434b395c', - 'apps.setup.navigation.group_advanced.label': 'bc9e9a0da37ea229', 'apps.setup.navigation.nav_system_overview.label': '574b2a4b7fb7f979', 'apps.setup.navigation.nav_users.label': 'eee81f7307a66c40', 'apps.setup.navigation.nav_organization.label': '3e55836156e1c1de', diff --git a/packages/platform-objects/src/apps/translations/zh-CN.ts b/packages/platform-objects/src/apps/translations/zh-CN.ts index 7d61dd024bd..c849a0859a0 100644 --- a/packages/platform-objects/src/apps/translations/zh-CN.ts +++ b/packages/platform-objects/src/apps/translations/zh-CN.ts @@ -40,18 +40,19 @@ export const zhCN: TranslationData = { label: '系统设置', description: '平台设置与管理', navigation: { - group_overview: { label: '总览' }, - group_apps: { label: '应用' }, + group_users_org: { label: '用户与组织' }, + group_access_sharing: { label: '权限与共享' }, + group_apps_ai: { label: '应用与 AI' }, + group_routing_approvals: { label: '分派与审批' }, + group_audit_data: { label: '审计与数据' }, + group_company: { label: '公司设置' }, + group_currency_units: { label: '货币与单位' }, + group_notifications: { label: '消息通知' }, + group_login_security: { label: '登录与安全' }, + group_integrations_dev: { label: '集成与开发' }, nav_marketplace_browse: { label: '浏览应用市场' }, nav_packages: { label: '软件包' }, nav_cloud_connection: { label: '云连接' }, - group_people_org: { label: '人员与组织' }, - group_access_control: { label: '访问控制' }, - group_approvals: { label: '审批' }, - group_configuration: { label: '配置' }, - group_integrations: { label: '集成' }, - group_diagnostics: { label: '诊断' }, - group_advanced: { label: '高级' }, nav_system_overview: { label: '系统概览' }, nav_connect_agent: { label: '连接 AI 助手' }, diff --git a/packages/platform-objects/src/apps/translations/zh-Hant.source-hashes.ts b/packages/platform-objects/src/apps/translations/zh-Hant.source-hashes.ts index 83bd403d975..547c82c2c8f 100644 --- a/packages/platform-objects/src/apps/translations/zh-Hant.source-hashes.ts +++ b/packages/platform-objects/src/apps/translations/zh-Hant.source-hashes.ts @@ -71,18 +71,19 @@ export const zhHantSourceHashes: Readonly> = { 'apps.account.navigation.nav_connect_agent.label': 'a4542422fb5e8a68', 'apps.setup.label': 'e4bb0d8bcd47c273', 'apps.setup.description': 'deacdfc679232a4a', - 'apps.setup.navigation.group_overview.label': 'eebdbe1cc7b59cdf', - 'apps.setup.navigation.group_apps.label': '699b367291abcbe6', + 'apps.setup.navigation.group_users_org.label': '0319b6b83dc6d419', + 'apps.setup.navigation.group_access_sharing.label': '1b327a86538c8799', + 'apps.setup.navigation.group_apps_ai.label': '9a72ed19ba9c78b5', + 'apps.setup.navigation.group_routing_approvals.label': 'f4c3fc86150a067a', + 'apps.setup.navigation.group_audit_data.label': '907b6f0bb492a8b7', + 'apps.setup.navigation.group_company.label': '51357bad83fcaa20', + 'apps.setup.navigation.group_currency_units.label': '05f3d81d414dfc78', + 'apps.setup.navigation.group_notifications.label': 'e0fdb90b1d31078d', + 'apps.setup.navigation.group_login_security.label': 'c20a3fe111222f9d', + 'apps.setup.navigation.group_integrations_dev.label': '108f3557a21159e3', 'apps.setup.navigation.nav_marketplace_browse.label': '2afbe021f5419fdd', 'apps.setup.navigation.nav_packages.label': '8cd8f29658025f73', 'apps.setup.navigation.nav_cloud_connection.label': '3a7caad0cb98e71d', - 'apps.setup.navigation.group_people_org.label': 'd313f656b6f0ab65', - 'apps.setup.navigation.group_access_control.label': 'a1a4dd47bcbfaf67', - 'apps.setup.navigation.group_approvals.label': '318a820df22a684b', - 'apps.setup.navigation.group_configuration.label': '5e77c0af10f4252c', - 'apps.setup.navigation.group_integrations.label': '1c83392f57463173', - 'apps.setup.navigation.group_diagnostics.label': '62d648cd434b395c', - 'apps.setup.navigation.group_advanced.label': 'bc9e9a0da37ea229', 'apps.setup.navigation.nav_system_overview.label': '574b2a4b7fb7f979', 'apps.setup.navigation.nav_users.label': 'eee81f7307a66c40', 'apps.setup.navigation.nav_organization.label': '3e55836156e1c1de', diff --git a/packages/platform-objects/src/apps/translations/zh-Hant.ts b/packages/platform-objects/src/apps/translations/zh-Hant.ts index 13ce4bc4960..bd2c30c3774 100644 --- a/packages/platform-objects/src/apps/translations/zh-Hant.ts +++ b/packages/platform-objects/src/apps/translations/zh-Hant.ts @@ -40,18 +40,19 @@ export const zhHant: TranslationData = { label: '系統設定', description: '平台設定與管理', navigation: { - group_overview: { label: '總覽' }, - group_apps: { label: '應用程式' }, + group_users_org: { label: '使用者與組織' }, + group_access_sharing: { label: '權限與共用' }, + group_apps_ai: { label: '應用程式與 AI' }, + group_routing_approvals: { label: '分派與審批' }, + group_audit_data: { label: '稽核與資料' }, + group_company: { label: '公司設定' }, + group_currency_units: { label: '貨幣與單位' }, + group_notifications: { label: '訊息通知' }, + group_login_security: { label: '登入與安全' }, + group_integrations_dev: { label: '整合與開發' }, nav_marketplace_browse: { label: '瀏覽應用程式市場' }, nav_packages: { label: '套件' }, nav_cloud_connection: { label: '雲端連線' }, - group_people_org: { label: '人員與組織' }, - group_access_control: { label: '存取控制' }, - group_approvals: { label: '核准' }, - group_configuration: { label: '設定' }, - group_integrations: { label: '整合' }, - group_diagnostics: { label: '診斷' }, - group_advanced: { label: '進階' }, nav_system_overview: { label: '系統概覽' }, nav_connect_agent: { label: '連接 AI 助理' }, diff --git a/packages/runtime/src/dispatcher-error-vocabulary.ts b/packages/runtime/src/dispatcher-error-vocabulary.ts index d54b38f3dba..a6f4a1d7e19 100644 --- a/packages/runtime/src/dispatcher-error-vocabulary.ts +++ b/packages/runtime/src/dispatcher-error-vocabulary.ts @@ -389,6 +389,23 @@ export const UNREGISTERED_CODE_SITES: readonly UnregisteredCodeSite[] = [ 'REFERENCED (`objlitconst`), not quoted at the stamp — that gate\'s lowercase patterns all ' + 'need a literal beside the token, so this position is this gate\'s to classify.', }, + // [#39053] The navigation-contribution retired-group-id notice. + { + code: 'nav_contribution_group_renamed', + file: 'packages/objectql/src/nav-contribution-diagnostics.ts', + shape: 'objlitconst', + door: 'none', + verdict: 'foreign-vocabulary', + why: + 'ADR-0112 D6c, on the same four tests as `nav_contribution_group_missing` beside it: it ships ' + + 'as PAYLOAD of a success (a registry log line, and the `warnings` list of `os build --json` and ' + + '`os validate --json`, from runs that exit 0), it describes an ARTIFACT (which app, which ' + + 'package, which retired group id, which group took it over), its severity is `warning` only, ' + + 'and no path routes it to `error.code`: the contribution LANDS in the group whose ' + + '`renamedFrom` lists the id, so there is no failing request for a catalog to govern. ' + + 'Lowercase and out of the ledger; reported here because the constant is REFERENCED ' + + '(`objlitconst`), not quoted at the stamp.', + }, { code: 'TEXT', file: 'packages/cli/src/commands/generate.ts', diff --git a/packages/spec/src/ui/app-nav-group-renamed-from.ts b/packages/spec/src/ui/app-nav-group-renamed-from.ts new file mode 100644 index 00000000000..5e4e365d4cb --- /dev/null +++ b/packages/spec/src/ui/app-nav-group-renamed-from.ts @@ -0,0 +1,144 @@ +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. + +/** + * [#39053] The `renamedFrom` refusals of a navigation group + * (`GroupNavItemSchema`) and of a whole app (`AppSchema`). + * + * `renamedFrom` lists the group ids a group took over, so a + * `navigationContributions[]` entry that still names a retired id lands in + * the group that replaced it (`@objectstack/objectql`'s `resolveNavGroup`, + * read by the registry's fold and by `os build` / `os validate` alike). The + * key and its grammar follow the field and position precedents + * (`data/field.zod.ts`, `identity/position.zod.ts`); this module carries the + * rules that make each entry honest. Its own module, and not re-exported from + * `ui/index.ts`: the public surface is the key itself. + * + * Two rules one group can judge alone ({@link refuseSelfGroupRenamedFrom}): + * an entry is not the group's own id, and no entry repeats. Three rules only + * the app can judge ({@link checkAppNavGroupRenamedFrom}): an entry is not an + * id an entry of the app still declares (a live id was never renamed away + * from, and the resolver would never reach the alias — an exact id wins), no + * two groups claim the same old id (the resolver could not say which one a + * contribution meant), and no group inside `areas[].navigation` declares the + * key (contributions fold into the app's `navigation` only, so the alias + * there would never be read). + */ + +import { z } from 'zod'; +import { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod'; + +/** Is `entry` a nav id (`SnakeCaseIdentifierSchema`, the grammar of a nav item's `id`)? */ +const isNavId = (entry: unknown): entry is string => SnakeCaseIdentifierSchema.safeParse(entry).success; + +/** The rule every `renamedFrom` refusal ends with. */ +const GROUP_RENAMED_FROM_PRESCRIPTION = + '`renamedFrom` lists the ids this navigation group replaced, so a navigation contribution that still names ' + + "one lands here: each once, never the group's own id, never an id another entry of the app still declares, " + + 'never an old id another group also claims, and only on groups in the app\'s `navigation` (contributions ' + + 'never fold into `areas`).'; + +/** + * The two `renamedFrom` rules one group can judge alone: an entry is not the + * group's own id, and no entry repeats. One located issue per offending entry + * at `['renamedFrom', i]`. Entries failing the id grammar are the grammar's to + * refuse and are skipped here. + */ +export function refuseSelfGroupRenamedFrom(group: unknown, ctx: z.RefinementCtx): void { + if (!group || typeof group !== 'object') return; + const { id, renamedFrom } = group as { id?: unknown; renamedFrom?: unknown }; + if (!Array.isArray(renamedFrom)) return; + const own = typeof id === 'string' ? id : ''; + const seen = new Set(); + renamedFrom.forEach((entry: unknown, i: number) => { + if (!isNavId(entry)) return; + const refuse = (reason: string): void => { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + path: ['renamedFrom', i], + message: `Navigation group \`${own}\` declares \`renamedFrom\` entry '${entry}', ${reason} ${GROUP_RENAMED_FROM_PRESCRIPTION}`, + }); + }; + if (entry === id) { + refuse("which is the group's own id: a group is not renamed from itself."); + return; + } + if (seen.has(entry)) { + refuse('which an earlier entry of the same list already names.'); + return; + } + seen.add(entry); + }); +} + +/** One nav node met on the walk, with the path the issue is located at. */ +interface WalkedNode { + readonly node: { id?: unknown; type?: unknown; renamedFrom?: unknown }; + readonly path: (string | number)[]; +} + +/** Every nav node under `items`, depth first, each with its path from the app root. */ +function walkNav(items: unknown, path: (string | number)[], into: WalkedNode[]): void { + if (!Array.isArray(items)) return; + items.forEach((item: unknown, i: number) => { + if (!item || typeof item !== 'object') return; + const node = item as WalkedNode['node'] & { children?: unknown }; + const at = [...path, i]; + into.push({ node, path: at }); + walkNav(node.children, [...at, 'children'], into); + }); +} + +/** + * The three `renamedFrom` rules only the whole app can judge — see the module + * docblock. Located at `[...path to the group, 'renamedFrom', i]`. + */ +export function checkAppNavGroupRenamedFrom(app: unknown, ctx: z.RefinementCtx): void { + if (!app || typeof app !== 'object') return; + const { navigation, areas } = app as { navigation?: unknown; areas?: unknown }; + + const nodes: WalkedNode[] = []; + walkNav(navigation, ['navigation'], nodes); + const areaNodes: WalkedNode[] = []; + if (Array.isArray(areas)) { + areas.forEach((area: unknown, a: number) => { + if (area && typeof area === 'object') { + walkNav((area as { navigation?: unknown }).navigation, ['areas', a, 'navigation'], areaNodes); + } + }); + } + + const liveIds = new Set(); + for (const { node } of [...nodes, ...areaNodes]) { + if (typeof node.id === 'string') liveIds.add(node.id); + } + + const issue = (path: (string | number)[], message: string): void => { + ctx.addIssue({ code: z.ZodIssueCode.custom, path, message: `${message} ${GROUP_RENAMED_FROM_PRESCRIPTION}` }); + }; + + const claimedBy = new Map(); + for (const { node, path } of nodes) { + if (node.type !== 'group' || !Array.isArray(node.renamedFrom)) continue; + const own = typeof node.id === 'string' ? node.id : ''; + node.renamedFrom.forEach((entry: unknown, i: number) => { + if (!isNavId(entry) || entry === node.id) return; // the grammar's, or the group rule's + const at = [...path, 'renamedFrom', i]; + if (liveIds.has(entry)) { + issue(at, `Navigation group \`${own}\` declares \`renamedFrom\` entry '${entry}', but this app still declares a navigation entry with that id, so nothing was renamed away from it and a contribution naming it lands on that entry's id, never here.`); + return; + } + const earlier = claimedBy.get(entry); + if (earlier !== undefined && earlier !== own) { + issue(at, `Navigation group \`${own}\` declares \`renamedFrom\` entry '${entry}', which group \`${earlier}\` already claims, so a contribution naming it could not say which group it meant.`); + return; + } + claimedBy.set(entry, own); + }); + } + + for (const { node, path } of areaNodes) { + if (node.type !== 'group' || node.renamedFrom === undefined) continue; + const own = typeof node.id === 'string' ? node.id : ''; + issue([...path, 'renamedFrom'], `Navigation group \`${own}\` sits in \`areas[].navigation\` and declares \`renamedFrom\`, which nothing would read there: navigation contributions fold into the app's \`navigation\` only. Move the group to \`navigation\`, or drop the key.`); + } +} diff --git a/packages/spec/src/ui/app.zod.ts b/packages/spec/src/ui/app.zod.ts index b232069a065..b64272f5d1c 100644 --- a/packages/spec/src/ui/app.zod.ts +++ b/packages/spec/src/ui/app.zod.ts @@ -12,6 +12,7 @@ import { OverrideDeclarationFields } from '../kernel/override-declaration.zod'; import { ProtectionSchema } from '../shared/protection.zod'; import { requiredOneOf } from '../shared/refinement-projection'; import { checkAiChatNavParams, checkAppSingleAiChatEntry } from './ai-chat-nav-params.zod'; +import { checkAppNavGroupRenamedFrom, refuseSelfGroupRenamedFrom } from './app-nav-group-renamed-from'; /* * ── Unknown-key strictness (#4001 app step, PR B) ─────────────────────────── @@ -834,6 +835,27 @@ export const GroupNavItemSchema = lazySchema(() => strictObject(navItemSurface(' 'Whether the group starts open in the sidebar. Omitted, it opens; write `false` to keep it closed ' + 'until the user opens it. A group holding the current route opens whatever it declares.', ), + /** + * [#39053] The group ids THIS group replaced. A `navigationContributions[]` + * entry whose `group` names one of them lands in this group, and the + * contributing package gets a `nav_contribution_group_renamed` warning — at + * runtime from the registry's fold and at compile time from `os build` / + * `os validate`, both through `@objectstack/objectql`'s `resolveNavGroup`, + * which tries every group's own id before any `renamedFrom`. Follows the + * field and position `renamedFrom` precedents. The honesty rules (own id, + * repeats, a live id, an old id two groups claim, a group in `areas`) live in + * `app-nav-group-renamed-from.ts`. + */ + renamedFrom: z.array(SnakeCaseIdentifierSchema).optional().describe( + 'Earlier ids of THIS navigation group, in the nav-id grammar (lowercase snake_case), e.g. ' + + "`renamedFrom: ['group_people_org']` on a group now `group_users_org`. A navigation contribution " + + '(`navigationContributions[]`) whose `group` names one of them lands in this group, and the contributing ' + + 'package is warned to name the new id (`nav_contribution_group_renamed`, by the runtime at `warn` and by ' + + '`os build` / `os validate`). A group whose own id matches always wins over a `renamedFrom` entry. Several ' + + 'retired groups merged into this one are all listed. Each entry once; never this group\'s own id; never an id ' + + 'another entry of the app still declares; never an old id another group also claims; only on groups in the ' + + "app's `navigation` (contributions never fold into `areas`).", + ), // children property is added in the recursive definition below })); @@ -1162,7 +1184,7 @@ export const NavigationItemSchema: z.ZodType strictObject( }, { app: SnakeCaseIdentifierSchema.describe('Target app name to contribute navigation into (e.g. "setup")'), - group: SnakeCaseIdentifierSchema.optional().describe('Target group nav-item id to append into (e.g. "group_integrations"); omit to append at the app top level. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time.'), + group: SnakeCaseIdentifierSchema.optional().describe('Target group nav-item id to append into (e.g. "group_integrations"); omit to append at the app top level. A retired id that a group of the target app lists in its `renamedFrom` lands in that group, with a `nav_contribution_group_renamed` warning naming the new id. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time.'), priority: z.number().int().min(0).default(200).describe('Merge priority within the target group — lower applied first (matches object extender priority)'), items: z.array(NavigationItemSchema).describe('Navigation items contributed into the target app/group'), }).describe('A navigation contribution: a package injecting nav items into an app it does not own (ADR-0029 D7)')); @@ -2125,7 +2150,7 @@ export const AppSchema = lazySchema(() => strictObject( ...MetadataProtectionFields, // ADR-0146 D2 — the override declaration (authored; travels with the item). ...OverrideDeclarationFields, -}).superRefine(checkAppLandingItems).superRefine(checkAppSingleAiChatEntry)); +}).superRefine(checkAppLandingItems).superRefine(checkAppSingleAiChatEntry).superRefine(checkAppNavGroupRenamedFrom)); /** * App Factory Helper From a8c292413753b5b8a8b5a5b539274c8b2dec200a Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Dec 2026 06:51:10 +0000 Subject: [PATCH 02/12] wip(#39053): judge renamedFrom on the app; regenerate spec artifacts Claude-Session: https://claude.ai/code/session_01WGufzfhZDUp9rF94Nz3frb Co-authored-by: Claude --- content/docs/references/ui/app.mdx | 7 +- packages/spec/authorable-surface/ui.json | 1 + .../spec/docs/references/api/package-api.md | 4 +- .../spec/docs/references/kernel/manifest.md | 2 +- .../spec/src/ui/app-nav-group-renamed-from.ts | 82 ++++++++----------- packages/spec/src/ui/app.zod.ts | 4 +- 6 files changed, 47 insertions(+), 53 deletions(-) diff --git a/content/docs/references/ui/app.mdx b/content/docs/references/ui/app.mdx index 667a08afc42..bfb33de2c88 100644 --- a/content/docs/references/ui/app.mdx +++ b/content/docs/references/ui/app.mdx @@ -281,6 +281,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | **requiresService** | `string` | optional | Hide/disable this entry unless the named kernel service is registered | | **type** | `'group'` | ✅ | | | **expanded** | `boolean` | optional (default: `true`) | Whether the group starts open in the sidebar. Omitted, it opens; write `false` to keep it closed until the user opens it. A group holding the current route opens whatever it declares. | +| **renamedFrom** | `string[]` | optional | Earlier ids of THIS navigation group, in the nav-id grammar (lowercase snake_case), e.g. `renamedFrom: ['group_people_org']` on a group now `group_users_org`. A navigation contribution (`navigationContributions[]`) whose `group` names one of them lands in this group, and the contributing package is warned to name the new id (`nav_contribution_group_renamed`, by the runtime at `warn` and by `os build` / `os validate`). A group whose own id matches always wins over a `renamedFrom` entry. Several retired groups merged into this one are all listed. Each entry once; never this group's own id; never an id another entry of the app still declares; never an old id another group also claims; only on groups in the app's `navigation` (contributions never fold into `areas`). | | **children** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Child navigation items | ### Nested Shape: `App.areas[number]` @@ -496,6 +497,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | **requiresService** | `string` | optional | Hide/disable this entry unless the named kernel service is registered | | **type** | `'group'` | ✅ | | | **expanded** | `boolean` | optional (default: `true`) | Whether the group starts open in the sidebar. Omitted, it opens; write `false` to keep it closed until the user opens it. A group holding the current route opens whatever it declares. | +| **renamedFrom** | `string[]` | optional | Earlier ids of THIS navigation group, in the nav-id grammar (lowercase snake_case), e.g. `renamedFrom: ['group_people_org']` on a group now `group_users_org`. A navigation contribution (`navigationContributions[]`) whose `group` names one of them lands in this group, and the contributing package is warned to name the new id (`nav_contribution_group_renamed`, by the runtime at `warn` and by `os build` / `os validate`). A group whose own id matches always wins over a `renamedFrom` entry. Several retired groups merged into this one are all listed. Each entry once; never this group's own id; never an id another entry of the app still declares; never an old id another group also claims; only on groups in the app's `navigation` (contributions never fold into `areas`). | ### Nested Shape: `GroupNavItem.dataSource` @@ -701,6 +703,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | **requiresService** | `string` | optional | Hide/disable this entry unless the named kernel service is registered | | **type** | `'group'` | ✅ | | | **expanded** | `boolean` | optional (default: `true`) | Whether the group starts open in the sidebar. Omitted, it opens; write `false` to keep it closed until the user opens it. A group holding the current route opens whatever it declares. | +| **renamedFrom** | `string[]` | optional | Earlier ids of THIS navigation group, in the nav-id grammar (lowercase snake_case), e.g. `renamedFrom: ['group_people_org']` on a group now `group_users_org`. A navigation contribution (`navigationContributions[]`) whose `group` names one of them lands in this group, and the contributing package is warned to name the new id (`nav_contribution_group_renamed`, by the runtime at `warn` and by `os build` / `os validate`). A group whose own id matches always wins over a `renamedFrom` entry. Several retired groups merged into this one are all listed. Each entry once; never this group's own id; never an id another entry of the app still declares; never an old id another group also claims; only on groups in the app's `navigation` (contributions never fold into `areas`). | | **children** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Child navigation items | @@ -715,7 +718,7 @@ A navigation contribution: a package injecting nav items into an app it does not | Property | Type | Required | Description | | :--- | :--- | :--- | :--- | | **app** | `string` | ✅ | Target app name to contribute navigation into (e.g. "setup") | -| **group** | `string` | optional | Target group nav-item id to append into (e.g. "group_integrations"); omit to append at the app top level. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time. | +| **group** | `string` | optional | Target group nav-item id to append into (e.g. "group_integrations"); omit to append at the app top level. A retired id that a group of the target app lists in its `renamedFrom` lands in that group, with a `nav_contribution_group_renamed` warning naming the new id. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time. | | **priority** | `integer` | optional (default: `200`) | Merge priority within the target group — lower applied first (matches object extender priority) | | **items** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Navigation items contributed into the target app/group | @@ -900,6 +903,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | **requiresService** | `string` | optional | Hide/disable this entry unless the named kernel service is registered | | **type** | `'group'` | ✅ | | | **expanded** | `boolean` | optional (default: `true`) | Whether the group starts open in the sidebar. Omitted, it opens; write `false` to keep it closed until the user opens it. A group holding the current route opens whatever it declares. | +| **renamedFrom** | `string[]` | optional | Earlier ids of THIS navigation group, in the nav-id grammar (lowercase snake_case), e.g. `renamedFrom: ['group_people_org']` on a group now `group_users_org`. A navigation contribution (`navigationContributions[]`) whose `group` names one of them lands in this group, and the contributing package is warned to name the new id (`nav_contribution_group_renamed`, by the runtime at `warn` and by `os build` / `os validate`). A group whose own id matches always wins over a `renamedFrom` entry. Several retired groups merged into this one are all listed. Each entry once; never this group's own id; never an id another entry of the app still declares; never an old id another group also claims; only on groups in the app's `navigation` (contributions never fold into `areas`). | | **children** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Child navigation items | @@ -1221,6 +1225,7 @@ Documentation entry on the app menu (ADR-0046). Targets a `book` and/or a `doc` | **requiresService** | `string` | optional | Hide/disable this entry unless the named kernel service is registered | | **type** | `'group'` | ✅ | | | **expanded** | `boolean` | optional (default: `true`) | Whether the group starts open in the sidebar. Omitted, it opens; write `false` to keep it closed until the user opens it. A group holding the current route opens whatever it declares. | +| **renamedFrom** | `string[]` | optional | Earlier ids of THIS navigation group, in the nav-id grammar (lowercase snake_case), e.g. `renamedFrom: ['group_people_org']` on a group now `group_users_org`. A navigation contribution (`navigationContributions[]`) whose `group` names one of them lands in this group, and the contributing package is warned to name the new id (`nav_contribution_group_renamed`, by the runtime at `warn` and by `os build` / `os validate`). A group whose own id matches always wins over a `renamedFrom` entry. Several retired groups merged into this one are all listed. Each entry once; never this group's own id; never an id another entry of the app still declares; never an old id another group also claims; only on groups in the app's `navigation` (contributions never fold into `areas`). | | **children** | `[NavigationItem](#navigationitem)[]` | ✅ | Child navigation items | ### Nested Shape: `NavigationItem[type='group'].dataSource` diff --git a/packages/spec/authorable-surface/ui.json b/packages/spec/authorable-surface/ui.json index ffc4faa8c3b..1422a819ce9 100644 --- a/packages/spec/authorable-surface/ui.json +++ b/packages/spec/authorable-surface/ui.json @@ -703,6 +703,7 @@ "ui/GroupNavItem:id", "ui/GroupNavItem:label", "ui/GroupNavItem:order", + "ui/GroupNavItem:renamedFrom", "ui/GroupNavItem:requiredPermissions", "ui/GroupNavItem:requiresObject", "ui/GroupNavItem:requiresService", diff --git a/packages/spec/docs/references/api/package-api.md b/packages/spec/docs/references/api/package-api.md index b75718eb4f9..f051e6e9b79 100644 --- a/packages/spec/docs/references/api/package-api.md +++ b/packages/spec/docs/references/api/package-api.md @@ -260,7 +260,7 @@ A navigation contribution: a package injecting nav items into an app it does not | Property | Type | Required | Description | | :--- | :--- | :--- | :--- | | **app** | `string` | ✅ | Target app name to contribute navigation into (e.g. "setup") | -| **group** | `string` | optional | Target group nav-item id to append into (e.g. "group_integrations"); omit to append at the app top level. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time. | +| **group** | `string` | optional | Target group nav-item id to append into (e.g. "group_integrations"); omit to append at the app top level. A retired id that a group of the target app lists in its `renamedFrom` lands in that group, with a `nav_contribution_group_renamed` warning naming the new id. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time. | | **priority** | `integer` | optional (default: `200`) | Merge priority within the target group — lower applied first (matches object extender priority) | | **items** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Navigation items contributed into the target app/group | @@ -370,7 +370,7 @@ A navigation contribution: a package injecting nav items into an app it does not | Property | Type | Required | Description | | :--- | :--- | :--- | :--- | | **app** | `string` | ✅ | Target app name to contribute navigation into (e.g. "setup") | -| **group** | `string` | optional | Target group nav-item id to append into (e.g. "group_integrations"); omit to append at the app top level. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time. | +| **group** | `string` | optional | Target group nav-item id to append into (e.g. "group_integrations"); omit to append at the app top level. A retired id that a group of the target app lists in its `renamedFrom` lands in that group, with a `nav_contribution_group_renamed` warning naming the new id. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time. | | **priority** | `integer` | optional (default: `200`) | Merge priority within the target group — lower applied first (matches object extender priority) | | **items** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Navigation items contributed into the target app/group | diff --git a/packages/spec/docs/references/kernel/manifest.md b/packages/spec/docs/references/kernel/manifest.md index 90fe4b43f31..bc0784949af 100644 --- a/packages/spec/docs/references/kernel/manifest.md +++ b/packages/spec/docs/references/kernel/manifest.md @@ -114,7 +114,7 @@ A navigation contribution: a package injecting nav items into an app it does not | Property | Type | Required | Description | | :--- | :--- | :--- | :--- | | **app** | `string` | ✅ | Target app name to contribute navigation into (e.g. "setup") | -| **group** | `string` | optional | Target group nav-item id to append into (e.g. "group_integrations"); omit to append at the app top level. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time. | +| **group** | `string` | optional | Target group nav-item id to append into (e.g. "group_integrations"); omit to append at the app top level. A retired id that a group of the target app lists in its `renamedFrom` lands in that group, with a `nav_contribution_group_renamed` warning naming the new id. Naming a group the target app does not declare is not refused: the items are appended at the app top level anyway and a `nav_contribution_group_missing` diagnostic is emitted — by the runtime at `warn`, and by `os build` and `os validate` at compile time. | | **priority** | `integer` | optional (default: `200`) | Merge priority within the target group — lower applied first (matches object extender priority) | | **items** | `({ id: string; label?: string \| Record; icon?: string; order?: number; … } \| { type: 'separator'; id?: string; order?: number } \| … +8 more)[]` | ✅ | Navigation items contributed into the target app/group | diff --git a/packages/spec/src/ui/app-nav-group-renamed-from.ts b/packages/spec/src/ui/app-nav-group-renamed-from.ts index 5e4e365d4cb..c64701be0cd 100644 --- a/packages/spec/src/ui/app-nav-group-renamed-from.ts +++ b/packages/spec/src/ui/app-nav-group-renamed-from.ts @@ -2,7 +2,7 @@ /** * [#39053] The `renamedFrom` refusals of a navigation group - * (`GroupNavItemSchema`) and of a whole app (`AppSchema`). + * (`GroupNavItemSchema.renamedFrom`), judged on the whole app (`AppSchema`). * * `renamedFrom` lists the group ids a group took over, so a * `navigationContributions[]` entry that still names a retired id lands in @@ -13,15 +13,24 @@ * rules that make each entry honest. Its own module, and not re-exported from * `ui/index.ts`: the public surface is the key itself. * - * Two rules one group can judge alone ({@link refuseSelfGroupRenamedFrom}): - * an entry is not the group's own id, and no entry repeats. Three rules only - * the app can judge ({@link checkAppNavGroupRenamedFrom}): an entry is not an - * id an entry of the app still declares (a live id was never renamed away - * from, and the resolver would never reach the alias — an exact id wins), no - * two groups claim the same old id (the resolver could not say which one a - * contribution meant), and no group inside `areas[].navigation` declares the - * key (contributions fold into the app's `navigation` only, so the alias - * there would never be read). + * Five rules, all judged by {@link checkAppNavGroupRenamedFrom} on the whole + * app: an entry is not the group's own id, no entry of one list repeats, an + * entry is not an id an entry of the app still declares (a live id was never + * renamed away from, and the resolver would never reach the alias — an exact + * id wins), no two groups claim the same old id (the resolver could not say + * which one a contribution meant), and no group inside `areas[].navigation` + * declares the key (contributions fold into the app's `navigation` only, so + * the alias there would never be read). + * + * ⚠️ Why the two per-group rules are not a refinement on the group branch of + * `NavigationItemSchema`: a refinement there is a NEW site in + * `dropped-refinements.baseline.json` under every schema that embeds a nav + * item, and that ledger only shrinks. `AppSchema` + * already carries refinements at its root, so judging all five there adds no + * site. What that leaves unjudged is a group contributed through + * `navigationContributions[]` — and for it both per-group rules are harmless: + * its own id is found by the exact pass first, and a repeat names the same + * group twice. */ import { z } from 'zod'; @@ -37,39 +46,6 @@ const GROUP_RENAMED_FROM_PRESCRIPTION = + 'never an old id another group also claims, and only on groups in the app\'s `navigation` (contributions ' + 'never fold into `areas`).'; -/** - * The two `renamedFrom` rules one group can judge alone: an entry is not the - * group's own id, and no entry repeats. One located issue per offending entry - * at `['renamedFrom', i]`. Entries failing the id grammar are the grammar's to - * refuse and are skipped here. - */ -export function refuseSelfGroupRenamedFrom(group: unknown, ctx: z.RefinementCtx): void { - if (!group || typeof group !== 'object') return; - const { id, renamedFrom } = group as { id?: unknown; renamedFrom?: unknown }; - if (!Array.isArray(renamedFrom)) return; - const own = typeof id === 'string' ? id : ''; - const seen = new Set(); - renamedFrom.forEach((entry: unknown, i: number) => { - if (!isNavId(entry)) return; - const refuse = (reason: string): void => { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - path: ['renamedFrom', i], - message: `Navigation group \`${own}\` declares \`renamedFrom\` entry '${entry}', ${reason} ${GROUP_RENAMED_FROM_PRESCRIPTION}`, - }); - }; - if (entry === id) { - refuse("which is the group's own id: a group is not renamed from itself."); - return; - } - if (seen.has(entry)) { - refuse('which an earlier entry of the same list already names.'); - return; - } - seen.add(entry); - }); -} - /** One nav node met on the walk, with the path the issue is located at. */ interface WalkedNode { readonly node: { id?: unknown; type?: unknown; renamedFrom?: unknown }; @@ -89,8 +65,10 @@ function walkNav(items: unknown, path: (string | number)[], into: WalkedNode[]): } /** - * The three `renamedFrom` rules only the whole app can judge — see the module - * docblock. Located at `[...path to the group, 'renamedFrom', i]`. + * The five `renamedFrom` rules — see the module docblock. Located at + * `[...path to the group, 'renamedFrom', i]` (an `areas` group at + * `[...path, 'renamedFrom']`). Entries failing the id grammar are the + * grammar's to refuse and are skipped here. */ export function checkAppNavGroupRenamedFrom(app: unknown, ctx: z.RefinementCtx): void { if (!app || typeof app !== 'object') return; @@ -120,15 +98,25 @@ export function checkAppNavGroupRenamedFrom(app: unknown, ctx: z.RefinementCtx): for (const { node, path } of nodes) { if (node.type !== 'group' || !Array.isArray(node.renamedFrom)) continue; const own = typeof node.id === 'string' ? node.id : ''; + const seen = new Set(); node.renamedFrom.forEach((entry: unknown, i: number) => { - if (!isNavId(entry) || entry === node.id) return; // the grammar's, or the group rule's + if (!isNavId(entry)) return; const at = [...path, 'renamedFrom', i]; + if (entry === node.id) { + issue(at, `Navigation group \`${own}\` declares \`renamedFrom\` entry '${entry}', which is the group's own id: a group is not renamed from itself.`); + return; + } + if (seen.has(entry)) { + issue(at, `Navigation group \`${own}\` declares \`renamedFrom\` entry '${entry}', which an earlier entry of the same list already names.`); + return; + } + seen.add(entry); if (liveIds.has(entry)) { issue(at, `Navigation group \`${own}\` declares \`renamedFrom\` entry '${entry}', but this app still declares a navigation entry with that id, so nothing was renamed away from it and a contribution naming it lands on that entry's id, never here.`); return; } const earlier = claimedBy.get(entry); - if (earlier !== undefined && earlier !== own) { + if (earlier !== undefined) { issue(at, `Navigation group \`${own}\` declares \`renamedFrom\` entry '${entry}', which group \`${earlier}\` already claims, so a contribution naming it could not say which group it meant.`); return; } diff --git a/packages/spec/src/ui/app.zod.ts b/packages/spec/src/ui/app.zod.ts index b64272f5d1c..c81ac828c1c 100644 --- a/packages/spec/src/ui/app.zod.ts +++ b/packages/spec/src/ui/app.zod.ts @@ -12,7 +12,7 @@ import { OverrideDeclarationFields } from '../kernel/override-declaration.zod'; import { ProtectionSchema } from '../shared/protection.zod'; import { requiredOneOf } from '../shared/refinement-projection'; import { checkAiChatNavParams, checkAppSingleAiChatEntry } from './ai-chat-nav-params.zod'; -import { checkAppNavGroupRenamedFrom, refuseSelfGroupRenamedFrom } from './app-nav-group-renamed-from'; +import { checkAppNavGroupRenamedFrom } from './app-nav-group-renamed-from'; /* * ── Unknown-key strictness (#4001 app step, PR B) ─────────────────────────── @@ -1184,7 +1184,7 @@ export const NavigationItemSchema: z.ZodType Date: Wed, 2 Dec 2026 06:52:44 +0000 Subject: [PATCH 03/12] test(#39053): pin renamedFrom refusals and the fold/build resolution Claude-Session: https://claude.ai/code/session_01WGufzfhZDUp9rF94Nz3frb Co-authored-by: Claude --- ...y-nav-contribution-group-semantics.test.ts | 93 +++++++++++++- .../src/ui/app-nav-group-renamed-from.test.ts | 120 ++++++++++++++++++ 2 files changed, 212 insertions(+), 1 deletion(-) create mode 100644 packages/spec/src/ui/app-nav-group-renamed-from.test.ts diff --git a/packages/objectql/src/registry-nav-contribution-group-semantics.test.ts b/packages/objectql/src/registry-nav-contribution-group-semantics.test.ts index 0911380d870..20a567cc42d 100644 --- a/packages/objectql/src/registry-nav-contribution-group-semantics.test.ts +++ b/packages/objectql/src/registry-nav-contribution-group-semantics.test.ts @@ -67,7 +67,11 @@ import { describe, it, expect, afterEach } from 'vitest'; import { ObjectKernel } from '@objectstack/core'; import { SchemaRegistry } from './registry.js'; -import { NAV_CONTRIBUTION_GROUP_MISSING } from './nav-contribution-diagnostics.js'; +import { + NAV_CONTRIBUTION_GROUP_MISSING, + NAV_CONTRIBUTION_GROUP_RENAMED, + checkNavContributionGroups, +} from './nav-contribution-diagnostics.js'; import { ObjectQLPlugin } from './plugin.js'; import type { ObjectQL } from './engine.js'; @@ -613,3 +617,90 @@ describe('navigationContributions — the fold keeps a contributed entry\'s `ord expect(Object.prototype.hasOwnProperty.call(forecast, 'order')).toBe(false); }); }); + +describe('#39053 — a contribution naming a retired group id lands in the group whose `renamedFrom` lists it', () => { + /** A host app whose `group_new` took over `group_old` (and `group_older`), beside an unrelated group. */ + const hostApp = (extraNav: unknown[] = []) => ({ + name: 'crm_app', + label: 'CRM', + navigation: [ + { id: 'sales_group', type: 'group', label: 'Sales', children: [] }, + { id: 'group_new', type: 'group', label: 'New', renamedFrom: ['group_old', 'group_older'], children: [] }, + ...extraNav, + ], + }); + const cpq = { id: 'nav_cpq', type: 'object', objectName: 'crm_cpq', label: 'cpq' }; + + /** Read the app once at `warn`, capturing what the fold printed. */ + const readAtWarn = (registry: SchemaRegistry) => { + const warns: string[] = []; + const ow = console.warn; + console.warn = (...a: unknown[]) => { warns.push(a.map(String).join(' ')); }; + let app: { navigation?: NavItem[] }; + try { + app = registry.getApp('crm_app') as { navigation?: NavItem[] }; + } finally { + console.warn = ow; + } + return { warns, nav: app.navigation ?? [] }; + }; + + const registryWith = (contributionGroup: string, extraNav: unknown[] = []) => { + const registry = new SchemaRegistry({ multiTenant: false, collisionPolicy: 'error' }); + registry.logLevel = 'warn'; + registry.registerApp(hostApp(extraNav), 'com.acme.crm'); + registry.registerAppNavContribution({ app: 'crm_app', group: contributionGroup, items: [cpq] }, 'com.acme.crm.cpq'); + return registry; + }; + + it('the runtime fold puts the items in the renaming group, not at the top level, and warns once naming package, old id and new id', () => { + const registry = registryWith('group_older'); + const first = readAtWarn(registry); + expect(idsOf(groupOf(first.nav, 'group_new')?.children)).toEqual(['nav_cpq']); + expect(idsOf(first.nav)).toEqual(['sales_group', 'group_new']); + expect(first.warns).toHaveLength(1); + expect(first.warns[0]).toContain(`[${NAV_CONTRIBUTION_GROUP_RENAMED}]`); + expect(first.warns[0]).toContain('"com.acme.crm.cpq"'); + expect(first.warns[0]).toContain('"group_older"'); + expect(first.warns[0]).toContain('"group_new"'); + // Once per process per registry, however often the app is read. + expect(readAtWarn(registry).warns).toEqual([]); + // Not a relocation: the app-level relocation record stays empty. + expect(registry.getAppNavDiagnostics('crm_app')).toEqual([]); + }); + + it('an exact group id wins over a `renamedFrom` entry, wherever the two sit', () => { + // A contributed group whose own id is `group_old` would be refused in an + // authored app; reached through a contribution it is still the exact match. + const registry = registryWith('group_old', [{ id: 'group_old', type: 'group', label: 'Old', children: [] }]); + const { warns, nav } = readAtWarn(registry); + expect(idsOf(groupOf(nav, 'group_old')?.children)).toEqual(['nav_cpq']); + expect(groupOf(nav, 'group_new')?.children).toEqual([]); + expect(warns).toEqual([]); + }); + + it('an id no group declares or took over is still relocated with the missing-group finding', () => { + const registry = registryWith('group_gone'); + const { warns, nav } = readAtWarn(registry); + expect(idsOf(nav)).toEqual(['sales_group', 'group_new', 'nav_cpq']); + expect(warns).toHaveLength(1); + expect(warns[0]).toContain(`[${NAV_CONTRIBUTION_GROUP_MISSING}]`); + }); + + it('the compile-time half reports the same finding for the same aim, and nothing for an exact id', () => { + const findings = checkNavContributionGroups([hostApp()], [ + { app: 'crm_app', group: 'group_old', items: [cpq], packageId: 'com.acme.crm.cpq' }, + { app: 'crm_app', group: 'group_new', items: [cpq], packageId: 'com.acme.crm.cpq' }, + ]); + expect(findings).toHaveLength(1); + expect(findings[0]).toMatchObject({ + code: NAV_CONTRIBUTION_GROUP_RENAMED, + severity: 'warning', + app: 'crm_app', + packageId: 'com.acme.crm.cpq', + group: 'group_old', + renamedTo: 'group_new', + items: ['nav_cpq'], + }); + }); +}); diff --git a/packages/spec/src/ui/app-nav-group-renamed-from.test.ts b/packages/spec/src/ui/app-nav-group-renamed-from.test.ts new file mode 100644 index 00000000000..ffeed82c988 --- /dev/null +++ b/packages/spec/src/ui/app-nav-group-renamed-from.test.ts @@ -0,0 +1,120 @@ +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. + +/** + * #39053 — a navigation group's `renamedFrom`: the retired group ids a group + * took over, so a navigation contribution still naming one lands there. + * + * Two halves. The key is a real authoring surface: a group carrying it parses + * clean (no `unrecognized_keys`), on the group branch and inside a whole app. + * And the five honesty rules of `app-nav-group-renamed-from.ts` refuse, each + * located at the offending entry, while a valid Setup-shaped app (several + * groups, one of them listing two retired ids) passes the full parse. + */ + +import { describe, it, expect } from 'vitest'; + +import { AppSchema, GroupNavItemSchema, NavigationItemSchema } from './app.zod'; + +const group = (id: string, renamedFrom?: unknown) => ({ + id, + type: 'group' as const, + label: id, + children: [], + ...(renamedFrom === undefined ? {} : { renamedFrom }), +}); + +const app = (navigation: unknown[], extra: Record = {}) => ({ + name: 'setup_like', + label: 'Setup-like', + navigation, + ...extra, +}); + +/** The custom issues of one app parse, as `path :: message`. */ +function renamedFromIssues(input: unknown): string[] { + const result = AppSchema.safeParse(input); + if (result.success) return []; + return result.error.issues + .filter((i) => i.path.includes('renamedFrom')) + .map((i) => `${i.path.join('.')} :: ${i.message}`); +} + +describe('#39053 renamedFrom is an authorable key on a navigation group', () => { + it('parses on the group branch, on the recursive union, and keeps its entries', () => { + const g = group('group_integrations_dev', ['group_integrations', 'group_advanced']); + // The branch schema alone carries no `children` (the union member adds it). + const { children: _children, ...branchOnly } = g; + expect(GroupNavItemSchema.safeParse(branchOnly).success).toBe(true); + const parsed = NavigationItemSchema.parse(g) as { renamedFrom?: string[] }; + expect(parsed.renamedFrom).toEqual(['group_integrations', 'group_advanced']); + }); + + it('is absent when not written (no default materialises)', () => { + const parsed = NavigationItemSchema.parse(group('group_company')) as Record; + expect(parsed).not.toHaveProperty('renamedFrom'); + }); + + it('a whole app with several renaming groups passes the full parse', () => { + const result = AppSchema.safeParse(app([ + { id: 'nav_system_overview', type: 'dashboard', dashboardName: 'system_overview' }, + group('group_users_org', ['group_people_org']), + group('group_company', ['group_configuration']), + group('group_integrations_dev', ['group_integrations', 'group_advanced']), + ])); + expect(result.success).toBe(true); + }); + + it('entries keep the nav-id grammar', () => { + const result = AppSchema.safeParse(app([group('group_users_org', ['Group-People'])])); + expect(result.success).toBe(false); + expect(result.error!.issues.some((i) => i.path.join('.') === 'navigation.0.renamedFrom.0')).toBe(true); + }); + + it('stays a key of the group variant only: an object item refuses it', () => { + const result = NavigationItemSchema.safeParse({ + id: 'nav_users', type: 'object', objectName: 'sys_user', renamedFrom: ['nav_people'], + }); + expect(result.success).toBe(false); + expect(result.error!.issues.some((i) => i.code === 'unrecognized_keys')).toBe(true); + }); +}); + +describe('#39053 the renamedFrom honesty rules, judged on the app', () => { + it("refuses the group's own id", () => { + const issues = renamedFromIssues(app([group('group_company', ['group_company'])])); + expect(issues).toHaveLength(1); + expect(issues[0]).toMatch(/^navigation\.0\.renamedFrom\.0 :: .*the group's own id/); + }); + + it('refuses a repeated entry', () => { + const issues = renamedFromIssues(app([group('group_company', ['group_configuration', 'group_configuration'])])); + expect(issues).toHaveLength(1); + expect(issues[0]).toMatch(/^navigation\.0\.renamedFrom\.1 :: .*already names/); + }); + + it('refuses an id another entry of the app still declares, at any depth', () => { + const issues = renamedFromIssues(app([ + group('group_users_org', ['nav_users']), + { ...group('group_access_sharing'), children: [{ id: 'nav_users', type: 'object', objectName: 'sys_user' }] }, + ])); + expect(issues).toHaveLength(1); + expect(issues[0]).toMatch(/^navigation\.0\.renamedFrom\.0 :: .*still declares a navigation entry with that id/); + }); + + it('refuses an old id two groups claim', () => { + const issues = renamedFromIssues(app([ + group('group_company', ['group_configuration']), + group('group_currency_units', ['group_configuration']), + ])); + expect(issues).toHaveLength(1); + expect(issues[0]).toMatch(/^navigation\.1\.renamedFrom\.0 :: .*group `group_company` already claims/); + }); + + it('refuses the key on a group inside areas[].navigation, where no contribution folds', () => { + const issues = renamedFromIssues(app([], { + areas: [{ id: 'area_admin', label: 'Admin', navigation: [group('group_company', ['group_configuration'])] }], + })); + expect(issues).toHaveLength(1); + expect(issues[0]).toMatch(/^areas\.0\.navigation\.0\.renamedFrom :: .*navigation contributions fold into the app's `navigation` only/); + }); +}); From b25ff10ca7e4d6d38772634b1b004b7a9fbb5b92 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Dec 2026 06:59:57 +0000 Subject: [PATCH 04/12] test(#39053): platform-objects pins read the new Setup anchors Claude-Session: https://claude.ai/code/session_01WGufzfhZDUp9rF94Nz3frb Co-authored-by: Claude --- .../src/apps/setup-packages-door.test.ts | 6 +- .../src/platform-objects.test.ts | 63 +++++++++++++++++-- 2 files changed, 61 insertions(+), 8 deletions(-) diff --git a/packages/platform-objects/src/apps/setup-packages-door.test.ts b/packages/platform-objects/src/apps/setup-packages-door.test.ts index ef0864bb840..bed87b9cc16 100644 --- a/packages/platform-objects/src/apps/setup-packages-door.test.ts +++ b/packages/platform-objects/src/apps/setup-packages-door.test.ts @@ -87,8 +87,10 @@ describe('Setup opens the package list on its administration face; Studio keeps it('Setup ships exactly one package-list entry: `nav_packages` in `group_apps`, administration face, unfiltered', () => { const items = setupItems(); - // Control: the walk reads the real Setup shell and its contributions. - expect(items.some((i) => i.id === 'group_apps')).toBe(true); + // Control: the walk reads the real Setup shell and its contributions. The + // shell's anchor is `group_apps_ai`, which took `group_apps` over through + // `renamedFrom` (#39053); the contribution below still names the old id. + expect(items.some((i) => i.id === 'group_apps_ai')).toBe(true); expect(items.some((i) => i.id === 'nav_users')).toBe(true); const doors = items.filter(isPackagesDoor); diff --git a/packages/platform-objects/src/platform-objects.test.ts b/packages/platform-objects/src/platform-objects.test.ts index 4106861053d..5bf76a3dbc9 100644 --- a/packages/platform-objects/src/platform-objects.test.ts +++ b/packages/platform-objects/src/platform-objects.test.ts @@ -513,20 +513,67 @@ describe('@objectstack/platform-objects', () => { expect(() => AppSchema.parse(SETUP_APP)).not.toThrow(); }); - it('is a shell of group anchors with no enumerated objects', () => { + it('is a shell: the pinned overview entry, then group anchors with no enumerated objects', () => { const nav = SETUP_APP.navigation ?? []; expect(nav.length).toBeGreaterThan(0); - for (const item of nav) { + // [#39053] The one non-group entry is the pinned System Overview, gated + // as `group_overview` gated it. + const [pinned, ...groups] = nav as Array>; + expect(pinned).toMatchObject({ + id: 'nav_system_overview', + type: 'dashboard', + dashboardName: 'system_overview', + requiredPermissions: ['manage_platform_settings'], + }); + for (const item of groups) { expect(item.type).toBe('group'); // Shell groups carry no children — entries come from contributions. - expect((item as { children?: unknown[] }).children).toEqual([]); + expect(item.children).toEqual([]); } }); - it('keeps the group_integrations anchor (filled by plugin-webhooks contribution)', () => { - const group = SETUP_APP.navigation?.find((n) => n.id === 'group_integrations'); + it('[#39053] has the ten ruled groups, in order, the first five open and the last five closed', () => { + const parsed = AppSchema.parse(SETUP_APP); + const groups = (parsed.navigation ?? []).filter((n) => n.type === 'group') as Array<{ id: string; expanded?: boolean }>; + expect(groups.map((g) => [g.id, g.expanded])).toEqual([ + ['group_users_org', true], + ['group_access_sharing', true], + ['group_apps_ai', true], + ['group_routing_approvals', true], + ['group_audit_data', true], + ['group_company', false], + ['group_currency_units', false], + ['group_notifications', false], + ['group_login_security', false], + ['group_integrations_dev', false], + ]); + }); + + it('[#39053] each retired anchor id is taken over by exactly one group, except group_overview', () => { + const owner = new Map(); + for (const item of SETUP_APP.navigation ?? []) { + for (const old of (item as { renamedFrom?: string[] }).renamedFrom ?? []) { + expect(owner.has(old)).toBe(false); + owner.set(old, item.id); + } + } + expect(Object.fromEntries(owner)).toEqual({ + group_people_org: 'group_users_org', + group_access_control: 'group_access_sharing', + group_apps: 'group_apps_ai', + group_approvals: 'group_routing_approvals', + group_diagnostics: 'group_audit_data', + group_configuration: 'group_company', + group_integrations: 'group_integrations_dev', + group_advanced: 'group_integrations_dev', + }); + }); + + it('keeps an anchor for plugin-webhooks: group_integrations_dev answers for group_integrations', () => { + const group = SETUP_APP.navigation?.find((n) => n.id === 'group_integrations_dev'); expect(group).toBeDefined(); expect(group?.type).toBe('group'); + expect((group as { renamedFrom?: string[] }).renamedFrom).toContain('group_integrations'); // The webhooks entries are no longer static here — plugin-webhooks // contributes them into this slot (ADR-0029 D7 / K2.a). expect((group as { children?: unknown[] }).children).toEqual([]); @@ -552,8 +599,12 @@ describe('@objectstack/platform-objects', () => { }); describe('SETUP_NAV_CONTRIBUTIONS (ADR-0029 D7)', () => { + // A shell group answers for its own id and, through `renamedFrom`, for the + // retired ids it took over (#39053). const shellGroupIds = new Set( - (SETUP_APP.navigation ?? []).map((n) => n.id), + (SETUP_APP.navigation ?? []) + .filter((n) => n.type === 'group') + .flatMap((n) => [n.id, ...((n as { renamedFrom?: string[] }).renamedFrom ?? [])]), ); it('all target the setup app and an existing shell group', () => { From 6af7871bdea3fc17cd6f07489d202980c19879f8 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Dec 2026 07:03:37 +0000 Subject: [PATCH 05/12] test(#39053): type the retired-id owner map Claude-Session: https://claude.ai/code/session_01WGufzfhZDUp9rF94Nz3frb Co-authored-by: Claude --- packages/platform-objects/src/platform-objects.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/platform-objects/src/platform-objects.test.ts b/packages/platform-objects/src/platform-objects.test.ts index 5bf76a3dbc9..617cf98ac7b 100644 --- a/packages/platform-objects/src/platform-objects.test.ts +++ b/packages/platform-objects/src/platform-objects.test.ts @@ -554,7 +554,7 @@ describe('@objectstack/platform-objects', () => { for (const item of SETUP_APP.navigation ?? []) { for (const old of (item as { renamedFrom?: string[] }).renamedFrom ?? []) { expect(owner.has(old)).toBe(false); - owner.set(old, item.id); + owner.set(old, String(item.id)); } } expect(Object.fromEntries(owner)).toEqual({ From baca82af4b66ea821871a57e298e95d7e907f49c Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Dec 2026 07:07:21 +0000 Subject: [PATCH 06/12] test(#39053): cli pins read the served Setup anchors; drop the volatile Setup entry count Claude-Session: https://claude.ai/code/session_01WGufzfhZDUp9rF94Nz3frb Co-authored-by: Claude --- ...at.server-ready-dev-admin-audience.test.ts | 6 ++- ...connect-agent-both-halves-wire.pin.test.ts | 45 ++++++------------- .../setup-diagnostics-audience.pin.test.ts | 4 +- .../test/setup-integrations-order.pin.test.ts | 15 ++++++- 4 files changed, 33 insertions(+), 37 deletions(-) diff --git a/packages/cli/src/utils/format.server-ready-dev-admin-audience.test.ts b/packages/cli/src/utils/format.server-ready-dev-admin-audience.test.ts index 038a48ad0a4..0e16feefacd 100644 --- a/packages/cli/src/utils/format.server-ready-dev-admin-audience.test.ts +++ b/packages/cli/src/utils/format.server-ready-dev-admin-audience.test.ts @@ -168,8 +168,10 @@ describe('#17081 — the claim and the route are the platform\'s own declaration expect(users!.label).toBe('Users'); // Ungated: an operator holding only `setup.access` still sees the entry. expect(users!.requiredPermissions ?? []).toEqual([]); - // …and the group anchor it lands in is ungated too. - const group = (SETUP_APP.navigation ?? []).find((g) => g.id === 'group_people_org'); + // …and the group anchor it lands in is ungated too: `group_users_org`, which + // took the contribution's `group_people_org` over through `renamedFrom` (#39053). + const group = (SETUP_APP.navigation ?? []).find((g) => g.id === 'group_users_org'); + expect((group as { renamedFrom?: string[] } | undefined)?.renamedFrom).toContain('group_people_org'); expect(group).toBeDefined(); expect((group as { requiredPermissions?: string[] }).requiredPermissions ?? []).toEqual([]); }); diff --git a/packages/cli/test/connect-agent-both-halves-wire.pin.test.ts b/packages/cli/test/connect-agent-both-halves-wire.pin.test.ts index e9edaa62d3d..9ea4dac556d 100644 --- a/packages/cli/test/connect-agent-both-halves-wire.pin.test.ts +++ b/packages/cli/test/connect-agent-both-halves-wire.pin.test.ts @@ -258,42 +258,25 @@ describe('#17647 — Connect-an-Agent visibility: BOTH halves, over the wire', ( expect(setupAllowed.body?.error).toBeUndefined(); const allowedIds = navIds(setupAllowed.body?.item); expect(allowedIds).toContain('nav_connect_agent'); - // The top group, behind System Overview (#30895). - expect(groupChildren(setupAllowed.body?.item, 'group_overview')) - .toEqual(['nav_system_overview', 'nav_connect_agent']); - // The Setup tree the platform admin is served BY THIS COMPOSITION: 9 - // authored groups less `group_approvals` and `group_integrations`, - // which nothing in it contributes into and the filter collapses, plus - // the 28 entries `SETUP_NAV_CONTRIBUTIONS` carries, plus the MCP one. - // (25 until #25098 moved the unfiltered Packages entry to Studio; 24 - // until #30204 removed the Feature Flags entry with its namespace; 32 - // until #30895 moved the MCP entry out of `group_integrations`, the - // one entry this composition put there; 31 until the organization - // Access policy entry, `nav_settings_access_policy`, joined - // Configuration; 32 until the recycle bin entry, `nav_recycle_bin`, - // joined Configuration (#30239); 33 until objectstack#34724 retired - // the Packaged Actions entry, `nav_packaged_actions`, the one entry - // `group_apps` held here, so that group collapses too; 31 until the - // Units of Measure entry, `nav_units_of_measure`, joined Configuration - // (#35488); 32 until the working-calendar pair, `nav_work_calendars` - // and `nav_work_calendar_exceptions`, joined it, ADR-0157; 34 until - // the public forms entry, `nav_public_forms`, joined it, #36444; 35 - // until objectstack#36834 gave Setup its Packages entry, - // `nav_packages`, in `group_apps`, so that group is served again: - // +2, `group_apps` and `nav_packages`; 37 until #33933 moved the - // Knowledge entry, `nav_settings_knowledge`, to - // `@objectstack/service-knowledge`, which contributes it only where the - // knowledge service is mounted; 36 until the Standard Unit Settings - // entry, `nav_standard_unit_settings`, joined Configuration, ADR-0158 - // Open item 10.) + // [#39053] System Overview is Setup's pinned first entry, outside every + // group. `group_overview` retired with no successor group, so the MCP + // entry its bundle still aims there is relocated to the top level (with + // the missing-group diagnostic) until the bundle names its new group. + const topIds = ((setupAllowed.body?.item?.navigation ?? []) as AnyRec[]).map((n) => String(n?.id)); + expect(topIds[0]).toBe('nav_system_overview'); + expect(topIds).toContain('nav_connect_agent'); + // The Setup tree the platform admin is served BY THIS COMPOSITION: + // platform-objects' own contributions plus the MCP one. No total is + // pinned here: the entry count moves with ordinary development + // (AGENTS.md, volatile counts), so the reading is by membership. // `nav_settings_branding` is not among them, and not because of a // tenancy wall (this harness boots none): since #24766 it is // contributed by `@objectstack/service-settings` together with the // `branding` namespace, offered only where no organization wall stands, // and this harness composes platform-objects and the MCP bundle alone. - expect(allowedIds).toHaveLength(37); expect(allowedIds).toContain('nav_packages'); - expect(groupChildren(setupAllowed.body?.item, 'group_apps')).toEqual(['nav_packages']); + // `group_apps` retired into `group_apps_ai` through `renamedFrom` (#39053). + expect(groupChildren(setupAllowed.body?.item, 'group_apps_ai')).toEqual(['nav_packages']); expect(allowedIds).toContain('nav_public_forms'); // #37087 — the id is Setup's alone now: Studio's entry of the same id // is retired with the console page it opened (`developer:public-forms`). @@ -339,8 +322,6 @@ describe('#17647 — Connect-an-Agent visibility: BOTH halves, over the wire', ( expect(withAccountHalf.statusCode).toBe(200); expect(withoutAccountHalf.statusCode).toBe(200); expect(navIds(withAccountHalf.body?.item)).toEqual(navIds(withoutAccountHalf.body?.item)); - // 37: the composition the count in the test above states. - expect(navIds(withAccountHalf.body?.item)).toHaveLength(37); // The mechanism behind the invariance, asserted rather than assumed: // the bundle aims exactly one contribution at `setup` and one at diff --git a/packages/cli/test/setup-diagnostics-audience.pin.test.ts b/packages/cli/test/setup-diagnostics-audience.pin.test.ts index 9a3dca0152e..4fdce0e8d49 100644 --- a/packages/cli/test/setup-diagnostics-audience.pin.test.ts +++ b/packages/cli/test/setup-diagnostics-audience.pin.test.ts @@ -44,7 +44,9 @@ import { ADMIN_FULL_ACCESS_CAPABILITIES } from '@objectstack/spec'; type AnyRec = Record; -const GROUP = 'group_diagnostics'; +// [#39053] The served anchor: `group_diagnostics` retired into it through +// `renamedFrom`, and the contributions below still name the old id. +const GROUP = 'group_audit_data'; /** * The manifests a plugin registers from `init()`, captured off a context that diff --git a/packages/cli/test/setup-integrations-order.pin.test.ts b/packages/cli/test/setup-integrations-order.pin.test.ts index 2238e1126c5..db912020407 100644 --- a/packages/cli/test/setup-integrations-order.pin.test.ts +++ b/packages/cli/test/setup-integrations-order.pin.test.ts @@ -5,7 +5,8 @@ // --------------------------------------------------------------------------- // What this pins // --------------------------------------------------------------------------- -// `SETUP_APP` declares `group_integrations` as an empty anchor (ADR-0029 D7); +// `SETUP_APP` declares `group_integrations_dev` as an empty anchor (ADR-0029 D7), +// answering for the retired `group_integrations` through `renamedFrom` (#39053); // every entry in it is contributed at runtime by the package that owns the // capability, and `SchemaRegistry.applyNavContributions` orders the // contributions by their `priority`, lowest first. Today that reads: @@ -62,6 +63,11 @@ import { SLACK_SETUP_UI_BUNDLE } from '@objectstack/service-messaging'; type AnyRec = Record; const GROUP = 'group_integrations'; +// [#39053] The served anchor. `group_integrations` retired into it through +// `renamedFrom`, together with `group_advanced`, so the served group holds the +// entries of BOTH retired ids until each contributor names the new id. This pin +// orders the ones contributed under `GROUP`, read in the served group. +const SERVED_GROUP = 'group_integrations_dev'; /** * The group, in the order an administrator reads it. Each inner array is one @@ -146,7 +152,12 @@ describe('Setup → Integrations: the merged order follows each contributor\'s p registry.registerAppNavContribution(contribution as any, packageId); } - const merged = groupChildren(registry.getApp('setup'), GROUP); + const underGroup = new Set( + contributions + .filter(({ contribution }) => contribution.group === GROUP) + .flatMap(({ contribution }) => (contribution.items ?? []).map((item: AnyRec) => String(item.id))), + ); + const merged = groupChildren(registry.getApp('setup'), SERVED_GROUP).filter((id) => underGroup.has(id)); // ── The order an administrator reads ────────────────────────────── expect(merged).toHaveLength(EXPECTED_TIERS.flat().length); From 52290ca686fed6c433edba857c467fc9cb05bf2f Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Dec 2026 07:12:42 +0000 Subject: [PATCH 07/12] test(#39053): served-tree pins in audit, security, knowledge, messaging and settings read the new Setup anchors Contribution-level assertions keep the old ids (contributions move in #39057/#39058); only lookups into the served Setup tree and the Setup translation keys move to the groups that took the old ids over through `renamedFrom`. Claude-Session: https://claude.ai/code/session_01WGufzfhZDUp9rF94Nz3frb Co-authored-by: Claude --- .../plugin-audit/src/audit-nav-contribution.test.ts | 4 +++- .../people-org-assignment-nav-contribution.test.ts | 13 ++++++++----- .../knowledge-settings-contribution.test.ts | 3 ++- .../src/slack-channel-composition.test.ts | 2 +- .../src/settings-branding-posture.pin.test.ts | 3 ++- .../src/setup-nav-hub-parity.test.ts | 3 ++- 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/packages/plugins/plugin-audit/src/audit-nav-contribution.test.ts b/packages/plugins/plugin-audit/src/audit-nav-contribution.test.ts index 70be260d329..d4733dffdca 100644 --- a/packages/plugins/plugin-audit/src/audit-nav-contribution.test.ts +++ b/packages/plugins/plugin-audit/src/audit-nav-contribution.test.ts @@ -136,7 +136,9 @@ describe('AuditPlugin — one Setup audit entry (#23890)', () => { const audit = all.filter(isAuditSurface); expect(audit.map((i) => i.id)).toEqual(['nav_audit_logs']); - expect(audit[0]).toMatchObject({ type: 'component', componentRef: 'audit:log', group: 'group_diagnostics' }); + // Served under `group_audit_data`, which took the contribution's + // `group_diagnostics` over through `renamedFrom` (#39053). + expect(audit[0]).toMatchObject({ type: 'component', componentRef: 'audit:log', group: 'group_audit_data' }); // The page's former id is not served beside it. expect(all.map((i) => i.id)).not.toContain('nav_audit_log_browser'); }); diff --git a/packages/plugins/plugin-security/src/people-org-assignment-nav-contribution.test.ts b/packages/plugins/plugin-security/src/people-org-assignment-nav-contribution.test.ts index 3ef6d6397c5..f8ecb9d3986 100644 --- a/packages/plugins/plugin-security/src/people-org-assignment-nav-contribution.test.ts +++ b/packages/plugins/plugin-security/src/people-org-assignment-nav-contribution.test.ts @@ -135,14 +135,16 @@ describe('SecurityPlugin — Setup People & Organization assignment entries (ADR it('the rendered Setup nav serves both under People & Organization, beside the base entries', async () => { const nav = await renderedSetup(true); - const children = groupChildren(nav, 'group_people_org'); + // Served under `group_users_org`, which took the contribution's + // `group_people_org` over through `renamedFrom` (#39053). + const children = groupChildren(nav, 'group_users_org'); // Control: platform-objects' base entries fold into the same group. expect(children.map((i) => i.id)).toContain('nav_users'); expect(children.find((i) => i.id === POSITION_HOLDERS.id)).toMatchObject(POSITION_HOLDERS); expect(children.find((i) => i.id === PERMISSION_SET_ASSIGNMENT.id)).toMatchObject(PERMISSION_SET_ASSIGNMENT); // The group anchor they land in is ungated, like Access Control's. - const anchor = nav.find((n) => n.id === 'group_people_org'); - const accessControl = nav.find((n) => n.id === 'group_access_control'); + const anchor = nav.find((n) => n.id === 'group_users_org'); + const accessControl = nav.find((n) => n.id === 'group_access_sharing'); expect(anchor?.requiredPermissions ?? []).toEqual(accessControl?.requiredPermissions ?? []); // Both entries open in exactly one place. const all = nav.flatMap((n) => n.children ?? []); @@ -169,7 +171,7 @@ describe('SecurityPlugin — Setup People & Organization assignment entries (ADR // source digest no longer matches is served as the English source // (`withSourceFallback`), and that is what an administrator reads. describe('SecurityPlugin — People & Organization assignment entries are labelled in every Setup locale', () => { - it('each locale carrying group_people_org labels both entries; translated locales do not serve the English', async () => { + it('each locale carrying the People & Organization group labels both entries; translated locales do not serve the English', async () => { const manifest = await registeredManifest(); const ids = (manifest.navigationContributions as Contribution[]) .filter((c) => c.app === 'setup' && c.group === 'group_people_org') @@ -178,7 +180,8 @@ describe('SecurityPlugin — People & Organization assignment entries are labell const navOf = (locale: string) => ((SetupAppTranslations as any)[locale]?.apps?.setup?.navigation ?? {}) as Record; - const locales = Object.keys(SetupAppTranslations).filter((l) => navOf(l).group_people_org?.label); + // The served group is `group_users_org` (#39053), so that is the key a locale labels. + const locales = Object.keys(SetupAppTranslations).filter((l) => navOf(l).group_users_org?.label); // Control: every Setup locale carries the group, so the loop below judges something. expect(locales.sort()).toEqual(['ar', 'de', 'en', 'es-ES', 'fr', 'ja-JP', 'ko', 'pt-BR', 'ru', 'zh-CN', 'zh-Hant']); diff --git a/packages/services/service-knowledge/src/__tests__/knowledge-settings-contribution.test.ts b/packages/services/service-knowledge/src/__tests__/knowledge-settings-contribution.test.ts index 2fd23803799..05aec3de947 100644 --- a/packages/services/service-knowledge/src/__tests__/knowledge-settings-contribution.test.ts +++ b/packages/services/service-knowledge/src/__tests__/knowledge-settings-contribution.test.ts @@ -82,7 +82,8 @@ function configurationEntries(registered: unknown[]): NavItem[] { } as any); for (const m of registered) engine.registerApp(m as any); const navigation = (engine.registry.getApp('setup') as { navigation?: NavItem[] } | undefined)?.navigation ?? []; - return navigation.find((item) => item.id === 'group_configuration')?.children ?? []; + // `group_company` took `group_configuration` over through `renamedFrom` (#39053). + return navigation.find((item) => item.id === 'group_company')?.children ?? []; } const knowledgeEntries = (registered: unknown[]) => diff --git a/packages/services/service-messaging/src/slack-channel-composition.test.ts b/packages/services/service-messaging/src/slack-channel-composition.test.ts index 56ad6e9c313..314ba41a106 100644 --- a/packages/services/service-messaging/src/slack-channel-composition.test.ts +++ b/packages/services/service-messaging/src/slack-channel-composition.test.ts @@ -181,7 +181,7 @@ function setupIntegrations(manifests: Array<{ id?: string; navigationContributio for (const m of manifests) { if (m.id && Array.isArray(m.navigationContributions)) registry.setPackageNavContributions(m.id, m.navigationContributions as any); } - const group = (registry.getApp('setup') as any)?.navigation?.find((item: any) => item?.id === 'group_integrations'); + const group = (registry.getApp('setup') as any)?.navigation?.find((item: any) => item?.id === 'group_integrations_dev'); // took `group_integrations` over (#39053) return (group?.children ?? []) as Array<{ id: string; componentRef?: string; requiredPermissions?: string[] }>; } diff --git a/packages/services/service-settings/src/settings-branding-posture.pin.test.ts b/packages/services/service-settings/src/settings-branding-posture.pin.test.ts index 0d71613953e..d56a157555f 100644 --- a/packages/services/service-settings/src/settings-branding-posture.pin.test.ts +++ b/packages/services/service-settings/src/settings-branding-posture.pin.test.ts @@ -142,7 +142,8 @@ function mergedSetupNavIds(registered: unknown[]): { ids: string[]; configuratio }; const navigation = (engine.registry.getApp('setup') as { navigation?: any[] } | undefined)?.navigation; walk(navigation); - const group = (navigation ?? []).find((item) => item?.id === 'group_configuration'); + // `group_company` took `group_configuration` over through `renamedFrom` (#39053). + const group = (navigation ?? []).find((item) => item?.id === 'group_company'); return { ids, configuration: (group?.children ?? []).map((item: any) => item?.id) }; } diff --git a/packages/services/service-settings/src/setup-nav-hub-parity.test.ts b/packages/services/service-settings/src/setup-nav-hub-parity.test.ts index 07351f8d1e7..68b14a5bc0f 100644 --- a/packages/services/service-settings/src/setup-nav-hub-parity.test.ts +++ b/packages/services/service-settings/src/setup-nav-hub-parity.test.ts @@ -83,7 +83,8 @@ function configurationEntries(registered: unknown[]): NavItem[] { }); for (const m of registered) engine.registerApp(m); const navigation = (engine.registry.getApp('setup') as { navigation?: NavItem[] } | undefined)?.navigation ?? []; - return navigation.find((item) => item.id === 'group_configuration')?.children ?? []; + // `group_company` took `group_configuration` over through `renamedFrom` (#39053). + return navigation.find((item) => item.id === 'group_company')?.children ?? []; } function settingsPageEntries(entries: NavItem[]): Map { From b95ff51c1ffe3e4cc413692bbb35a51c26db1870 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Dec 2026 07:23:53 +0000 Subject: [PATCH 08/12] docs(#39053): apps.mdx lists the ten Setup anchors and renamedFrom; changeset Claude-Session: https://claude.ai/code/session_01WGufzfhZDUp9rF94Nz3frb Co-authored-by: Claude --- .changeset/39053-setup-ten-group-anchors.md | 20 ++++++++ content/docs/ui/apps.mdx | 57 ++++++++++++++++----- 2 files changed, 63 insertions(+), 14 deletions(-) create mode 100644 .changeset/39053-setup-ten-group-anchors.md diff --git a/.changeset/39053-setup-ten-group-anchors.md b/.changeset/39053-setup-ten-group-anchors.md new file mode 100644 index 00000000000..51ffcfdbceb --- /dev/null +++ b/.changeset/39053-setup-ten-group-anchors.md @@ -0,0 +1,20 @@ +--- +'@objectstack/spec': minor +'@objectstack/objectql': minor +'@objectstack/platform-objects': minor +'@objectstack/cli': patch +'@objectstack/runtime': patch +--- + +feat(setup): Setup navigation gets ten group anchors; a nav group's `renamedFrom` keeps retired ids working + +Clause-②: yes (widening) +Metadata-protocol: added + +**New key: `renamedFrom` on a group nav item** (`GroupNavItemSchema`, optional, a list of nav ids). It names the group ids the group replaced. A `navigationContributions[]` entry whose `group` names one of them lands in that group instead of the app's top level. The merge looks for an exact group id first and reads `renamedFrom` only when none matches. The app's own parse refuses an entry that is the group's own id, repeats in the list, is an id another entry of the app still declares, or is claimed by a second group, and refuses the key on a group inside `areas[].navigation`, where no contribution is merged. Nothing changes for an app that does not write the key. + +**New warning: `nav_contribution_group_renamed`.** A contribution that names a retired id is logged at `warn` by the runtime and reported by `os build` and `os validate` under its own headline. The message names the package, the retired id and the group that took it over; the fix is to change the contribution's `group` to the new id. It is not a relocation, so `getAppNavDiagnostics()` and the plugin-security upgrade-impact report leave it out. `@objectstack/objectql` exports `resolveNavGroup`, `navContributionGroupRenamedDiagnostic`, `NAV_CONTRIBUTION_GROUP_RENAMED` and the `NavContributionGroupMissingDiagnostic` / `NavContributionGroupRenamedDiagnostic` / `NavGroupResolution` types; `NavContributionGroupDiagnostic` is now the union of the missing and renamed shapes. + +**Setup's anchors.** The System Overview dashboard is pinned above the groups. The groups, in order: `group_users_org`, `group_access_sharing`, `group_apps_ai`, `group_routing_approvals`, `group_audit_data` (expanded), then `group_company`, `group_currency_units`, `group_notifications`, `group_login_security`, `group_integrations_dev` (collapsed), labelled in all 11 Setup locales. Each group that replaced an old anchor lists it in `renamedFrom`, so every existing contribution still lands in the right place, with the warning above. `group_overview` has no successor: a contribution still naming it is appended at the top level with the `nav_contribution_group_missing` warning. + +**What a package author does.** If your package contributes into Setup, change `group` to the new id named in the warning: `group_people_org` → `group_users_org`, `group_access_control` → `group_access_sharing`, `group_apps` → `group_apps_ai`, `group_approvals` → `group_routing_approvals`, `group_diagnostics` → `group_audit_data`, `group_configuration` → `group_company`, `group_integrations` and `group_advanced` → `group_integrations_dev`. A translation bundle keyed by an old group id (`apps.setup.navigation.`) no longer labels anything; key it by the new id. diff --git a/content/docs/ui/apps.mdx b/content/docs/ui/apps.mdx index 8823ff0fa79..8d26393fe9f 100644 --- a/content/docs/ui/apps.mdx +++ b/content/docs/ui/apps.mdx @@ -857,7 +857,7 @@ them in a code package. navigationContributions: [ { app: 'setup', - group: 'group_integrations', + group: 'group_integrations_dev', priority: 100, items: [ { id: 'nav_webhooks', type: 'object', label: 'Webhooks', objectName: 'sys_webhook', requiresObject: 'sys_webhook', order: 30 }, @@ -895,19 +895,48 @@ the build. The anchor id is the whole contract between the shell and its contributors, and a typo renders a working menu with the entry one level up, so read that warning. -The Setup app's anchors: - -| Group id | Holds | -| :--- | :--- | -| `group_overview` | System Overview dashboard | -| `group_apps` | Packages and the marketplace | -| `group_people_org` | Users, organizations, business units, teams, invitations | -| `group_access_control` | Positions, permission sets, sharing rules, API keys | -| `group_approvals` | Approvals inbox, requests, history, delegations | -| `group_configuration` | Settings, localization, exchange rates, working calendars, authentication, email, storage, AI, branding | -| `group_diagnostics` | Sessions, notification events, audit log | -| `group_integrations` | Webhooks, cloud connection | -| `group_advanced` | OAuth applications | +**A group can take over retired ids.** A group nav item may list the ids it +replaced in `renamedFrom`, so a contribution that still names one of them lands in +that group instead of the top level. The merge looks for an exact group id first, +and only then for a group whose `renamedFrom` lists the id. Such a contribution +raises a `nav_contribution_group_renamed` warning that names the package, the +retired id and the group that took it over, from the runtime and from `os build` +and `os validate`; change the contribution's `group` to the new id. The app's own +parse refuses a `renamedFrom` entry that is the group's own id, repeats in the +list, is an id another entry of the app still declares, or is claimed by a second +group, and refuses the key on a group inside `areas[].navigation`, where no +contribution is merged. + +```typescript +{ + id: 'group_integrations_dev', + type: 'group', + label: 'Integrations & Developer', + renamedFrom: ['group_integrations', 'group_advanced'], + children: [], +} +``` + +The Setup app opens with the System Overview dashboard pinned above its groups, +then these anchors, in this order: + +| Group id | Holds | Took over | +| :--- | :--- | :--- | +| `group_users_org` | Users, organizations, business units, teams, invitations | `group_people_org` | +| `group_access_sharing` | Positions, permission sets, sharing rules, API keys | `group_access_control` | +| `group_apps_ai` | Packages and the marketplace | `group_apps` | +| `group_routing_approvals` | Approvals inbox, requests, history, delegations | `group_approvals` | +| `group_audit_data` | Sessions, notification events, audit log | `group_diagnostics` | +| `group_company` | Settings, localization, exchange rates, working calendars, authentication, email, storage, AI, branding | `group_configuration` | +| `group_currency_units` | Currency and unit settings | | +| `group_notifications` | Notification settings | | +| `group_login_security` | Login and security settings | | +| `group_integrations_dev` | Webhooks, cloud connection, OAuth applications | `group_integrations`, `group_advanced` | + +The first five start expanded and the last five collapsed. The retired +`group_overview` has no successor: the dashboard it held is pinned at the top, +and a contribution still naming it is appended at the top level with the +`nav_contribution_group_missing` warning. **Exchange Rates** (`sys_exchange_rate`, under Localization) holds an organization's dated rates, editable by its administrators. One row means 1 unit of the home currency (Localization → Default currency) = `rate` units From ea60dcc28259b871f0f359d671f01ee26f1fca7c Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Dec 2026 08:22:55 +0000 Subject: [PATCH 09/12] fix(#39053): keep the published relocation diagnostic contract; rename notices get their own check L1 M1 on #39092: `NavContributionGroupDiagnostic` is published (the return type of `checkNavContributionGroups` and `getAppNavDiagnostics`), so it stays the relocation finding. The either-finding union is the new `NavContributionGroupFinding`; compile-time rename notices come from the new `checkNavContributionGroupRenames`, and the cli reads both. The registry dedupes rename notices outside `navGroupDiagnostics`, so `getAppNavDiagnostics` is unchanged from main. The cli tells the two apart by shape, so it imports no value the build/validate parity scan would read as a gate. Claude-Session: https://claude.ai/code/session_01WGufzfhZDUp9rF94Nz3frb Co-authored-by: Claude --- .changeset/39053-setup-ten-group-anchors.md | 2 +- packages/cli/src/commands/compile.ts | 10 ++- packages/cli/src/commands/validate.ts | 10 ++- .../cli/src/utils/nav-contribution-groups.ts | 13 +-- packages/objectql/src/core.ts | 3 +- packages/objectql/src/index.ts | 3 +- .../src/nav-contribution-diagnostics.ts | 81 ++++++++++++++----- packages/objectql/src/registry-apps.ts | 50 ++++++------ ...y-nav-contribution-group-semantics.test.ts | 24 +++++- 9 files changed, 133 insertions(+), 63 deletions(-) diff --git a/.changeset/39053-setup-ten-group-anchors.md b/.changeset/39053-setup-ten-group-anchors.md index 51ffcfdbceb..e8670643dc0 100644 --- a/.changeset/39053-setup-ten-group-anchors.md +++ b/.changeset/39053-setup-ten-group-anchors.md @@ -13,7 +13,7 @@ Metadata-protocol: added **New key: `renamedFrom` on a group nav item** (`GroupNavItemSchema`, optional, a list of nav ids). It names the group ids the group replaced. A `navigationContributions[]` entry whose `group` names one of them lands in that group instead of the app's top level. The merge looks for an exact group id first and reads `renamedFrom` only when none matches. The app's own parse refuses an entry that is the group's own id, repeats in the list, is an id another entry of the app still declares, or is claimed by a second group, and refuses the key on a group inside `areas[].navigation`, where no contribution is merged. Nothing changes for an app that does not write the key. -**New warning: `nav_contribution_group_renamed`.** A contribution that names a retired id is logged at `warn` by the runtime and reported by `os build` and `os validate` under its own headline. The message names the package, the retired id and the group that took it over; the fix is to change the contribution's `group` to the new id. It is not a relocation, so `getAppNavDiagnostics()` and the plugin-security upgrade-impact report leave it out. `@objectstack/objectql` exports `resolveNavGroup`, `navContributionGroupRenamedDiagnostic`, `NAV_CONTRIBUTION_GROUP_RENAMED` and the `NavContributionGroupMissingDiagnostic` / `NavContributionGroupRenamedDiagnostic` / `NavGroupResolution` types; `NavContributionGroupDiagnostic` is now the union of the missing and renamed shapes. +**New warning: `nav_contribution_group_renamed`.** A contribution that names a retired id is logged at `warn` by the runtime and reported by `os build` and `os validate` under its own headline. The message names the package, the retired id and the group that took it over; the fix is to change the contribution's `group` to the new id. It is not a relocation, so the published relocation surface keeps its contract: `NavContributionGroupDiagnostic`, `checkNavContributionGroups()` and `SchemaRegistry#getAppNavDiagnostics()` are unchanged and never carry it (a group id that resolves through `renamedFrom` is not reported there). `@objectstack/objectql` adds `checkNavContributionGroupRenames()` (the compile-time notices, `NavContributionGroupRenamedDiagnostic[]`), `resolveNavGroup()`, `navContributionGroupRenamedDiagnostic()`, `NAV_CONTRIBUTION_GROUP_RENAMED`, and the `NavContributionGroupRenamedDiagnostic` / `NavContributionGroupFinding` (either finding) / `NavGroupResolution` types; `findNavGroup()` now also finds a group through its `renamedFrom`, and `formatNavContributionGroupDiagnostic()` accepts either finding. **Setup's anchors.** The System Overview dashboard is pinned above the groups. The groups, in order: `group_users_org`, `group_access_sharing`, `group_apps_ai`, `group_routing_approvals`, `group_audit_data` (expanded), then `group_company`, `group_currency_units`, `group_notifications`, `group_login_security`, `group_integrations_dev` (collapsed), labelled in all 11 Setup locales. Each group that replaced an old anchor lists it in `renamedFrom`, so every existing contribution still lands in the right place, with the warning above. `group_overview` has no successor: a contribution still naming it is appended at the top level with the `nav_contribution_group_missing` warning. diff --git a/packages/cli/src/commands/compile.ts b/packages/cli/src/commands/compile.ts index 0ed7640ca08..4f7db2ed95b 100644 --- a/packages/cli/src/commands/compile.ts +++ b/packages/cli/src/commands/compile.ts @@ -68,7 +68,7 @@ import { // [#14553] The compile-time half of the navigation-contribution group ruling. // Reports; never refuses — the runtime still relocates, deliberately. import { findNavGroupDiagnostics } from '../utils/nav-contribution-groups.js'; -import { NAV_CONTRIBUTION_GROUP_MISSING, type NavContributionGroupDiagnostic } from '@objectstack/objectql'; +import type { NavContributionGroupFinding } from '@objectstack/objectql'; // [#18024] The compile-time half of the #17516 permission-set name-collision // ruling. Reports; never refuses — the runtime still drops the set, deliberately // (ADR-0086 D4), and what was missing was the author hearing about it. @@ -221,7 +221,7 @@ export default class Compile extends Command { // `warnings`. `os validate` computes the same list, so the parity the // third pin in that file asserts ("nothing rides in build that validate // does not also report") holds rather than being weakened to fit. - let navGroupWarnings: NavContributionGroupDiagnostic[] = []; + let navGroupWarnings: NavContributionGroupFinding[] = []; // [#18024] The permission-set name-collision half, a member of // `warningsSoFar()` for the same three reasons the list above it records: // the two undeclared-key pins refuse a new top-level payload key by name, @@ -842,8 +842,10 @@ export default class Compile extends Command { // declare (the items are RELOCATED to its top level), and a retired // group id a group took over through `renamedFrom` (the items land // there). Each gets its own headline, so neither reads as the other. - const relocated = navGroupWarnings.filter((d) => d.code === NAV_CONTRIBUTION_GROUP_MISSING); - const renamed = navGroupWarnings.filter((d) => d.code !== NAV_CONTRIBUTION_GROUP_MISSING); + // Told apart by shape, not by importing the code constant: a value + // import here is a gate as far as the build/validate parity scan reads. + const relocated = navGroupWarnings.filter((d) => 'relocated' in d); + const renamed = navGroupWarnings.filter((d) => !('relocated' in d)); if (relocated.length > 0) { console.log(''); printWarning( diff --git a/packages/cli/src/commands/validate.ts b/packages/cli/src/commands/validate.ts index 4c690c1d8e5..9fdc32fb59a 100644 --- a/packages/cli/src/commands/validate.ts +++ b/packages/cli/src/commands/validate.ts @@ -67,7 +67,7 @@ import { readSpecReleaseChanges } from '../utils/spec-release-changes.js'; // [#14553] The navigation-contribution group check, shared with `os compile`. // Reports; never refuses — the runtime still relocates, deliberately. import { findNavGroupDiagnostics } from '../utils/nav-contribution-groups.js'; -import { NAV_CONTRIBUTION_GROUP_MISSING, type NavContributionGroupDiagnostic } from '@objectstack/objectql'; +import type { NavContributionGroupFinding } from '@objectstack/objectql'; // [#18024] The permission-set name-collision check, shared with `os compile`. // Reports; never refuses — the runtime still drops the foreign set, correctly // (ADR-0086 D4); what was missing was the author hearing about it. @@ -214,7 +214,7 @@ export default class Validate extends Command { // #11727 residue pin asserts that nothing rides in build's `warnings` that // validate does not also report, and the two commands being one wall with // two doors is the #4409 / #4463 discipline this list already follows. - let navGroupWarnings: NavContributionGroupDiagnostic[] = []; + let navGroupWarnings: NavContributionGroupFinding[] = []; // [#18024] Computed HERE as well as in `os compile`, and for the same // reason the line above it gives: the #11727 residue pin asserts that // nothing rides in build's `warnings` that validate does not also report. @@ -1037,8 +1037,10 @@ export default class Validate extends Command { // declare (the items are RELOCATED to its top level), and a retired // group id a group took over through `renamedFrom` (the items land // there). Each gets its own headline, so neither reads as the other. - const relocated = navGroupWarnings.filter((d) => d.code === NAV_CONTRIBUTION_GROUP_MISSING); - const renamed = navGroupWarnings.filter((d) => d.code !== NAV_CONTRIBUTION_GROUP_MISSING); + // Told apart by shape, not by importing the code constant: a value + // import here is a gate as far as the build/validate parity scan reads. + const relocated = navGroupWarnings.filter((d) => 'relocated' in d); + const renamed = navGroupWarnings.filter((d) => !('relocated' in d)); if (relocated.length > 0) { console.log(''); printWarning( diff --git a/packages/cli/src/utils/nav-contribution-groups.ts b/packages/cli/src/utils/nav-contribution-groups.ts index fe0c8f3bf05..1c61efd049e 100644 --- a/packages/cli/src/utils/nav-contribution-groups.ts +++ b/packages/cli/src/utils/nav-contribution-groups.ts @@ -97,7 +97,7 @@ * `os build` does. */ -import type { NavContributionGroupDiagnostic } from '@objectstack/objectql'; +import type { NavContributionGroupFinding } from '@objectstack/objectql'; import { artifactPackages } from './artifact-packages.js'; @@ -188,7 +188,10 @@ export function collectNavGroupInputs( /** * Every contribution in this compilation unit whose `group` names no group in * the target app — the same finding, in the same words, the runtime fold - * raises when it relocates one. + * raises when it relocates one — followed by every one whose `group` is a + * retired id a group of the target app took over through `renamedFrom` + * (#39053), the deprecation notice the fold logs when it lands one there. + * Discriminate the two on `code`. * * Returns `[]` without loading `@objectstack/objectql` when the stack declares * no contributions at all, which is the overwhelming majority of builds. @@ -196,9 +199,9 @@ export function collectNavGroupInputs( export async function findNavGroupDiagnostics( parsed: AnyRec, packages: readonly CompiledPackage[] = artifactPackages(parsed), -): Promise { +): Promise { const { apps, contributions } = collectNavGroupInputs(parsed, packages); if (contributions.length === 0 || apps.length === 0) return []; - const { checkNavContributionGroups } = await import('@objectstack/objectql/core'); - return checkNavContributionGroups(apps, contributions); + const { checkNavContributionGroups, checkNavContributionGroupRenames } = await import('@objectstack/objectql/core'); + return [...checkNavContributionGroups(apps, contributions), ...checkNavContributionGroupRenames(apps, contributions)]; } diff --git a/packages/objectql/src/core.ts b/packages/objectql/src/core.ts index 1307dd69f39..219df61021b 100644 --- a/packages/objectql/src/core.ts +++ b/packages/objectql/src/core.ts @@ -46,10 +46,11 @@ export { navContributionGroupRenamedDiagnostic, formatNavContributionGroupDiagnostic, checkNavContributionGroups, + checkNavContributionGroupRenames, } from './nav-contribution-diagnostics.js'; export type { NavContributionGroupDiagnostic, - NavContributionGroupMissingDiagnostic, + NavContributionGroupFinding, NavContributionGroupRenamedDiagnostic, NavGroupResolution, NavGroupHostApp, diff --git a/packages/objectql/src/index.ts b/packages/objectql/src/index.ts index ec3c37f7250..bed59b9a9ed 100644 --- a/packages/objectql/src/index.ts +++ b/packages/objectql/src/index.ts @@ -191,10 +191,11 @@ export { navContributionGroupRenamedDiagnostic, formatNavContributionGroupDiagnostic, checkNavContributionGroups, + checkNavContributionGroupRenames, } from './nav-contribution-diagnostics.js'; export type { NavContributionGroupDiagnostic, - NavContributionGroupMissingDiagnostic, + NavContributionGroupFinding, NavContributionGroupRenamedDiagnostic, NavGroupResolution, NavGroupHostApp, diff --git a/packages/objectql/src/nav-contribution-diagnostics.ts b/packages/objectql/src/nav-contribution-diagnostics.ts index 1b8c8d1213f..a168eedf458 100644 --- a/packages/objectql/src/nav-contribution-diagnostics.ts +++ b/packages/objectql/src/nav-contribution-diagnostics.ts @@ -105,7 +105,7 @@ export const NAV_CONTRIBUTION_GROUP_MISSING = 'nav_contribution_group_missing'; export const NAV_CONTRIBUTION_GROUP_RENAMED = 'nav_contribution_group_renamed'; /** One relocated-contribution finding (ADR-0038 BuildIssue family; ADR-0112 D6c). */ -export interface NavContributionGroupMissingDiagnostic { +export interface NavContributionGroupDiagnostic { /** Always {@link NAV_CONTRIBUTION_GROUP_MISSING}. */ readonly code: typeof NAV_CONTRIBUTION_GROUP_MISSING; /** Never `error`: the platform relocates and carries on — no refusal (option A not taken). */ @@ -147,11 +147,16 @@ export interface NavContributionGroupRenamedDiagnostic { } /** - * Every navigation-contribution finding, discriminated on `code`. Both doors - * (the registry fold and `os build` / `os validate`) carry this one union. + * Either navigation-contribution finding, discriminated on `code` (#39053). + * + * ⛔ A NEW name, and {@link NavContributionGroupDiagnostic} keeps its published + * meaning — the relocation finding, `relocated` included — because it is the + * return type of {@link checkNavContributionGroups} and of + * `SchemaRegistry#getAppNavDiagnostics`; turning that name into this union + * would break every consumer reading `d.relocated`. */ -export type NavContributionGroupDiagnostic = - | NavContributionGroupMissingDiagnostic +export type NavContributionGroupFinding = + | NavContributionGroupDiagnostic | NavContributionGroupRenamedDiagnostic; /** The shape this module needs from an app — its name and its nav tree. */ @@ -249,7 +254,7 @@ export function navContributionGroupDiagnostic(input: { group: string; packageId?: string; items?: unknown; -}): NavContributionGroupMissingDiagnostic { +}): NavContributionGroupDiagnostic { const relocated = relocatedIds(input.items); const who = input.packageId ?? '(unknown package)'; const what = relocated.length === 1 ? '1 navigation item' : `${relocated.length} navigation items`; @@ -305,15 +310,19 @@ export function navContributionGroupRenamedDiagnostic(input: { } /** One line carrying the whole finding — the text both doors print. */ -export function formatNavContributionGroupDiagnostic(d: NavContributionGroupDiagnostic): string { +export function formatNavContributionGroupDiagnostic(d: NavContributionGroupFinding): string { return `[Registry] [${d.code}] ${d.message} Fix: ${d.fix}`; } /** * The COMPILE-TIME half: every contribution in one composed artifact whose - * `group` names no group in the target app, and — as a deprecation notice — - * every one whose `group` is a retired id a group of the target app took over - * through `renamedFrom` (#39053). + * `group` names no group in the target app. + * + * A `group` that is a retired id a group of the target app took over through + * `renamedFrom` resolves, so it is NOT reported here: its items are not + * relocated. Its deprecation notice comes from + * {@link checkNavContributionGroupRenames} (#39053), so this list stays what + * it was published as — relocations only. * * ⚠️ A contribution whose target app is NOT among `apps` yields nothing, and * that silence is a decision rather than an oversight. A package may legally @@ -338,18 +347,7 @@ export function checkNavContributionGroups( if (!Array.isArray(c.items) || c.items.length === 0) continue; const target = byName.get(c.app); if (!target) continue; - const resolved = resolveNavGroup(target.navigation, c.group); - if (resolved?.matchedBy === 'id') continue; - if (resolved) { - found.push(navContributionGroupRenamedDiagnostic({ - app: c.app, - group: c.group, - renamedTo: String(resolved.group.id), - ...(c.packageId === undefined ? {} : { packageId: c.packageId }), - items: c.items, - })); - continue; - } + if (findNavGroup(target.navigation, c.group)) continue; found.push(navContributionGroupDiagnostic({ app: c.app, group: c.group, @@ -359,3 +357,42 @@ export function checkNavContributionGroups( } return found; } + +/** + * [#39053] The COMPILE-TIME deprecation notices: every contribution in one + * composed artifact whose `group` is a retired id that a group of the target + * app lists in `renamedFrom`. Its items land in that group, exactly as the + * registry's fold places them, so this is a notice to the contributing + * package to name the new id, never a relocation. + * + * Same population and the same silences as {@link checkNavContributionGroups} + * (a target app outside `apps`, a malformed or empty contribution); a `group` + * matching a group's own id is never reported — the exact id wins. + */ +export function checkNavContributionGroupRenames( + apps: readonly NavGroupHostApp[], + contributions: readonly NavGroupContribution[], +): NavContributionGroupRenamedDiagnostic[] { + const byName = new Map(); + for (const app of apps) { + if (typeof app?.name === 'string' && app.name !== '') byName.set(app.name, app); + } + + const found: NavContributionGroupRenamedDiagnostic[] = []; + for (const c of contributions) { + if (typeof c?.app !== 'string' || typeof c?.group !== 'string' || c.group === '') continue; + if (!Array.isArray(c.items) || c.items.length === 0) continue; + const target = byName.get(c.app); + if (!target) continue; + const resolved = resolveNavGroup(target.navigation, c.group); + if (resolved?.matchedBy !== 'renamedFrom') continue; + found.push(navContributionGroupRenamedDiagnostic({ + app: c.app, + group: c.group, + renamedTo: String(resolved.group.id), + ...(c.packageId === undefined ? {} : { packageId: c.packageId }), + items: c.items, + })); + } + return found; +} diff --git a/packages/objectql/src/registry-apps.ts b/packages/objectql/src/registry-apps.ts index 3f5beb7b197..aae3666186e 100644 --- a/packages/objectql/src/registry-apps.ts +++ b/packages/objectql/src/registry-apps.ts @@ -31,8 +31,8 @@ * evaluation cycle. `index.ts` re-exports nothing from this module. */ -import { formatNavContributionGroupDiagnostic, navContributionGroupDiagnostic, navContributionGroupRenamedDiagnostic, NAV_CONTRIBUTION_GROUP_MISSING, findNavGroup as resolveNavGroup } from './nav-contribution-diagnostics.js'; -import type { NavContributionGroupDiagnostic, NavContributionGroupMissingDiagnostic } from './nav-contribution-diagnostics.js'; +import { formatNavContributionGroupDiagnostic, navContributionGroupDiagnostic, navContributionGroupRenamedDiagnostic, findNavGroup as resolveNavGroup } from './nav-contribution-diagnostics.js'; +import type { NavContributionGroupDiagnostic, NavContributionGroupRenamedDiagnostic } from './nav-contribution-diagnostics.js'; import type { SchemaRegistry } from './registry.js'; /** @@ -213,32 +213,34 @@ export class AppsFacet { this.warn(formatNavContributionGroupDiagnostic(diagnostic)); } - /** - * The body of `SchemaRegistry#getAppNavDiagnostics`; the method's docblock there is its contract. - * - * [#39053] It answers the RELOCATIONS only — what happened to the app's - * tree. A retired-id notice (`recordNavGroupRename`) shares the per-app map - * for its once-per-process dedupe, but its items landed where their author - * meant, so it is a log line to the contributing package, not a change to - * the app; a reader of this list (the upgrade-impact report) counts every - * entry as a relocated contribution. - */ - static getAppNavDiagnostics(this: Pick, appName: string): NavContributionGroupMissingDiagnostic[] { - return [...(this.navGroupDiagnostics.get(appName)?.values() ?? [])].filter( - (d): d is NavContributionGroupMissingDiagnostic => d.code === NAV_CONTRIBUTION_GROUP_MISSING, - ); + /** The body of `SchemaRegistry#getAppNavDiagnostics`; the method's docblock there is its contract. */ + static getAppNavDiagnostics(this: Pick, appName: string): NavContributionGroupDiagnostic[] { + return [...(this.navGroupDiagnostics.get(appName)?.values() ?? [])]; } } +/** + * [#39053] The retired-id notices already announced, per registry: keyed by + * the registry's own `navGroupDiagnostics` map (one per registry, and + * collected with it), then by app, then by `packageId|group`. + * + * ⛔ Not in `navGroupDiagnostics` itself: that map is what + * `getAppNavDiagnostics` answers, a published list of RELOCATIONS + * (`NavContributionGroupDiagnostic`, `relocated` included), and a reader of + * it — the upgrade-impact report — counts every entry as a relocated + * contribution. A rename moved nothing. + */ +const announcedRenames = new WeakMap>>(); + /** * [#39053] Record — and, the first time, announce — one contribution that * named a retired group id and landed in `renamedTo`, the group listing that * id in `renamedFrom`. * - * Deduplicated per registry on the same map and for the same reason as - * `recordNavGroupMiss`: the fold runs on every read of the app. A module - * function rather than a facet method, because a facet method mirrors a - * `SchemaRegistry` method of the same name and this one has none. + * Deduplicated per registry for the same reason as `recordNavGroupMiss`: the + * fold runs on every read of the app. A module function rather than a facet + * method, because a facet method mirrors a `SchemaRegistry` method of the + * same name and this one has none. */ function recordNavGroupRename( host: Pick, @@ -246,8 +248,11 @@ function recordNavGroupRename( c: { packageId?: string; group?: string; items: any[] }, renamedTo: string, ): void { - const perApp = host.navGroupDiagnostics.get(appName) ?? new Map(); - const key = `renamed|${c.packageId ?? ''}|${c.group}`; + const perRegistry = announcedRenames.get(host.navGroupDiagnostics) ?? new Map>(); + announcedRenames.set(host.navGroupDiagnostics, perRegistry); + const perApp = perRegistry.get(appName) ?? new Map(); + perRegistry.set(appName, perApp); + const key = `${c.packageId ?? ''}|${c.group}`; if (perApp.has(key)) return; const diagnostic = navContributionGroupRenamedDiagnostic({ app: appName, @@ -257,6 +262,5 @@ function recordNavGroupRename( items: c.items, }); perApp.set(key, diagnostic); - host.navGroupDiagnostics.set(appName, perApp); host.warn(formatNavContributionGroupDiagnostic(diagnostic)); } diff --git a/packages/objectql/src/registry-nav-contribution-group-semantics.test.ts b/packages/objectql/src/registry-nav-contribution-group-semantics.test.ts index 20a567cc42d..4a67b032af8 100644 --- a/packages/objectql/src/registry-nav-contribution-group-semantics.test.ts +++ b/packages/objectql/src/registry-nav-contribution-group-semantics.test.ts @@ -71,6 +71,7 @@ import { NAV_CONTRIBUTION_GROUP_MISSING, NAV_CONTRIBUTION_GROUP_RENAMED, checkNavContributionGroups, + checkNavContributionGroupRenames, } from './nav-contribution-diagnostics.js'; import { ObjectQLPlugin } from './plugin.js'; import type { ObjectQL } from './engine.js'; @@ -688,10 +689,11 @@ describe('#39053 — a contribution naming a retired group id lands in the group }); it('the compile-time half reports the same finding for the same aim, and nothing for an exact id', () => { - const findings = checkNavContributionGroups([hostApp()], [ + const contributions = [ { app: 'crm_app', group: 'group_old', items: [cpq], packageId: 'com.acme.crm.cpq' }, { app: 'crm_app', group: 'group_new', items: [cpq], packageId: 'com.acme.crm.cpq' }, - ]); + ]; + const findings = checkNavContributionGroupRenames([hostApp()], contributions); expect(findings).toHaveLength(1); expect(findings[0]).toMatchObject({ code: NAV_CONTRIBUTION_GROUP_RENAMED, @@ -702,5 +704,23 @@ describe('#39053 — a contribution naming a retired group id lands in the group renamedTo: 'group_new', items: ['nav_cpq'], }); + // The published relocation check keeps its contract: a rename moved + // nothing, so it is not in that list (L1 M1 on #39092). + expect(checkNavContributionGroups([hostApp()], contributions)).toEqual([]); + }); + + it('the relocation check and the rename check split one mixed list by what happened to the items', () => { + const contributions = [ + { app: 'crm_app', group: 'group_old', items: [cpq], packageId: 'com.acme.crm.cpq' }, + { app: 'crm_app', group: 'group_gone', items: [cpq], packageId: 'com.acme.crm.cpq' }, + ]; + const relocated = checkNavContributionGroups([hostApp()], contributions); + expect(relocated.map((d) => [d.code, d.group, d.relocated])).toEqual([ + [NAV_CONTRIBUTION_GROUP_MISSING, 'group_gone', ['nav_cpq']], + ]); + const renamed = checkNavContributionGroupRenames([hostApp()], contributions); + expect(renamed.map((d) => [d.code, d.group, d.renamedTo])).toEqual([ + [NAV_CONTRIBUTION_GROUP_RENAMED, 'group_old', 'group_new'], + ]); }); }); From 7e3c98f005b4973ba222885bc2b79a46520eb28e Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Dec 2026 08:34:20 +0000 Subject: [PATCH 10/12] docs(#39053): changeset names the audience change of a contribution still aimed at group_overview L2 S1 on #39092: the retired `group_overview` carried `manage_platform_settings`; mcp's `nav_connect_agent` relocates to the top level without it until its contribution moves. Claude-Session: https://claude.ai/code/session_01WGufzfhZDUp9rF94Nz3frb Co-authored-by: Claude --- .changeset/39053-setup-ten-group-anchors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/39053-setup-ten-group-anchors.md b/.changeset/39053-setup-ten-group-anchors.md index e8670643dc0..1531222524c 100644 --- a/.changeset/39053-setup-ten-group-anchors.md +++ b/.changeset/39053-setup-ten-group-anchors.md @@ -15,6 +15,6 @@ Metadata-protocol: added **New warning: `nav_contribution_group_renamed`.** A contribution that names a retired id is logged at `warn` by the runtime and reported by `os build` and `os validate` under its own headline. The message names the package, the retired id and the group that took it over; the fix is to change the contribution's `group` to the new id. It is not a relocation, so the published relocation surface keeps its contract: `NavContributionGroupDiagnostic`, `checkNavContributionGroups()` and `SchemaRegistry#getAppNavDiagnostics()` are unchanged and never carry it (a group id that resolves through `renamedFrom` is not reported there). `@objectstack/objectql` adds `checkNavContributionGroupRenames()` (the compile-time notices, `NavContributionGroupRenamedDiagnostic[]`), `resolveNavGroup()`, `navContributionGroupRenamedDiagnostic()`, `NAV_CONTRIBUTION_GROUP_RENAMED`, and the `NavContributionGroupRenamedDiagnostic` / `NavContributionGroupFinding` (either finding) / `NavGroupResolution` types; `findNavGroup()` now also finds a group through its `renamedFrom`, and `formatNavContributionGroupDiagnostic()` accepts either finding. -**Setup's anchors.** The System Overview dashboard is pinned above the groups. The groups, in order: `group_users_org`, `group_access_sharing`, `group_apps_ai`, `group_routing_approvals`, `group_audit_data` (expanded), then `group_company`, `group_currency_units`, `group_notifications`, `group_login_security`, `group_integrations_dev` (collapsed), labelled in all 11 Setup locales. Each group that replaced an old anchor lists it in `renamedFrom`, so every existing contribution still lands in the right place, with the warning above. `group_overview` has no successor: a contribution still naming it is appended at the top level with the `nav_contribution_group_missing` warning. +**Setup's anchors.** The System Overview dashboard is pinned above the groups. The groups, in order: `group_users_org`, `group_access_sharing`, `group_apps_ai`, `group_routing_approvals`, `group_audit_data` (expanded), then `group_company`, `group_currency_units`, `group_notifications`, `group_login_security`, `group_integrations_dev` (collapsed), labelled in all 11 Setup locales. Each group that replaced an old anchor lists it in `renamedFrom`, so every existing contribution still lands in the right place, with the warning above. `group_overview` has no successor: a contribution still naming it is appended at the top level with the `nav_contribution_group_missing` warning, and it loses the `manage_platform_settings` gate that group carried. In this repository that is `@objectstack/mcp`'s "Connect an AI Assistant" entry (`nav_connect_agent`, no gate of its own): until its contribution moves to a new anchor it shows at Setup's top level to everyone who can open Setup, not only to holders of `manage_platform_settings`. The page itself was already open to every user through the Account app. **What a package author does.** If your package contributes into Setup, change `group` to the new id named in the warning: `group_people_org` → `group_users_org`, `group_access_control` → `group_access_sharing`, `group_apps` → `group_apps_ai`, `group_approvals` → `group_routing_approvals`, `group_diagnostics` → `group_audit_data`, `group_configuration` → `group_company`, `group_integrations` and `group_advanced` → `group_integrations_dev`. A translation bundle keyed by an old group id (`apps.setup.navigation.`) no longer labels anything; key it by the new id. From 5e47f672c56e5b456c113f9a30f367609890cb94 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Dec 2026 09:14:03 +0000 Subject: [PATCH 11/12] fix(#39053): objectui's app mirror chains the renamedFrom check; the two-key boot test reads the whole output Amendments 7340230657 / 7340258639 / 7340541943 on #39053: - `@objectstack/spec/ui` exports `checkAppNavGroupRenamedFrom` (api-surface and export-origins regenerated); - objectui's `AppComponentSchema` chains it, and its nav item declares `renamedFrom` so the strip-unknown mirror no longer drops the key; the objectui#7715 census and the objectui#8317 import-boundary census list it; - `dev-start-shared-data-key.integration.test.ts` reads the whole boot output, so unrelated boot notices cannot push the asserted line out of a fixed-size tail. Claude-Session: https://claude.ai/code/session_01WGufzfhZDUp9rF94Nz3frb Co-authored-by: Claude --- ...dev-start-shared-data-key.integration.test.ts | 7 +++++-- packages/spec/api-surface/ui.json | 1 + packages/spec/export-origins/ui.json | 1 + .../spec/src/ui/app-nav-group-renamed-from.ts | 6 ++++-- packages/spec/src/ui/index.ts | 1 + .../src/__tests__/imported-defaults-8317.test.ts | 3 +++ .../spec-object-refinements-7715.test.ts | 4 +++- ui/packages/types/src/zod/app.zod.ts | 16 +++++++++++++++- 8 files changed, 33 insertions(+), 6 deletions(-) diff --git a/packages/cli/test/dev-start-shared-data-key.integration.test.ts b/packages/cli/test/dev-start-shared-data-key.integration.test.ts index 43b9dddd843..d9adab907e7 100644 --- a/packages/cli/test/dev-start-shared-data-key.integration.test.ts +++ b/packages/cli/test/dev-start-shared-data-key.integration.test.ts @@ -364,7 +364,10 @@ describe('#30042 — two key files: the boot takes the one that opens the stored live = await boot('os start (two keys)', ['start', '--artifact', './dist/objectstack.json', '--port', KERNEL_ASSIGNED_PORT]); const token = await signIn(live, SERVED_PASSWORD); const get = await http(live, 'GET', '/api/settings/ai', token); - const transcript = live.output().slice(-4000); + // The whole boot output: the `using ` line is asserted on, and how much + // unrelated boot output follows it (navigation-contribution notices, say) is + // not this test's subject. + const transcript = live.output(); await stopGroup(live.child); live = undefined; @@ -375,7 +378,7 @@ describe('#30042 — two key files: the boot takes the one that opens the stored ]).then( async (l) => { live = l; - return `booted: ${l.output().slice(-2000)}`; + return `booted: ${l.output()}`; }, (e: unknown) => (e instanceof Error ? e.message : String(e)), ); diff --git a/packages/spec/api-surface/ui.json b/packages/spec/api-surface/ui.json index 2b859dfd0e2..e8055a9e41f 100644 --- a/packages/spec/api-surface/ui.json +++ b/packages/spec/api-surface/ui.json @@ -573,6 +573,7 @@ "chartAggregateValueKey (function)", "checkAiChatNavParams (function)", "checkAppLandingItems (function)", + "checkAppNavGroupRenamedFrom (function)", "checkAppSingleAiChatEntry (function)", "checkDashboardReservedDateRangeGlobalFilters (function)", "checkDashboardWidgetChartMeasureArity (function)", diff --git a/packages/spec/export-origins/ui.json b/packages/spec/export-origins/ui.json index af3e866500e..c19d8f450fb 100644 --- a/packages/spec/export-origins/ui.json +++ b/packages/spec/export-origins/ui.json @@ -556,6 +556,7 @@ "chartAggregateValueKey": "src/ui/chart-aggregate.ts#chartAggregateValueKey (function)", "checkAiChatNavParams": "src/ui/ai-chat-nav-params.zod.ts#checkAiChatNavParams (function)", "checkAppLandingItems": "src/ui/app.zod.ts#checkAppLandingItems (function)", + "checkAppNavGroupRenamedFrom": "src/ui/app-nav-group-renamed-from.ts#checkAppNavGroupRenamedFrom (function)", "checkAppSingleAiChatEntry": "src/ui/ai-chat-nav-params.zod.ts#checkAppSingleAiChatEntry (function)", "checkDashboardReservedDateRangeGlobalFilters": "src/ui/dashboard.zod.ts#checkDashboardReservedDateRangeGlobalFilters (function)", "checkDashboardWidgetChartMeasureArity": "src/ui/dashboard.zod.ts#checkDashboardWidgetChartMeasureArity (function)", diff --git a/packages/spec/src/ui/app-nav-group-renamed-from.ts b/packages/spec/src/ui/app-nav-group-renamed-from.ts index c64701be0cd..d036e19e933 100644 --- a/packages/spec/src/ui/app-nav-group-renamed-from.ts +++ b/packages/spec/src/ui/app-nav-group-renamed-from.ts @@ -10,8 +10,10 @@ * read by the registry's fold and by `os build` / `os validate` alike). The * key and its grammar follow the field and position precedents * (`data/field.zod.ts`, `identity/position.zod.ts`); this module carries the - * rules that make each entry honest. Its own module, and not re-exported from - * `ui/index.ts`: the public surface is the key itself. + * rules that make each entry honest. Its own module, re-exported from + * `ui/index.ts` like the other app-level checks (`checkAppSingleAiChatEntry`), + * so a mirror of `AppSchema` (objectui's `AppComponentSchema`) chains this same + * function instead of restating it. * * Five rules, all judged by {@link checkAppNavGroupRenamedFrom} on the whole * app: an entry is not the group's own id, no entry of one list repeats, an diff --git a/packages/spec/src/ui/index.ts b/packages/spec/src/ui/index.ts index 22196cf0385..e43b37f5c29 100644 --- a/packages/spec/src/ui/index.ts +++ b/packages/spec/src/ui/index.ts @@ -20,6 +20,7 @@ export * from './i18n-label-resolver'; export * from './responsive.zod'; export * from './app.zod'; export * from './ai-chat-nav-params.zod'; +export * from './app-nav-group-renamed-from'; export * from './bulk-action.zod'; export * from './view.zod'; // [#22934] Which object an aggregated `views` container binds to (moved from diff --git a/ui/packages/types/src/__tests__/imported-defaults-8317.test.ts b/ui/packages/types/src/__tests__/imported-defaults-8317.test.ts index f47cf5e842a..4a273b344a5 100644 --- a/ui/packages/types/src/__tests__/imported-defaults-8317.test.ts +++ b/ui/packages/types/src/__tests__/imported-defaults-8317.test.ts @@ -156,6 +156,7 @@ import { checkAppLandingItems, checkAiChatNavParams, checkAppSingleAiChatEntry, + checkAppNavGroupRenamedFrom, VIEW_METADATA_MEMBERS as SpecViewMetadataMembers, // objectui#12736 — the form option's spec shape: the form-view option. FormSelectOptionSchema as SpecFormSelectOptionSchema, @@ -771,6 +772,8 @@ describe('the import boundary strips every imported default (objectui#8317)', () // `NavigationItemSchema`'s flat arm) and at most one per app (on `AppComponentSchema`). ['checkAiChatNavParams', checkAiChatNavParams], ['checkAppSingleAiChatEntry', checkAppSingleAiChatEntry], + // objectstack#39053: a navigation group's `renamedFrom` rules, on `AppComponentSchema`. + ['checkAppNavGroupRenamedFrom', checkAppNavGroupRenamedFrom], ]); /** diff --git a/ui/packages/types/src/__tests__/spec-object-refinements-7715.test.ts b/ui/packages/types/src/__tests__/spec-object-refinements-7715.test.ts index 97db583814d..ad2844a6a8c 100644 --- a/ui/packages/types/src/__tests__/spec-object-refinements-7715.test.ts +++ b/ui/packages/types/src/__tests__/spec-object-refinements-7715.test.ts @@ -377,7 +377,9 @@ const SITES = [ // and was attached by objectstack#28450 with the console's landing redirect: a landing `item` // must name an openable entry of the app's own navigation, and its `visible` reads no `data`. // `checkAppSingleAiChatEntry` joined with the `ai:chat` navigation entry: at most one per app. - attached: ['checkAppLandingItems', 'checkAppSingleAiChatEntry'], + // `checkAppNavGroupRenamedFrom` joined with a navigation group's `renamedFrom` (objectstack#39053): + // it reads only `navigation` / `areas[].navigation` ids, types and `renamedFrom`, which this node carries. + attached: ['checkAppLandingItems', 'checkAppSingleAiChatEntry', 'checkAppNavGroupRenamedFrom'], notAttachable: [], }, { diff --git a/ui/packages/types/src/zod/app.zod.ts b/ui/packages/types/src/zod/app.zod.ts index 5d1054aa393..8ca145a5db1 100644 --- a/ui/packages/types/src/zod/app.zod.ts +++ b/ui/packages/types/src/zod/app.zod.ts @@ -41,6 +41,9 @@ import { // entry per app, chained on `AppComponentSchema`. checkAiChatNavParams, checkAppSingleAiChatEntry, + // RAW for the same reason: the spec's own `renamedFrom` rules for a navigation + // group, chained on `AppComponentSchema` below (objectstack#39053). + checkAppNavGroupRenamedFrom, } from '@objectstack/spec/ui'; import { EvaluatedExpressionInputSchema as SpecEvaluatedExpressionInputSchema, @@ -334,6 +337,12 @@ const NavigationItemObject = z.looseObject({ expanded: z.boolean().optional().describe('Group default expanded state (spec field name)'), /** @deprecated legacy objectui spelling of `expanded`; the renderer honours either. */ defaultOpen: z.boolean().optional().describe('Group default expanded state (legacy alias of `expanded`)'), + // Declared for the reason `runAction` is (objectstack#4115): this schema + // strips unknown keys, so a group's `renamedFrom` would have validated clean + // here and been thrown away. Spec: `GroupNavItemSchema.renamedFrom` + // (objectstack#39053) — the retired group ids a group took over, read by the + // server's navigation-contribution fold; the console draws nothing from it. + renamedFrom: z.array(z.string()).optional().describe("Retired group ids this group took over (type: group): a navigation contribution still naming one lands here (spec field name)"), pinned: z.boolean().optional().describe('Pinned item'), order: z.number().optional().describe('Sort order weight'), }).superRefine((item, ctx) => { @@ -826,7 +835,12 @@ export const AppComponentSchema = BaseSchema.extend(SpecAppFields.shape).extend( .superRefine(checkAppLandingItems) // The spec's own at-most-one-`ai:chat`-entry check, over the same `navigation` // and `areas[].navigation` this node carries. - .superRefine(checkAppSingleAiChatEntry); + .superRefine(checkAppSingleAiChatEntry) + // The spec's own `renamedFrom` rules (objectstack#39053), over the same + // `navigation` and `areas[].navigation` this node carries: an entry is not the + // group's own id, does not repeat, names no live id, is claimed by one group, + // and sits on no group inside `areas`. + .superRefine(checkAppNavGroupRenamedFrom); /** * objectui#11440 — ONE refusal string for both content channels of From 155055746a8ea66306fb018c831992f541723cd0 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Dec 2026 09:14:28 +0000 Subject: [PATCH 12/12] docs(#39053): changeset covers @object-ui/types and the exported renamedFrom check Claude-Session: https://claude.ai/code/session_01WGufzfhZDUp9rF94Nz3frb Co-authored-by: Claude --- .changeset/39053-setup-ten-group-anchors.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.changeset/39053-setup-ten-group-anchors.md b/.changeset/39053-setup-ten-group-anchors.md index 1531222524c..afa2381c040 100644 --- a/.changeset/39053-setup-ten-group-anchors.md +++ b/.changeset/39053-setup-ten-group-anchors.md @@ -4,6 +4,7 @@ '@objectstack/platform-objects': minor '@objectstack/cli': patch '@objectstack/runtime': patch +'@object-ui/types': patch --- feat(setup): Setup navigation gets ten group anchors; a nav group's `renamedFrom` keeps retired ids working @@ -11,7 +12,7 @@ feat(setup): Setup navigation gets ten group anchors; a nav group's `renamedFrom Clause-②: yes (widening) Metadata-protocol: added -**New key: `renamedFrom` on a group nav item** (`GroupNavItemSchema`, optional, a list of nav ids). It names the group ids the group replaced. A `navigationContributions[]` entry whose `group` names one of them lands in that group instead of the app's top level. The merge looks for an exact group id first and reads `renamedFrom` only when none matches. The app's own parse refuses an entry that is the group's own id, repeats in the list, is an id another entry of the app still declares, or is claimed by a second group, and refuses the key on a group inside `areas[].navigation`, where no contribution is merged. Nothing changes for an app that does not write the key. +**New key: `renamedFrom` on a group nav item** (`GroupNavItemSchema`, optional, a list of nav ids). It names the group ids the group replaced. A `navigationContributions[]` entry whose `group` names one of them lands in that group instead of the app's top level. The merge looks for an exact group id first and reads `renamedFrom` only when none matches. The app's own parse refuses an entry that is the group's own id, repeats in the list, is an id another entry of the app still declares, or is claimed by a second group, and refuses the key on a group inside `areas[].navigation`, where no contribution is merged. Nothing changes for an app that does not write the key. `@objectstack/spec/ui` exports the check, `checkAppNavGroupRenamedFrom`, and `@object-ui/types`' `AppComponentSchema` chains it and accepts `renamedFrom` on a navigation item, so objectui's validator judges the key as the publish door does instead of dropping it. **New warning: `nav_contribution_group_renamed`.** A contribution that names a retired id is logged at `warn` by the runtime and reported by `os build` and `os validate` under its own headline. The message names the package, the retired id and the group that took it over; the fix is to change the contribution's `group` to the new id. It is not a relocation, so the published relocation surface keeps its contract: `NavContributionGroupDiagnostic`, `checkNavContributionGroups()` and `SchemaRegistry#getAppNavDiagnostics()` are unchanged and never carry it (a group id that resolves through `renamedFrom` is not reported there). `@objectstack/objectql` adds `checkNavContributionGroupRenames()` (the compile-time notices, `NavContributionGroupRenamedDiagnostic[]`), `resolveNavGroup()`, `navContributionGroupRenamedDiagnostic()`, `NAV_CONTRIBUTION_GROUP_RENAMED`, and the `NavContributionGroupRenamedDiagnostic` / `NavContributionGroupFinding` (either finding) / `NavGroupResolution` types; `findNavGroup()` now also finds a group through its `renamedFrom`, and `formatNavContributionGroupDiagnostic()` accepts either finding.