@wildo-ai/saas-frontend-lib 1.1.13 → 1.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/dist/esm/components/ai-elements/meta/agent-wrappers.d.ts +1 -0
  2. package/dist/esm/components/ai-elements/meta/agent-wrappers.d.ts.map +1 -1
  3. package/dist/esm/components/ai-elements/meta/agent-wrappers.js.map +1 -1
  4. package/dist/esm/components/compliance/EmbeddedSigningFrame.d.ts +38 -0
  5. package/dist/esm/components/compliance/EmbeddedSigningFrame.d.ts.map +1 -0
  6. package/dist/esm/components/compliance/EmbeddedSigningFrame.js +106 -0
  7. package/dist/esm/components/compliance/EmbeddedSigningFrame.js.map +1 -0
  8. package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts.map +1 -1
  9. package/dist/esm/components/data-display/DisplayValueDispatcher.js +17 -1
  10. package/dist/esm/components/data-display/DisplayValueDispatcher.js.map +1 -1
  11. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.d.ts.map +1 -1
  12. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js +22 -0
  13. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js.map +1 -1
  14. package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.d.ts.map +1 -1
  15. package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.js +5 -2
  16. package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.js.map +1 -1
  17. package/dist/esm/components/flows-actors/agent-config.labels.d.ts.map +1 -1
  18. package/dist/esm/components/flows-actors/agent-config.labels.js +2 -0
  19. package/dist/esm/components/flows-actors/agent-config.labels.js.map +1 -1
  20. package/dist/esm/components/flows-actors/approval.d.ts +7 -1
  21. package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
  22. package/dist/esm/components/flows-actors/approval.js +22 -5
  23. package/dist/esm/components/flows-actors/approval.js.map +1 -1
  24. package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
  25. package/dist/esm/components/form/automated/ResourceAutomatedForm.js +20 -1
  26. package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
  27. package/dist/esm/components/form/chromes/FormFieldChrome.js +1 -1
  28. package/dist/esm/components/form/chromes/FormFieldChrome.js.map +1 -1
  29. package/dist/esm/components/form/chromes/field-control-aria.d.ts +8 -1
  30. package/dist/esm/components/form/chromes/field-control-aria.d.ts.map +1 -1
  31. package/dist/esm/components/form/chromes/field-control-aria.js +19 -2
  32. package/dist/esm/components/form/chromes/field-control-aria.js.map +1 -1
  33. package/dist/esm/components/form/validation-errors/validate-field-url.frontend.d.ts +5 -0
  34. package/dist/esm/components/form/validation-errors/validate-field-url.frontend.d.ts.map +1 -1
  35. package/dist/esm/components/form/validation-errors/validate-field-url.frontend.js +6 -2
  36. package/dist/esm/components/form/validation-errors/validate-field-url.frontend.js.map +1 -1
  37. package/dist/esm/components/resources/ResourceCollectionBody_Table.d.ts.map +1 -1
  38. package/dist/esm/components/resources/ResourceCollectionBody_Table.js +8 -1
  39. package/dist/esm/components/resources/ResourceCollectionBody_Table.js.map +1 -1
  40. package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts.map +1 -1
  41. package/dist/esm/components/resources/ResourceLayout_DangerZone.js +2 -2
  42. package/dist/esm/components/resources/ResourceLayout_DangerZone.js.map +1 -1
  43. package/dist/esm/components/resources/ResourceLayout_RecordSharing.js +2 -2
  44. package/dist/esm/components/resources/ResourceLayout_RecordSharing.js.map +1 -1
  45. package/dist/esm/components/resources/ResourceListItemRenderer.d.ts.map +1 -1
  46. package/dist/esm/components/resources/ResourceListItemRenderer.js +6 -1
  47. package/dist/esm/components/resources/ResourceListItemRenderer.js.map +1 -1
  48. package/dist/esm/components/resources/skeleton/DisplayLayout.js +2 -2
  49. package/dist/esm/components/resources/skeleton/DisplayLayout.js.map +1 -1
  50. package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.d.ts.map +1 -1
  51. package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.js +71 -16
  52. package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.js.map +1 -1
  53. package/dist/esm/components/sections/surface.d.ts +12 -0
  54. package/dist/esm/components/sections/surface.d.ts.map +1 -1
  55. package/dist/esm/components/sections/surface.js +14 -0
  56. package/dist/esm/components/sections/surface.js.map +1 -1
  57. package/dist/esm/core/app-shell/shell-motion/shell-motion-origins.d.ts.map +1 -1
  58. package/dist/esm/core/app-shell/shell-motion/shell-motion-origins.js +3 -2
  59. package/dist/esm/core/app-shell/shell-motion/shell-motion-origins.js.map +1 -1
  60. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts +15 -0
  61. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts.map +1 -1
  62. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js +29 -0
  63. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js.map +1 -1
  64. package/dist/esm/core/app-shell/shell-motion/use-shell-motion.d.ts.map +1 -1
  65. package/dist/esm/core/app-shell/shell-motion/use-shell-motion.js +2 -2
  66. package/dist/esm/core/app-shell/shell-motion/use-shell-motion.js.map +1 -1
  67. package/dist/esm/core/branding/useBrandPresentation.d.ts.map +1 -1
  68. package/dist/esm/core/branding/useBrandPresentation.js +17 -6
  69. package/dist/esm/core/branding/useBrandPresentation.js.map +1 -1
  70. package/dist/esm/core/events/events.frontend.schemas.d.ts +40 -0
  71. package/dist/esm/core/events/events.frontend.schemas.d.ts.map +1 -1
  72. package/dist/esm/core/events/events.frontend.schemas.js +24 -1
  73. package/dist/esm/core/events/events.frontend.schemas.js.map +1 -1
  74. package/dist/esm/core/execution/useExecutionResourceOperationContextBuilder.d.ts.map +1 -1
  75. package/dist/esm/core/execution/useExecutionResourceOperationContextBuilder.js +11 -1
  76. package/dist/esm/core/execution/useExecutionResourceOperationContextBuilder.js.map +1 -1
  77. package/dist/esm/core/i18n/I18nContext.d.ts.map +1 -1
  78. package/dist/esm/core/i18n/I18nContext.js +8 -2
  79. package/dist/esm/core/i18n/I18nContext.js.map +1 -1
  80. package/dist/esm/core/i18n/component-label-resolution.utils.d.ts.map +1 -1
  81. package/dist/esm/core/i18n/component-label-resolution.utils.js +6 -1
  82. package/dist/esm/core/i18n/component-label-resolution.utils.js.map +1 -1
  83. package/dist/esm/core/monitoring/analytics/AnalyticsContext.d.ts +0 -15
  84. package/dist/esm/core/monitoring/analytics/AnalyticsContext.d.ts.map +1 -1
  85. package/dist/esm/core/monitoring/analytics/AnalyticsContext.js +102 -5
  86. package/dist/esm/core/monitoring/analytics/AnalyticsContext.js.map +1 -1
  87. package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.d.ts.map +1 -1
  88. package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.js +12 -3
  89. package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.js.map +1 -1
  90. package/dist/esm/core/navigation/NavigationContext.d.ts.map +1 -1
  91. package/dist/esm/core/navigation/NavigationContext.js +60 -17
  92. package/dist/esm/core/navigation/NavigationContext.js.map +1 -1
  93. package/dist/esm/core/navigation/launcher-resolution.d.ts +29 -0
  94. package/dist/esm/core/navigation/launcher-resolution.d.ts.map +1 -1
  95. package/dist/esm/core/navigation/launcher-resolution.js +31 -0
  96. package/dist/esm/core/navigation/launcher-resolution.js.map +1 -1
  97. package/dist/esm/core/navigation/navigation-controller-internals.d.ts +48 -0
  98. package/dist/esm/core/navigation/navigation-controller-internals.d.ts.map +1 -1
  99. package/dist/esm/core/navigation/navigation-controller-internals.js +56 -3
  100. package/dist/esm/core/navigation/navigation-controller-internals.js.map +1 -1
  101. package/dist/esm/core/navigation/useNavigationRouterSync.d.ts.map +1 -1
  102. package/dist/esm/core/navigation/useNavigationRouterSync.js +30 -2
  103. package/dist/esm/core/navigation/useNavigationRouterSync.js.map +1 -1
  104. package/dist/esm/core/resources/resource-read-cache.frontend.service.d.ts +6 -1
  105. package/dist/esm/core/resources/resource-read-cache.frontend.service.d.ts.map +1 -1
  106. package/dist/esm/core/resources/resource-read-cache.frontend.service.js +11 -1
  107. package/dist/esm/core/resources/resource-read-cache.frontend.service.js.map +1 -1
  108. package/dist/esm/core/resources/route-parent-relocation.frontend.utils.d.ts +44 -0
  109. package/dist/esm/core/resources/route-parent-relocation.frontend.utils.d.ts.map +1 -0
  110. package/dist/esm/core/resources/route-parent-relocation.frontend.utils.js +63 -0
  111. package/dist/esm/core/resources/route-parent-relocation.frontend.utils.js.map +1 -0
  112. package/dist/esm/core/resources/useOperationDirectExecution.d.ts.map +1 -1
  113. package/dist/esm/core/resources/useOperationDirectExecution.js +45 -6
  114. package/dist/esm/core/resources/useOperationDirectExecution.js.map +1 -1
  115. package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
  116. package/dist/esm/core/runtime/AppRouter.js +18 -1
  117. package/dist/esm/core/runtime/AppRouter.js.map +1 -1
  118. package/dist/esm/core/runtime/ApplicationMainContext.d.ts +1 -1
  119. package/dist/esm/core/runtime/ApplicationMainContext.d.ts.map +1 -1
  120. package/dist/esm/core/runtime/ApplicationMainContext.js +12 -3
  121. package/dist/esm/core/runtime/ApplicationMainContext.js.map +1 -1
  122. package/dist/esm/core/security/UserOrgsContext.d.ts +6 -1
  123. package/dist/esm/core/security/UserOrgsContext.d.ts.map +1 -1
  124. package/dist/esm/core/security/UserOrgsContext.js +87 -10
  125. package/dist/esm/core/security/UserOrgsContext.js.map +1 -1
  126. package/dist/esm/core/security/consent-gate.frontend.utils.d.ts +17 -5
  127. package/dist/esm/core/security/consent-gate.frontend.utils.d.ts.map +1 -1
  128. package/dist/esm/core/security/consent-gate.frontend.utils.js +16 -7
  129. package/dist/esm/core/security/consent-gate.frontend.utils.js.map +1 -1
  130. package/dist/esm/core/security/useConsentGateBehavior.js +1 -1
  131. package/dist/esm/core/security/useConsentGateBehavior.js.map +1 -1
  132. package/dist/esm/core/security/useGrantedConsentPurposes.js +1 -1
  133. package/dist/esm/core/security/useGrantedConsentPurposes.js.map +1 -1
  134. package/dist/esm/core/ui/inner-control-activation.utils.d.ts +16 -0
  135. package/dist/esm/core/ui/inner-control-activation.utils.d.ts.map +1 -0
  136. package/dist/esm/core/ui/inner-control-activation.utils.js +44 -0
  137. package/dist/esm/core/ui/inner-control-activation.utils.js.map +1 -0
  138. package/dist/esm/index.d.ts +1 -0
  139. package/dist/esm/index.d.ts.map +1 -1
  140. package/dist/esm/index.js +1 -0
  141. package/dist/esm/index.js.map +1 -1
  142. package/dist/tsconfig.build.tsbuildinfo +1 -1
  143. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"launcher-resolution.js","sourceRoot":"","sources":["../../../../src/core/navigation/launcher-resolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,qCAAqC,EACrC,+BAA+B,EAC/B,wCAAwC,EACxC,oBAAoB,EACpB,6BAA6B,GAI9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAQ5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAC;AACpH,OAAO,EAAE,qBAAqB,EAAgC,MAAM,sBAAsB,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,sCAAsC,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,EACL,sBAAsB,EAEtB,oBAAoB,EACpB,yBAAyB,GAyB1B,MAAM,iEAAiE,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AAOhG,OAAO,EACL,0B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AqB,CACnC,gBAAsD,EACtD,KAAwC,EACxC,GAA8B;IAE9B,MAAM,aAAa,GAA0B,EAAE,CAAC;IAEhD,IAAI,KAAK,EAAE,CAAC;QACV,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YACzC,IAAI,CAAC,MAAM;gBAAE,SAAS;YAEtB,aAAa,CAAC,IAAI,CAAC;gBACjB,GAAG,MAAM;gBACT,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,GAAG,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC1F,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO;QACL,gBAAgB,EAAE,gBAAgB,IAAI,EAAE;QACxC,KAAK,EAAE,aAAa;KACrB,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Launcher Resolution Layer\n *\n * Per-launcher content resolution. Each launcher declares its own content via\n * config schemas (e.g., `contentSections`, `commands`, `bindings`, `tools`),\n * and this module resolves those declarations into runtime items.\n *\n * Core concept: `resolveItemRef()` dispatches on `LauncherItemRef.kind`\n * and produces a `ResolvedNavigationTarget` — the common resolved output for any\n * launcher item, regardless of which launcher it belongs to.\n *\n * Per-launcher functions (e.g., `resolveSidebarSections()`) layer launcher-specific\n * properties on top of the core resolution.\n *\n * These resolution functions replaced the old scan-based `getAllNavigationItems()`\n * approach, which has been deleted. The coexistence period is over.\n */\n\nimport {\n computeRoleHierarchy,\n CoreResourceOperation,\n isReadShapedOperation,\n OrganizationUnitNarrowingDecisionKind,\n PlatformAccessGrants_Operations,\n resolveOrganizationUnitNarrowingDecision,\n ResourcePrimaryScope,\n userRolesSatisfyRequiredRoles,\n type ApplicationRoleTables,\n type RequiredFeaturesConfig,\n type UserSelfAccessProfile,\n} from '@wildo-ai/saas-models';\nimport { FrontendComponentType, LabellingTypes } from '@wildo-ai/presets-components-models';\n\nimport type {\n AnyFrontendResourceConfiguration,\n FrontendResourceConfiguration_Operation,\n FrontendResourcesRegistry,\n FrontendResourceOperationContext,\n} from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport { frontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport { IconCategory, StandardIconReference } from '~wildo-frontend-lib/core/icons/icon-registry.frontend.schemas';\nimport { NavigationContentType, type NavigationIconReference } from './navigation.schemas';\nimport { NavigationUtils } from './navigation.utils';\nimport { resolveSidebarResourceBrowserOperation } from './sidebar-resource-browser-operation';\nimport {\n LauncherItemTargetKind,\n EnginePageRef,\n ENGINE_PAGE_METADATA,\n SidebarSectionContentKind,\n type SidebarSectionBehavior,\n type SidebarSectionInlineCreate,\n type LauncherItemRef,\n type ResourceOperationItemRef,\n type ViewItemRef,\n type ResourceViewItemRef,\n type EnginePageItemRef,\n type CustomComponentItemRef,\n type SettingsSectionItemRef,\n type SidebarSection,\n type SidebarSection_NavigationList,\n type SidebarSection_ResourceBrowser,\n type SidebarSection_GuidanceWidget,\n type SidebarSection_CustomComponent,\n type SidebarItem,\n type CommandMenuCommand,\n type HotkeyBinding,\n type QuickActionItem,\n type ControlPanelItem,\n type ToolbarItem,\n type MenubarHostedComponent,\n type MenubarLauncherItem,\n type UtilityPanelItem,\n type ResourceBrowserClickContext,\n} from '~wildo-frontend-lib/core/config/launcher-items.frontend.schemas';\nimport { CommonRoutePaths } from '~wildo-frontend-lib/core/runtime/routes.frontend.definitions';\nimport {\n type SidebarItemDisplayPolicy,\n type CommandMenuDisplayPolicy,\n type QuickActionDisplayPolicy,\n type HotkeyScope,\n} from '~wildo-frontend-lib/core/config/app-level-components.frontend.schemas';\nimport {\n buildCompositeRouteUrlPath,\n buildResourceInsertedCompositeIdentity,\n isStandaloneRoutableCompositeView,\n isStandaloneRoutableInsertedCompositeView,\n type CompositeViewDefinition,\n} from '~wildo-frontend-lib/core/config/composite-view.schemas';\nimport {\n buildChartRouteUrlPath,\n buildResourceInsertedChartIdentity,\n isStandaloneRoutableInsertedChartView,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport type { FullCustomViewDefinition } from '~wildo-frontend-lib/core/config/full-custom-view.schemas';\nimport type { FlowsActorsViewDefinition } from '~wildo-frontend-lib/core/config/flows-actors-view.schemas';\nimport {\n buildExecutionRouteUrlPath,\n buildResourceInsertedExecutionIdentity,\n} from '~wildo-frontend-lib/core/config/execution-view.schemas';\nimport { FrontendView_ScopeMode } from '~wildo-frontend-lib/core/config/views-frontend.schemas';\nimport { findResourceOwnedViewReferenceMatches } from '~wildo-frontend-lib/core/config/resource-owned-view-resolution.frontend.utils';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\n\nconst logger: LoggerFrontendService = LoggerFrontendService.getLogger();\nconst logDebug: (message: string, context?: Record<string, unknown>) => void = logger.debugByType('launcher-resolution');\nlogger.setDebugTypeLogging('launcher-resolution', false);\n\n// ════════════════════════════════════════════════════════════════\n// Resolution Context — all dependencies the resolution layer needs\n// ════════════════════════════════════════════════════════════════\n\n/**\n * All external dependencies the resolution functions need.\n * Hooks create this from their own context and pass it in.\n */\n/**\n * The viewer's roles as a role check needs them: kept apart by scope, because each scope's hierarchy is resolved\n * against its own role table (`userRolesSatisfyRequiredRoles`). Organization roles are the CURRENT organization's\n * only. Built by `useViewerEffectiveRoles`, the one place they are derived.\n *\n * Roles not known yet (permissions not loaded, an anonymous visitor) are EMPTY, not absent: the viewer holds no role,\n * so a role-gated entry appears once the roles arrive rather than being offered and then withdrawn. That is the\n * project's fail-closed rule; an unrestricted entry, or one open to anonymous visitors, is unaffected.\n */\nexport interface LauncherEffectiveRoles {\n applicationRoles: string[];\n organizationRoles: string[];\n /**\n * The application's role tables these roles are expanded against, and what a role neither table knows does\n * (`useApplicationRoleTables`). Carried with the roles so no check can expand them against the wrong tables.\n */\n roleTables: ApplicationRoleTables;\n /** The organization `organizationRoles` are held in — the one a decision about an organization's resource is made in. */\n organizationId: string | null;\n /**\n * The backend's own account of this viewer's access (`user-self | access_profile`, #2381), or `null` when not loaded.\n * It is what lets {@link viewerMayPerformOperation} see a grant the memberships cannot: an organization-unit one.\n */\n accessProfile: UserSelfAccessProfile | null;\n}\n\n/**\n * The ONE role-visibility decision of the app shell: OR semantics through the role hierarchy, the decision the\n * backend's operation-role check makes. Shared by launcher items and Settings Hub sections, which used to answer it\n * differently (the hub compared role names with no hierarchy, so an owner failed a gate naming the administrator role).\n * The roles are expanded against the application's own tables, so a custom role passes exactly the gates the backend\n * would let it through, and a role neither table knows passes none. An empty or absent requirement is open.\n */\nexport function viewerHoldsOneOfRoles(requiredRoles: readonly string[] | undefined, effectiveRoles: LauncherEffectiveRoles): boolean {\n if (!requiredRoles?.length) return true;\n return userRolesSatisfyRequiredRoles({\n requiredRoles,\n userAppRoles: effectiveRoles.applicationRoles,\n userOrgRoles: effectiveRoles.organizationRoles,\n appRolesConfig: effectiveRoles.roleTables.appRolesConfig,\n orgRolesConfig: effectiveRoles.roleTables.orgRolesConfig,\n unresolvableRoles: effectiveRoles.roleTables.unresolvableRoles,\n });\n}\n\n/**\n * Whether the shell may offer this viewer an operation on a resource (#2381) — the decision the backend's gate makes,\n * including its ADDITIVE unit narrowing: an operation is offered when the viewer's roles satisfy it\n * ({@link viewerHoldsOneOfRoles}), or when the backend's own narrowing decision, `resolveOrganizationUnitNarrowingDecision`\n * fed with the backend's own role entries and maps (the access profile), admits them through an organization-unit\n * grant (`UNIT_NARROWED`) or as a unit-scoped representative reading a resource declared organization-wide for representatives.\n *\n * Without the profile only the first half can answer, so a unit-granted operation stays hidden — never offered on a\n * guess. Presentation, never authorization: the backend still decides every request.\n */\nexport function viewerMayPerformOperation(\n operation: {\n resourceType: string;\n roles?: readonly string[];\n operationIdentifier: unknown;\n resourceOperationLike?: unknown;\n admitsCrossTenantPlatformAdministration?: boolean;\n /** The resource's primary scope, when the caller knows it: the crossing rule applies only inside a tenant. */\n resourcePrimaryScope?: unknown;\n },\n viewer: LauncherEffectiveRoles,\n): boolean {\n if (crossingVariantIsNotTheViewers(operation, viewer)) return false;\n // A viewer KNOWN to stand outside the addressed organization reaches it only through a variant that declares the\n // crossing (#2473, #2600): the backend refuses every other variant as an undeclared crossing, whatever role the viewer\n // holds, and records the attempt. `requestAccess` is the backend's own exemption, so it is exempt here too. Inert for\n // a question about the viewer's current organization, which they belong to.\n if (viewerIsKnownOutsideOrganization(viewer)\n && operation.admitsCrossTenantPlatformAdministration !== true\n && String(operation.operationIdentifier) !== PlatformAccessGrants_Operations.REQUEST_ACCESS) return false;\n if (viewerHoldsOneOfRoles(operation.roles, viewer)) return true;\n if (!viewer.accessProfile || !viewer.organizationId) return false;\n const tables = viewer.roleTables;\n const decision = resolveOrganizationUnitNarrowingDecision({\n resourceType: operation.resourceType,\n requiredRoles: operation.roles ?? [],\n initiatorRoles: viewer.accessProfile.roleEntries,\n organizationId: viewer.organizationId,\n narrowingRegistry: viewer.accessProfile.organizationUnitNarrowing,\n // The own-rows declarations too (#3068): a declared role held on a unit supplies no unit, and the backend decides so.\n ownRowsRegistry: viewer.accessProfile.organizationOwnRows,\n relationshipOrganizationWideAccess: viewer.accessProfile.relationshipOrganizationWideAccess,\n operationIsReadOnly: isReadShapedOperation(operation),\n roleHierarchyResolver: (role, scope) =>\n computeRoleHierarchy(role, scope === ResourcePrimaryScope.APPLICATION ? tables.appRolesConfig : tables.orgRolesConfig),\n });\n return decision.kind === OrganizationUnitNarrowingDecisionKind.UNIT_NARROWED\n || decision.kind === OrganizationUnitNarrowingDecisionKind.RELATIONSHIP_ORGANIZATION_WIDE;\n}\n\n/**\n * Whether the viewer has any standing in the organization `viewer.organizationId` names (#2473): an organization-wide\n * role there, or, per the backend's own access profile, a unit-scoped or relationship entry in it.\n *\n * A viewer with none is OUTSIDE that tenant — a platform operator who opened it from the tenant directory — and the\n * backend admits such a caller only through a variant that declares the crossing\n * (`admitsCrossTenantPlatformAdministration`, with a usable access grant). Every other variant is an undeclared\n * crossing: refused, and recorded as an attempted one. `false` when no organization is named.\n */\nexport function viewerBelongsToOrganization(viewer: LauncherEffectiveRoles): boolean {\n if (!viewer.organizationId) return false;\n if (viewer.organizationRoles.length > 0) return true;\n return (viewer.accessProfile?.roleEntries ?? []).some((entry) =>\n String(entry.relatedPrimaryScope) === ResourcePrimaryScope.ORGANIZATIONS && String(entry.relatedResourceId) === viewer.organizationId);\n}\n\n/**\n * Whether the viewer is KNOWN to stand outside the organization `viewer.organizationId` names (#2473): they hold roles\n * we can see (an application role, or the access profile has loaded) and none of them is in that tenant\n * ({@link viewerBelongsToOrganization}). The platform operator who opened a tenant from the directory is the case.\n *\n * A viewer whose roles are not known yet (permissions loading, or the auth context briefly unavailable) is NOT outside:\n * nothing says so, and treating an unknown as foreign would withdraw an in-place write, and the edit state behind it,\n * every time the context flickers. Role-gated operations stay hidden for such a viewer anyway, by the role check.\n */\nexport function viewerIsKnownOutsideOrganization(viewer: LauncherEffectiveRoles): boolean {\n if (!viewer.organizationId || viewerBelongsToOrganization(viewer)) return false;\n return viewer.applicationRoles.length > 0 || viewer.accessProfile !== null;\n}\n\n/**\n * A COLLECTION-shaped variant that crosses into a tenant (`admitsCrossTenantPlatformAdministration`: a LIST, SEARCH,\n * COUNT, CREATE-like or `*_MANY` verb) is the platform operator's door into an organization they do NOT belong to (#2315). For a\n * viewer who holds a role in the addressed organization it is not their door, because taking it acts AS THE PLATFORM:\n * the operator's \"Place hold\" places a PLATFORM-tier hold, which the tenant can then never release. A super-administrator\n * who also owns their organization was offered it on their own legal holds, ranked above the owner's.\n *\n * The backend no longer refuses such a member: since #2482 the collection gate resolves a member's application roles as\n * the per-instance gate does, so the super-administrator role satisfies the crossed variant. Hiding it is therefore a\n * decision about which door is the viewer's, not a mirror of a refusal; the backend stays the authority on what is\n * admitted. Before #2482 this comment said the gate refused, which was then true.\n *\n * Two kinds of crossing variant stay with the ordinary role check, because the backend admits a member through them:\n * - a per-instance verb (READ, UPDATE, DELETE-like, a row action): the row gate passes a member, and the role check\n * keeps the viewer's application entries, so a super-administrator member performs it without a grant. The\n * tenant's own Revoke on an operator access grant is one of these and must stay offered;\n * - a collection verb whose roles the viewer's ORGANIZATION roles satisfy, which the organization role table admits.\n *\n * `requestAccess` is the one exemption the backend makes (an elevation cannot require one), so it is exempt here too.\n */\n// Every verb whose call names no row and so reaches the collection gate: the reads of a collection, a create, and the\n// `*_MANY` verbs (an entitlement's enable and disable are UPDATE_MANY-shaped, #2316).\nconst COLLECTION_SHAPED_OPERATIONS: ReadonlySet<string> = new Set([\n CoreResourceOperation.CREATE,\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.COUNT,\n CoreResourceOperation.CREATE_MANY,\n CoreResourceOperation.UPDATE_MANY,\n CoreResourceOperation.DELETE_MANY,\n]);\n\nfunction crossingVariantIsNotTheViewers(\n operation: {\n roles?: readonly string[];\n operationIdentifier: unknown;\n resourceOperationLike?: unknown;\n admitsCrossTenantPlatformAdministration?: boolean;\n resourcePrimaryScope?: unknown;\n },\n viewer: LauncherEffectiveRoles,\n): boolean {\n if (operation.admitsCrossTenantPlatformAdministration !== true) return false;\n // Only a resource INSIDE a tenant has an organization gate to refuse a member. An application-scoped crossing (the\n // application audit log) is refused by no organization role table, and a caller that does not say the scope leaves\n // the decision to the ordinary role check.\n if (String(operation.resourcePrimaryScope ?? '') !== ResourcePrimaryScope.ORGANIZATIONS) return false;\n if (String(operation.operationIdentifier) === PlatformAccessGrants_Operations.REQUEST_ACCESS) return false;\n if (!viewer.organizationId || viewer.organizationRoles.length === 0) return false;\n const shape = String(operation.resourceOperationLike ?? operation.operationIdentifier);\n if (!COLLECTION_SHAPED_OPERATIONS.has(shape)) return false;\n // The organization role table is what the collection gate falls back to for a member.\n return !viewerHoldsOneOfRoles(operation.roles, { ...viewer, applicationRoles: [] });\n}\n\nexport interface LauncherResolutionContext {\n registry: FrontendResourcesRegistry;\n contextResourceIdentifiers?: Record<string, string>;\n views: {\n compositeViews?: CompositeViewDefinition[];\n fullCustomViews?: FullCustomViewDefinition[];\n flowsActorsViews?: FlowsActorsViewDefinition[];\n };\n tResourceHeader: (resourceType: string, key: string) => string;\n tResourceOperation: (resourceType: string, operation: string, key: string) => string;\n /**\n * View title resolver. Composite views resolve through their translationRef\n * contract, and other supported view families resolve through their dedicated\n * view-title label contract instead of exposing raw refs.\n */\n tViewTitle: (viewRef: string, contentType: NavigationContentType) => string;\n /**\n * Generic i18n key resolver. Used for engine page labels and other\n * non-resource/non-view translations. Returns the resolved string.\n */\n t: (key: string) => string;\n /**\n * The icon the Settings Hub's rail draws for a section (its placement's `icon`), or `undefined` when the placement\n * names none. A row that opens a settings section draws the same icon as the rail entry it opens, so \"Profile\" in\n * the user menu is not a gear beside a gear.\n */\n settingsSectionIcon: (sectionRef: string) => string | undefined;\n /**\n * The label the Settings Hub's placement AUTHORS for a section (its `label`), or `undefined` when the hub declares\n * no such section. A row that opens a section reads the section's generated label first and, while there is none,\n * this authored one: exactly what the rail draws for the same entry (`tSettingsHubSection`), so the user menu and the\n * rail cannot disagree, and a fresh application's menu reads \"Profile\" rather than `settings_hub.sections.profile.label`\n * before its labels are generated (#3228). It is the resolved section's `label`: the placement's authored `label`,\n * or, for a placement that authors none, the destination's ref (`resolveSettingsHubConfig`), the same word the rail\n * then shows. A section the hub does not declare has none, so its row still shows the missing key.\n */\n settingsSectionLabel: (sectionRef: string) => string | undefined;\n /**\n * The viewer's roles (`useViewerEffectiveRoles`), or `null` when this context does not filter by role at all. A\n * RESOURCE_OPERATION row is withheld when the viewer may not perform the operation (#2376, #2381): they hold none\n * of its own `roles`, and no organization-unit grant in their access profile reaches it (`viewerMayPerformOperation`).\n * An entry the backend would refuse is not offered. Roles not known yet count as none, so such a row appears once they arrive.\n */\n viewerRoles: LauncherEffectiveRoles | null;\n /**\n * Whether the Settings Hub would show the viewer a section, or `null` when this context does not filter settings rows.\n *\n * A SETTINGS_SECTION row is withheld when the hub declares its section but would not show it to this viewer (#3195);\n * a section the hub does not declare at all answers `true`, so its row still shows its missing label key. The answer\n * comes from the SAME\n * gated hub config the rail renders (`useVisibleSettingsHubConfig`: scope, capability, roles, features), so the\n * command menu, the user menu and the rail cannot disagree. Before this, the only gate on such a row was its own\n * `runtimeAvailability`, so Cmd+K offered \"Billing\" to an ordinary member whose rail had no Billing entry, and\n * choosing it landed on the hub's fallback section.\n */\n settingsSectionVisible: ((sectionRef: string) => boolean) | null;\n}\n\n\n// ════════════════════════════════════════════════════════════════\n// Resolved Types — output of the resolution layer\n// ════════════════════════════════════════════════════════════════\n\n/**\n * Core resolved navigation target — the output of `resolveItemRef()`.\n *\n * Contains everything a launcher needs to render and navigate: label, URL,\n * icon, and the source metadata (resource context or view ref) that the\n * navigation controller needs.\n */\nexport interface ResolvedNavigationTarget {\n targetKind: LauncherItemTargetKind;\n id: string;\n ref: string;\n label: string;\n urlPath: string;\n /**\n * The icon as a REFERENCE, never a rendered element (#1828): resolution is pure data, so any renderer can draw the\n * result, and the preset renders it through the icon registry. Resolution used to call `renderIcon` here and keep\n * only the element.\n */\n iconReference?: NavigationIconReference;\n\n resourceType?: string;\n operationIdentifier?: string;\n operation?: FrontendResourceConfiguration_Operation;\n resourceContext?: FrontendResourceOperationContext;\n\n viewRef?: string;\n contentType?: NavigationContentType;\n pageRef?: EnginePageRef;\n flowsActorsSystemRef?: string;\n fullCustomComponentRef?: string;\n requiredFeatures?: RequiredFeaturesConfig;\n contextResourceIdentifiers?: Record<string, string>;\n urlParamValues?: Record<string, string>;\n\n componentRef?: string;\n\n /** For SETTINGS_SECTION targets: the section to pre-open in the Settings Hub. */\n sectionRef?: string;\n}\n\n/** A sidebar item with its `LauncherItemRef` resolved to a navigation target. */\nexport interface ResolvedSidebarItem extends ResolvedNavigationTarget {\n displayPolicy?: SidebarItemDisplayPolicy;\n /** Typed badge-definition reference carried through to the rendered item. */\n notificationBadgeRef?: string;\n children?: ResolvedSidebarItem[];\n}\n\n/** Resolved NAVIGATION_LIST section — items resolved to navigation targets. */\nexport interface ResolvedSidebarSection_NavigationList {\n contentKind: SidebarSectionContentKind.NAVIGATION_LIST;\n ref: string;\n label?: string;\n icon?: string;\n showLabel?: boolean;\n collapsible?: boolean;\n defaultCollapsed?: boolean;\n /** See `SidebarSection_NavigationList.isPrimary` — primary group merged with Home. */\n isPrimary?: boolean;\n visibleInModes?: string[];\n items: ResolvedSidebarItem[];\n behavior?: SidebarSectionBehavior;\n inlineCreate?: SidebarSectionInlineCreate;\n inlineCreateResourceType?: string;\n nested?: boolean;\n maxNestingDepth?: number;\n}\n\n/** Resolved RESOURCE_BROWSER section — passed through (no item resolution needed). */\nexport interface ResolvedSidebarSection_ResourceBrowser {\n contentKind: SidebarSectionContentKind.RESOURCE_BROWSER;\n ref: string;\n label?: string;\n icon?: string;\n showLabel?: boolean;\n collapsible?: boolean;\n defaultCollapsed?: boolean;\n visibleInModes?: string[];\n resourceType: string;\n operation?: string;\n operationVariant?: string;\n navigateOperation?: string;\n navigateOperationVariant?: string;\n instanceFilter?: (instance: Record<string, unknown>) => boolean;\n onInstanceClick?: (context: ResourceBrowserClickContext) => void;\n}\n\n/** Resolved GUIDANCE_WIDGET section — passed through. */\nexport interface ResolvedSidebarSection_GuidanceWidget {\n contentKind: SidebarSectionContentKind.GUIDANCE_WIDGET;\n ref: string;\n label?: string;\n icon?: string;\n showLabel?: boolean;\n collapsible?: boolean;\n defaultCollapsed?: boolean;\n visibleInModes?: string[];\n guidanceRef: string;\n}\n\n/** Resolved CUSTOM_COMPONENT section — passed through. */\nexport interface ResolvedSidebarSection_CustomComponent {\n contentKind: SidebarSectionContentKind.CUSTOM_COMPONENT;\n ref: string;\n label?: string;\n icon?: string;\n showLabel?: boolean;\n collapsible?: boolean;\n defaultCollapsed?: boolean;\n visibleInModes?: string[];\n componentRef: string;\n}\n\n/** Discriminated union of all resolved sidebar sections. */\nexport type ResolvedSidebarSection =\n | ResolvedSidebarSection_NavigationList\n | ResolvedSidebarSection_ResourceBrowser\n | ResolvedSidebarSection_GuidanceWidget\n | ResolvedSidebarSection_CustomComponent;\n\n/** Resolved command menu entry. */\nexport interface ResolvedCommandMenuItem extends ResolvedNavigationTarget {\n category?: string;\n shortcut?: string;\n searchKeywords?: string[];\n displayPolicy?: CommandMenuDisplayPolicy;\n}\n\n/** Resolved hotkey binding. */\nexport interface ResolvedHotkeyBinding extends ResolvedNavigationTarget {\n shortcut: string;\n scope?: HotkeyScope;\n description?: string;\n}\n\n/** Resolved quick action item. */\nexport interface ResolvedQuickActionItem extends ResolvedNavigationTarget {\n displayPolicy?: QuickActionDisplayPolicy;\n}\n\n/** Resolved control panel item. */\nexport interface ResolvedControlPanelItem extends ResolvedNavigationTarget {\n section?: string;\n}\n\n/** Resolved toolbar item. */\nexport interface ResolvedToolbarItem extends ResolvedNavigationTarget {\n group?: string;\n iconOnly?: boolean;\n}\n\n/** Resolved menubar content (hosted components + items). */\nexport interface ResolvedMenubarContent {\n hostedComponents: MenubarHostedComponent[];\n items: ResolvedMenubarItem[];\n}\n\n/** Resolved menubar item. */\nexport interface ResolvedMenubarItem extends ResolvedNavigationTarget {\n group?: string;\n /** Carried from the declaration, as the sidebar's resolution carries its own. */\n notificationBadgeRef?: string;\n}\n\n\n// ════════════════════════════════════════════════════════════════\n// Core Resolution: resolveItemRef\n// ════════════════════════════════════════════════════════════════\n\n/**\n * Resolve a single `LauncherItemRef` to a navigation target.\n *\n * Dispatches on `item.kind`. Returns `null` for unresolvable refs\n * (DEV warning emitted). This replaces the scan-all logic for individual items.\n */\nexport function resolveItemRef(\n item: LauncherItemRef,\n ctx: LauncherResolutionContext,\n): ResolvedNavigationTarget | null {\n switch (item.kind) {\n case LauncherItemTargetKind.RESOURCE_OPERATION:\n return resolveResourceOperation(item, ctx);\n case LauncherItemTargetKind.VIEW:\n return resolveView(item, ctx);\n case LauncherItemTargetKind.RESOURCE_VIEW:\n return resolveResourceView(item, ctx);\n case LauncherItemTargetKind.ENGINE_PAGE:\n return resolveEnginePage(item, ctx);\n case LauncherItemTargetKind.CUSTOM_COMPONENT:\n return resolveCustomComponent(item, ctx);\n case LauncherItemTargetKind.SETTINGS_SECTION:\n return resolveSettingsSection(item, ctx);\n default: {\n logDebug('Unknown LauncherItemRef kind', { item });\n return null;\n }\n }\n}\n\nfunction resolveResourceOperation(\n item: ResourceOperationItemRef,\n ctx: LauncherResolutionContext,\n): ResolvedNavigationTarget | null {\n const config = ctx.registry.resourceConfigurations[item.resourceType] as AnyFrontendResourceConfiguration | undefined;\n if (!config) {\n logDebug('Resource type not found in registry', { resourceType: item.resourceType });\n return null;\n }\n\n const operations = Array.isArray(config.operations) ? config.operations : [];\n const matchingOperations = operations.filter((op) => String(op.operationIdentifier) === item.operation);\n const defaultOperations = matchingOperations.filter((op) => op.isOperationDefault === true);\n const operation = item.operationVariant\n ? matchingOperations.find((op) => op.variantKey === item.operationVariant)\n : defaultOperations.length === 1\n ? defaultOperations[0]\n : matchingOperations.length === 1\n ? matchingOperations[0]\n : undefined;\n if (!operation) {\n logDebug('Operation not found for resource', {\n resourceType: item.resourceType,\n operation: item.operation,\n operationVariant: item.operationVariant,\n });\n return null;\n }\n // The operation's own roles decide who is offered it, by the same rule a launcher item's `requiredRoles` uses —\n // so an author never restates on the row what the operation already says (#2376). The SELECTED variant is judged,\n // because it is the one whose route the entry opens. The action bar instead keeps the highest-rights variant a viewer\n // qualifies for; a restrictive default beside a broader non-default variant would differ, and none of the engine's\n // resources declares that shape (defaults are the less-privileged variants).\n if (ctx.viewerRoles && !viewerMayPerformOperation({ ...operation, resourceType: item.resourceType }, ctx.viewerRoles)) {\n logDebug('Launcher resource operation withheld: the viewer may not perform it (no role, no reaching unit grant)', {\n resourceType: item.resourceType,\n operation: item.operation,\n });\n return null;\n }\n\n // Resolve the operation's URL against the current AppScope. A launcher item is\n // surfaced whenever the resource's REQUIRED route parameters are satisfiable\n // from the ambient scope (primary scope + custom/optional context), filling both\n // required and optional context identifiers. `resolveResourceUrl` →\n // `selectMatchingRoutePath` picks the route path the scope can satisfy (e.g. the\n // org-scoped `/organizations/:organizationId/todos` over the nested\n // `/…/todo-lists/:todoListId/todos` when no list is in context) and returns\n // `resolvedUrl: undefined` only when NO path is satisfiable — i.e. the resource\n // genuinely requires a non-ambient parent, in which case it is correctly omitted.\n //\n // Previously this dropped EVERY resource whose routes all carry parameters (a\n // zero-parameter `standalone` route check), which excluded all org-scoped\n // resources from the sidebar/launchers even though the org is ambient in\n // AppScope. That expedient gate bypassed the scope mechanism; this routes the\n // decision back through AppScope, the single source of truth for required +\n // optional scope.\n const scopeIdentifiers = ctx.contextResourceIdentifiers ?? {};\n\n const resolved = NavigationUtils.resolveResourceUrl(\n config,\n operation,\n scopeIdentifiers,\n ctx.registry.allResourceFieldIdentifiers,\n );\n const urlPath = resolved?.resolvedUrl;\n if (!urlPath) {\n logDebug('No scope-satisfiable route for launcher resource operation (requires non-ambient context)', {\n resourceType: item.resourceType,\n operation: item.operation,\n scopeKeys: Object.keys(scopeIdentifiers),\n });\n return null;\n }\n const operationIdentifier = String(operation.operationIdentifier);\n\n\n const resourceContext = frontendResourceUtils.createFrontendResourceOperationContextFromOperation({\n resourceType: item.resourceType,\n operation,\n contextResourceIdentifiers: scopeIdentifiers,\n });\n\n return {\n targetKind: LauncherItemTargetKind.RESOURCE_OPERATION,\n id: `resolved-${item.resourceType}-${operationIdentifier}-${operation.variantKey ?? 'default'}`,\n ref: `resource:${item.resourceType}:${operationIdentifier}:${operation.variantKey ?? 'default'}`,\n label: ctx.tResourceOperation(item.resourceType, operationIdentifier, 'title'),\n urlPath,\n iconReference: { category: IconCategory.RESOURCES, resourceType: item.resourceType },\n resourceType: item.resourceType,\n operationIdentifier,\n operation,\n resourceContext,\n contextResourceIdentifiers: scopeIdentifiers,\n };\n}\n\ntype LauncherViewScopeSelector = 'application' | 'resource';\n\nfunction isCompatibleWithLauncherScope(\n scope: FrontendView_ScopeMode,\n expectedScope: LauncherViewScopeSelector,\n): boolean {\n if (expectedScope === 'application') {\n return scope === FrontendView_ScopeMode.APPLICATION;\n }\n\n return scope === FrontendView_ScopeMode.RESOURCE;\n}\n\nfunction resolveView(\n item: ViewItemRef,\n ctx: LauncherResolutionContext,\n): ResolvedNavigationTarget | null {\n const resolvedView = resolveConcreteApplicationViewTarget(item.viewRef, ctx);\n if (!resolvedView) {\n logDebug('Application-scoped VIEW ref not found in any compatible view collection', { viewRef: item.viewRef });\n return null;\n }\n\n return {\n targetKind: LauncherItemTargetKind.VIEW,\n id: `resolved-view-${item.viewRef}`,\n ref: `view:${resolvedView.contentType}:${item.viewRef}`,\n label: ctx.tViewTitle(resolvedView.viewRef, resolvedView.contentType),\n ...resolvedView,\n };\n}\n\nfunction resolveResourceView(\n item: ResourceViewItemRef,\n ctx: LauncherResolutionContext,\n): ResolvedNavigationTarget | null {\n const resolvedView = resolveConcreteResourceViewTarget(item, ctx);\n if (!resolvedView) {\n logDebug('Resource-scoped RESOURCE_VIEW ref not found on the target resource', {\n resourceType: item.resourceType,\n viewRef: item.viewRef,\n });\n return null;\n }\n\n return {\n targetKind: LauncherItemTargetKind.RESOURCE_VIEW,\n id: `resolved-resource-view-${item.resourceType}-${item.viewRef}`,\n ref: `view:${resolvedView.contentType}:${item.resourceType}:${item.viewRef}`,\n label: ctx.tViewTitle(resolvedView.viewRef, resolvedView.contentType),\n ...resolvedView,\n };\n}\n\nfunction resolveConcreteApplicationViewTarget(\n viewRef: string,\n ctx: LauncherResolutionContext,\n): Pick<ResolvedNavigationTarget, 'urlPath' | 'iconReference' | 'viewRef' | 'contentType' | 'fullCustomComponentRef' | 'flowsActorsSystemRef' | 'requiredFeatures' | 'contextResourceIdentifiers'> | null {\n const { compositeViews, fullCustomViews, flowsActorsViews } = ctx.views;\n\n const compositeView = compositeViews?.find(\n v => v.ref === viewRef && isCompatibleWithLauncherScope(v.scope, 'application'),\n );\n if (compositeView) {\n return {\n urlPath: isStandaloneRoutableCompositeView(compositeView)\n ? buildCompositeRouteUrlPath(\n viewRef,\n )\n : '',\n iconReference: { category: IconCategory.COMPOSITE_VIEW, viewReference: viewRef },\n viewRef,\n contentType: NavigationContentType.COMPOSITE_VIEW,\n requiredFeatures: compositeView.requiredFeatures,\n contextResourceIdentifiers: undefined,\n };\n }\n\n const fullCustomView = fullCustomViews?.find(\n v => v.ref === viewRef && isCompatibleWithLauncherScope(v.scope, 'application'),\n );\n if (fullCustomView) {\n return {\n urlPath: `/custom/${viewRef}`,\n iconReference: { category: IconCategory.CUSTOM, customReference: `view-custom-${viewRef}` },\n viewRef,\n contentType: NavigationContentType.FULL_CUSTOM_VIEW,\n fullCustomComponentRef: fullCustomView.componentRef,\n requiredFeatures: fullCustomView.requiredFeatures,\n contextResourceIdentifiers: undefined,\n };\n }\n\n const flowsActorsView = flowsActorsViews?.find(\n v => v.ref === viewRef && isCompatibleWithLauncherScope(v.scope, 'application'),\n );\n if (flowsActorsView) {\n return {\n urlPath: `/flows-actors/${viewRef}`,\n iconReference: { category: IconCategory.CUSTOM, customReference: `view-flows-${viewRef}` },\n viewRef,\n contentType: NavigationContentType.FLOWS_ACTORS_VIEW,\n flowsActorsSystemRef: flowsActorsView.systemRef,\n requiredFeatures: flowsActorsView.requiredFeatures,\n contextResourceIdentifiers: undefined,\n };\n }\n\n return null;\n}\n\nfunction resolveConcreteResourceViewTarget(\n item: ResourceViewItemRef,\n ctx: LauncherResolutionContext,\n): Pick<ResolvedNavigationTarget, 'urlPath' | 'iconReference' | 'viewRef' | 'contentType' | 'requiredFeatures' | 'contextResourceIdentifiers'> | null {\n const resourceConfiguration = ctx.registry.resourceConfigurations[item.resourceType];\n const frontendConfiguration = resourceConfiguration?.frontendConfiguration;\n const viewMatches = findResourceOwnedViewReferenceMatches({\n resourceType: item.resourceType,\n viewRef: item.viewRef,\n registry: ctx.registry,\n });\n const scopedContextResourceIdentifiers =\n ctx.contextResourceIdentifiers\n && Object.keys(ctx.contextResourceIdentifiers).length > 0\n ? ctx.contextResourceIdentifiers\n : undefined;\n\n if (viewMatches.length !== 1) {\n return null;\n }\n\n const compositeView = frontendConfiguration?.compositeViews?.find((view) => view.ref === item.viewRef);\n if (compositeView) {\n if (compositeView.scope !== FrontendView_ScopeMode.RESOURCE) {\n return null;\n }\n\n const insertedIdentity = buildResourceInsertedCompositeIdentity(item.resourceType, compositeView);\n return {\n urlPath: isStandaloneRoutableInsertedCompositeView(compositeView)\n ? buildCompositeRouteUrlPath(insertedIdentity.insertedViewRef, scopedContextResourceIdentifiers)\n : '',\n iconReference: { category: IconCategory.COMPOSITE_VIEW, viewReference: item.viewRef },\n viewRef: insertedIdentity.insertedViewRef,\n contentType: NavigationContentType.COMPOSITE_VIEW,\n requiredFeatures: compositeView.requiredFeatures,\n contextResourceIdentifiers: scopedContextResourceIdentifiers,\n };\n }\n\n const chartView = frontendConfiguration?.chartViews?.find((view) => view.ref === item.viewRef);\n if (chartView) {\n // `InsertedChartDeclaration.scope` is pinned to `FrontendView_ScopeMode.RESOURCE`\n // by construction (see chart-view.frontend.schemas.ts), so no runtime scope\n // narrowing is needed here.\n\n const insertedIdentity = buildResourceInsertedChartIdentity(item.resourceType, chartView);\n return {\n urlPath: isStandaloneRoutableInsertedChartView(chartView)\n ? buildChartRouteUrlPath(insertedIdentity.insertedViewRef, scopedContextResourceIdentifiers)\n : '',\n iconReference: { category: IconCategory.CUSTOM, customReference: `view-chart-${item.viewRef}` },\n viewRef: insertedIdentity.insertedViewRef,\n contentType: NavigationContentType.CHART_VIEW,\n requiredFeatures: chartView.chartDefinition.requiredFeatures,\n contextResourceIdentifiers: scopedContextResourceIdentifiers,\n };\n }\n\n const executionView = frontendConfiguration?.executionViews?.find((view) => view.ref === item.viewRef);\n if (executionView) {\n if (executionView.scope !== FrontendView_ScopeMode.RESOURCE) {\n return null;\n }\n\n const insertedIdentity = buildResourceInsertedExecutionIdentity(item.resourceType, executionView);\n return {\n urlPath: executionView.isAddressable\n ? buildExecutionRouteUrlPath(insertedIdentity.insertedViewRef, scopedContextResourceIdentifiers)\n : '',\n iconReference: { category: IconCategory.CUSTOM, customReference: `view-execution-${item.viewRef}` },\n viewRef: insertedIdentity.insertedViewRef,\n contentType: NavigationContentType.EXECUTION_VIEW,\n requiredFeatures: executionView.requiredFeatures,\n contextResourceIdentifiers: scopedContextResourceIdentifiers,\n };\n }\n\n return null;\n}\n\nfunction resolveEnginePage(\n item: EnginePageItemRef,\n ctx: LauncherResolutionContext,\n): ResolvedNavigationTarget {\n // Single metadata record holds route + i18n key + icon — see\n // `ENGINE_PAGE_METADATA` in `launcher-items.frontend.schemas.ts`.\n const metadata = ENGINE_PAGE_METADATA[item.pageRef];\n // The display label lives at `engine.pages.<key>.title` (the contract\n // documented on `EnginePageMetadata.i18nKey`, emitted by the companion's\n // `planEnginePageUnits()`). `i18nKey` itself points at the parent object, so\n // it MUST be suffixed with `.title` — translating the bare key resolves to the\n // `{ title }` object, misses, and renders the raw key in the sidebar. The\n // matching `.title` keys are requested in `useLauncherResolutionContext` so\n // the lazy i18n loader fetches them (engine pages are not an eager section).\n const label = ctx.t(`${metadata.i18nKey}.title`);\n\n return {\n targetKind: LauncherItemTargetKind.ENGINE_PAGE,\n id: `resolved-engine-${item.pageRef}`,\n ref: `engine:${item.pageRef}`,\n label,\n urlPath: metadata.route,\n iconReference: metadata.icon,\n pageRef: item.pageRef,\n contentType: NavigationContentType.ENGINE_PAGE,\n };\n}\n\n/**\n * The words a SETTINGS_SECTION launcher row reads, and why they are two keys.\n *\n * A row naming a section reads that section's own label, `settings_hub.sections.<ref>.label` — the words the hub's\n * rail shows for it (eager `settings_hub` namespace). A row naming no section opens the hub itself and reads the\n * hub's title, the label of the `APP_LAYOUTS_SETTINGS_HUB` component; that key is not eager, so the launcher\n * context requests it (`useLauncherResolutionContext`).\n *\n * Both used to be the literal `'Settings'`, so every settings row read \"Settings\" whatever it opened — a user menu\n * listing Profile showed a \"Settings\" heading over a \"Settings\" row. A missing key renders as its path, like every\n * other label: visibly missing, never a plausible English word.\n */\nexport const SETTINGS_HUB_TITLE_LABEL_KEY = `${LabellingTypes.COMPONENTS}.${FrontendComponentType.APP_LAYOUTS_SETTINGS_HUB}.title`;\n\nexport function settingsHubSectionLabelKey(sectionRef: string): string {\n return `${LabellingTypes.SETTINGS_HUB}.sections.${sectionRef}.label`;\n}\n\n/**\n * The `settingsSectionVisible` predicate of a {@link LauncherResolutionContext} (#3195), from the sections the hub\n * DECLARES and the ones it SHOWS this viewer (the gated config the rail renders).\n *\n * Only a declared section the viewer is not shown answers `false`. An undeclared one answers `true`, so a row naming it\n * still resolves and reads its missing label key: the author sees the mistake, rather than a row that silently vanishes.\n */\nexport function settingsSectionVisibilityOf(\n declaredSectionRefs: Iterable<string>,\n visibleSectionRefs: Iterable<string>,\n): (sectionRef: string) => boolean {\n const declared = new Set(declaredSectionRefs);\n const visible = new Set(visibleSectionRefs);\n return (sectionRef) => !declared.has(sectionRef) || visible.has(sectionRef);\n}\n\n/**\n * The words a row opening a settings SECTION reads: the section's generated label, else the label its placement\n * authors (the rail's own fallback, `tSettingsHubSection`), else the missing key path (#3228).\n */\nfunction resolveSettingsSectionRowLabel(sectionRef: string, ctx: LauncherResolutionContext): string {\n const key = settingsHubSectionLabelKey(sectionRef);\n const generated = ctx.t(key);\n if (generated !== key) return generated;\n return ctx.settingsSectionLabel(sectionRef) ?? key;\n}\n\nfunction resolveSettingsSection(\n item: SettingsSectionItemRef,\n ctx: LauncherResolutionContext,\n): ResolvedNavigationTarget | null {\n // A row that names a section the hub would not show this viewer is not offered (#3195). The hub itself (no section)\n // is always offered: it opens on whatever the viewer may see.\n if (item.sectionRef && ctx.settingsSectionVisible && !ctx.settingsSectionVisible(item.sectionRef)) {\n logDebug('Launcher settings section withheld: the Settings Hub does not show it to this viewer', { sectionRef: item.sectionRef });\n return null;\n }\n const urlPath = item.sectionRef\n ? CommonRoutePaths.settingsSection.replace(':sectionRef', item.sectionRef)\n : CommonRoutePaths.settings;\n return {\n targetKind: LauncherItemTargetKind.SETTINGS_SECTION,\n id: `resolved-settings-${item.sectionRef ?? 'default'}`,\n ref: `settings:${item.sectionRef ?? 'default'}`,\n label: item.sectionRef ? resolveSettingsSectionRowLabel(item.sectionRef, ctx) : ctx.t(SETTINGS_HUB_TITLE_LABEL_KEY),\n urlPath,\n // The section's own rail icon when its placement names one; the hub itself, and a section without one, take the gear.\n iconReference: (item.sectionRef && ctx.settingsSectionIcon(item.sectionRef)) || StandardIconReference.SETTINGS,\n contentType: NavigationContentType.SETTINGS_HUB,\n sectionRef: item.sectionRef,\n };\n}\n\nfunction resolveCustomComponent(\n item: CustomComponentItemRef,\n ctx: LauncherResolutionContext,\n): ResolvedNavigationTarget {\n return {\n targetKind: LauncherItemTargetKind.CUSTOM_COMPONENT,\n id: `resolved-custom-${item.componentRef}`,\n ref: `custom:${item.componentRef}`,\n label: item.componentRef,\n urlPath: '',\n componentRef: item.componentRef,\n contextResourceIdentifiers:\n ctx.contextResourceIdentifiers && Object.keys(ctx.contextResourceIdentifiers).length > 0\n ? ctx.contextResourceIdentifiers\n : undefined,\n };\n}\n\n\n// ════════════════════════════════════════════════════════════════\n// Per-Launcher Resolution Functions\n// ════════════════════════════════════════════════════════════════\n\n/**\n * Resolve a sidebar item (with potential children) to a `ResolvedSidebarItem`.\n * Recursively resolves children.\n */\nfunction resolveSidebarItem(\n item: SidebarItem,\n ctx: LauncherResolutionContext,\n): ResolvedSidebarItem | null {\n const target = resolveItemRef(item, ctx);\n if (!target) return null;\n\n let children: ResolvedSidebarItem[] | undefined;\n if (item.children && item.children.length > 0) {\n children = item.children\n .map(child => resolveSidebarItem(child, ctx))\n .filter((resolved): resolved is ResolvedSidebarItem => resolved !== null);\n }\n\n return {\n ...target,\n displayPolicy: item.displayPolicy,\n notificationBadgeRef: item.notificationBadgeRef,\n children,\n };\n}\n\n/**\n * Resolve sidebar sections from per-launcher config.\n *\n * Dispatches on `contentKind`:\n * - `NAVIGATION_LIST`: resolves each `LauncherItemRef` in `children` via `resolveItemRef`\n * - `RESOURCE_BROWSER`: passes through (component-level rendering, no item resolution), unless the viewer's roles\n * cannot perform its bound operation (#2674): then the section is dropped, as a launcher row for it would be\n * - `GUIDANCE_WIDGET`: passes through\n * - `CUSTOM_COMPONENT`: passes through\n *\n * `visibleInModes` / `scopeCondition` filtering is NOT applied here —\n * that happens in `core/mode/section-visibility.ts`.\n */\nexport function resolveSidebarSections(\n sections: SidebarSection[],\n ctx: LauncherResolutionContext,\n): ResolvedSidebarSection[] {\n return sections.flatMap((section): ResolvedSidebarSection[] => {\n switch (section.contentKind) {\n case SidebarSectionContentKind.NAVIGATION_LIST:\n return [resolveNavigationListSection(section, ctx)];\n case SidebarSectionContentKind.RESOURCE_BROWSER:\n return viewerCanBrowse(section, ctx) ? [resolveResourceBrowserSection(section)] : [];\n case SidebarSectionContentKind.GUIDANCE_WIDGET:\n return [resolveGuidanceWidgetSection(section)];\n case SidebarSectionContentKind.CUSTOM_COMPONENT:\n return [resolveCustomComponentSection(section)];\n }\n });\n}\n\n/**\n * Whether the viewer may perform the operation a RESOURCE_BROWSER section fetches with (#2674). A browser the viewer\n * cannot list renders the backend's refusal as its content; dropping the section is what the launcher does for a row,\n * and it is judged by the same `viewerMayPerformOperation` (roles through the application's tables, and an\n * organization-unit grant, #2376, #2381). An operation that does not resolve keeps the section, so the browser can\n * report its own configuration problem; a context that does not filter by role (`viewerRoles: null`) keeps it too.\n */\nfunction viewerCanBrowse(section: SidebarSection_ResourceBrowser, ctx: LauncherResolutionContext): boolean {\n if (!ctx.viewerRoles) return true;\n const config = ctx.registry.resourceConfigurations[section.resourceType] as AnyFrontendResourceConfiguration | undefined;\n if (!config) return true;\n const operation = resolveSidebarResourceBrowserOperation(config, section.operation ?? CoreResourceOperation.LIST, section.operationVariant);\n return operation === undefined || viewerMayPerformOperation({ ...operation, resourceType: section.resourceType }, ctx.viewerRoles);\n}\n\nfunction resolveNavigationListSection(\n section: SidebarSection_NavigationList,\n ctx: LauncherResolutionContext,\n): ResolvedSidebarSection_NavigationList {\n const items = section.children\n .map(child => resolveSidebarItem(child, ctx))\n .filter((resolved): resolved is ResolvedSidebarItem => resolved !== null);\n\n return {\n contentKind: SidebarSectionContentKind.NAVIGATION_LIST,\n ref: section.ref,\n label: section.label,\n icon: section.icon,\n showLabel: section.showLabel,\n collapsible: section.collapsible,\n defaultCollapsed: section.defaultCollapsed,\n isPrimary: section.isPrimary,\n visibleInModes: section.visibleInModes,\n items,\n behavior: section.behavior,\n inlineCreate: section.inlineCreate,\n inlineCreateResourceType: section.inlineCreateResourceType,\n nested: section.nested,\n maxNestingDepth: section.maxNestingDepth,\n };\n}\n\nfunction resolveResourceBrowserSection(\n section: SidebarSection_ResourceBrowser,\n): ResolvedSidebarSection_ResourceBrowser {\n return {\n contentKind: SidebarSectionContentKind.RESOURCE_BROWSER,\n ref: section.ref,\n label: section.label,\n icon: section.icon,\n showLabel: section.showLabel,\n collapsible: section.collapsible,\n defaultCollapsed: section.defaultCollapsed,\n visibleInModes: section.visibleInModes,\n resourceType: section.resourceType,\n operation: section.operation,\n operationVariant: section.operationVariant,\n navigateOperation: section.navigateOperation,\n navigateOperationVariant: section.navigateOperationVariant,\n instanceFilter: section.instanceFilter,\n onInstanceClick: section.onInstanceClick,\n };\n}\n\nfunction resolveGuidanceWidgetSection(\n section: SidebarSection_GuidanceWidget,\n): ResolvedSidebarSection_GuidanceWidget {\n return {\n contentKind: SidebarSectionContentKind.GUIDANCE_WIDGET,\n ref: section.ref,\n label: section.label,\n icon: section.icon,\n showLabel: section.showLabel,\n collapsible: section.collapsible,\n defaultCollapsed: section.defaultCollapsed,\n visibleInModes: section.visibleInModes,\n guidanceRef: section.guidanceRef,\n };\n}\n\nfunction resolveCustomComponentSection(\n section: SidebarSection_CustomComponent,\n): ResolvedSidebarSection_CustomComponent {\n return {\n contentKind: SidebarSectionContentKind.CUSTOM_COMPONENT,\n ref: section.ref,\n label: section.label,\n icon: section.icon,\n showLabel: section.showLabel,\n collapsible: section.collapsible,\n defaultCollapsed: section.defaultCollapsed,\n visibleInModes: section.visibleInModes,\n componentRef: section.componentRef,\n };\n}\n\n/**\n * Resolve command menu commands from per-launcher config.\n * Groups by category if present.\n */\nexport function resolveCommandMenuCommands(\n commands: CommandMenuCommand[],\n ctx: LauncherResolutionContext,\n): ResolvedCommandMenuItem[] {\n const resolved: ResolvedCommandMenuItem[] = [];\n\n for (const cmd of commands) {\n const target = resolveItemRef(cmd, ctx);\n if (!target) continue;\n\n resolved.push({\n ...target,\n category: cmd.category,\n shortcut: cmd.shortcut,\n searchKeywords: cmd.searchKeywords,\n displayPolicy: cmd.displayPolicy,\n });\n }\n\n return resolved;\n}\n\n/**\n * Resolve hotkey bindings from per-launcher config.\n */\nexport function resolveHotkeyBindings(\n bindings: HotkeyBinding[],\n ctx: LauncherResolutionContext,\n): ResolvedHotkeyBinding[] {\n const resolved: ResolvedHotkeyBinding[] = [];\n\n for (const binding of bindings) {\n const target = resolveItemRef(binding, ctx);\n if (!target) continue;\n\n const description =\n binding.description ??\n (binding.kind === LauncherItemTargetKind.RESOURCE_OPERATION\n ? ctx.tResourceOperation(binding.resourceType, binding.operation, 'title')\n : target.label);\n\n resolved.push({\n ...target,\n shortcut: binding.shortcut,\n scope: binding.scope,\n description,\n });\n }\n\n return resolved;\n}\n\n/**\n * Resolve quick action items from per-launcher config.\n */\nexport function resolveQuickActions(\n actions: QuickActionItem[],\n ctx: LauncherResolutionContext,\n): ResolvedQuickActionItem[] {\n const resolved: ResolvedQuickActionItem[] = [];\n\n for (const action of actions) {\n const target = resolveItemRef(action, ctx);\n if (!target) continue;\n\n resolved.push({\n ...target,\n displayPolicy: action.displayPolicy,\n });\n }\n\n return resolved;\n}\n\n/**\n * Resolve control panel items from per-launcher config.\n */\nexport function resolveControlPanelItems(\n items: ControlPanelItem[],\n ctx: LauncherResolutionContext,\n): ResolvedControlPanelItem[] {\n const resolved: ResolvedControlPanelItem[] = [];\n\n for (const item of items) {\n const target = resolveItemRef(item, ctx);\n if (!target) continue;\n\n resolved.push({\n ...target,\n section: item.section,\n });\n }\n\n return resolved;\n}\n\n/**\n * Resolve toolbar tools from per-launcher config.\n */\nexport function resolveToolbarTools(\n tools: ToolbarItem[],\n ctx: LauncherResolutionContext,\n): ResolvedToolbarItem[] {\n const resolved: ResolvedToolbarItem[] = [];\n\n for (const tool of tools) {\n const target = resolveItemRef(tool, ctx);\n if (!target) continue;\n\n resolved.push({\n ...target,\n group: tool.group,\n iconOnly: tool.iconOnly,\n });\n }\n\n return resolved;\n}\n\n/**\n * Resolve menubar content — validates hosted components exist and resolves items.\n */\nexport function resolveMenubarContent(\n hostedComponents: MenubarHostedComponent[] | undefined,\n items: MenubarLauncherItem[] | undefined,\n ctx: LauncherResolutionContext,\n): ResolvedMenubarContent {\n const resolvedItems: ResolvedMenubarItem[] = [];\n\n if (items) {\n for (const item of items) {\n const target = resolveItemRef(item, ctx);\n if (!target) continue;\n\n resolvedItems.push({\n ...target,\n group: item.group,\n ...(item.notificationBadgeRef ? { notificationBadgeRef: item.notificationBadgeRef } : {}),\n });\n }\n }\n\n return {\n hostedComponents: hostedComponents ?? [],\n items: resolvedItems,\n };\n}\n"]}
1
+ {"version":3,"file":"launcher-resolution.js","sourceRoot":"","sources":["../../../../src/core/navigation/launcher-resolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,qCAAqC,EACrC,+BAA+B,EAC/B,wCAAwC,EACxC,oBAAoB,EACpB,6BAA6B,GAI9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAQ5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAC;AACpH,OAAO,EAAE,qBAAqB,EAAgC,MAAM,sBAAs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AC1F,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO;QACL,gBAAgB,EAAE,gBAAgB,IAAI,EAAE;QACxC,KAAK,EAAE,aAAa;KACrB,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Launcher Resolution Layer\n *\n * Per-launcher content resolution. Each launcher declares its own content via\n * config schemas (e.g., `contentSections`, `commands`, `bindings`, `tools`),\n * and this module resolves those declarations into runtime items.\n *\n * Core concept: `resolveItemRef()` dispatches on `LauncherItemRef.kind`\n * and produces a `ResolvedNavigationTarget` — the common resolved output for any\n * launcher item, regardless of which launcher it belongs to.\n *\n * Per-launcher functions (e.g., `resolveSidebarSections()`) layer launcher-specific\n * properties on top of the core resolution.\n *\n * These resolution functions replaced the old scan-based `getAllNavigationItems()`\n * approach, which has been deleted. The coexistence period is over.\n */\n\nimport {\n computeRoleHierarchy,\n CoreResourceOperation,\n isReadShapedOperation,\n OrganizationUnitNarrowingDecisionKind,\n PlatformAccessGrants_Operations,\n resolveOrganizationUnitNarrowingDecision,\n ResourcePrimaryScope,\n userRolesSatisfyRequiredRoles,\n type ApplicationRoleTables,\n type RequiredFeaturesConfig,\n type UserSelfAccessProfile,\n} from '@wildo-ai/saas-models';\nimport { FrontendComponentType, LabellingTypes } from '@wildo-ai/presets-components-models';\n\nimport type {\n AnyFrontendResourceConfiguration,\n FrontendResourceConfiguration_Operation,\n FrontendResourcesRegistry,\n FrontendResourceOperationContext,\n} from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport { frontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport { IconCategory, StandardIconReference } from '~wildo-frontend-lib/core/icons/icon-registry.frontend.schemas';\nimport { NavigationContentType, type NavigationIconReference } from './navigation.schemas';\nimport { NavigationUtils } from './navigation.utils';\nimport { resolveSidebarResourceBrowserOperation } from './sidebar-resource-browser-operation';\nimport {\n LauncherItemTargetKind,\n EnginePageRef,\n ENGINE_PAGE_METADATA,\n SidebarSectionContentKind,\n type SidebarSectionBehavior,\n type SidebarSectionInlineCreate,\n type LauncherItemRef,\n type ResourceOperationItemRef,\n type ViewItemRef,\n type ResourceViewItemRef,\n type EnginePageItemRef,\n type CustomComponentItemRef,\n type SettingsSectionItemRef,\n type SidebarSection,\n type SidebarSection_NavigationList,\n type SidebarSection_ResourceBrowser,\n type SidebarSection_GuidanceWidget,\n type SidebarSection_CustomComponent,\n type SidebarItem,\n type CommandMenuCommand,\n type HotkeyBinding,\n type QuickActionItem,\n type ControlPanelItem,\n type ToolbarItem,\n type MenubarHostedComponent,\n type MenubarLauncherItem,\n type UtilityPanelItem,\n type ResourceBrowserClickContext,\n} from '~wildo-frontend-lib/core/config/launcher-items.frontend.schemas';\nimport { CommonRoutePaths } from '~wildo-frontend-lib/core/runtime/routes.frontend.definitions';\nimport {\n type SidebarItemDisplayPolicy,\n type CommandMenuDisplayPolicy,\n type QuickActionDisplayPolicy,\n type HotkeyScope,\n} from '~wildo-frontend-lib/core/config/app-level-components.frontend.schemas';\nimport {\n buildCompositeRouteUrlPath,\n buildResourceInsertedCompositeIdentity,\n isStandaloneRoutableCompositeView,\n isStandaloneRoutableInsertedCompositeView,\n type CompositeViewDefinition,\n} from '~wildo-frontend-lib/core/config/composite-view.schemas';\nimport {\n buildChartRouteUrlPath,\n buildResourceInsertedChartIdentity,\n isStandaloneRoutableInsertedChartView,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport type { FullCustomViewDefinition } from '~wildo-frontend-lib/core/config/full-custom-view.schemas';\nimport type { FlowsActorsViewDefinition } from '~wildo-frontend-lib/core/config/flows-actors-view.schemas';\nimport {\n buildExecutionRouteUrlPath,\n buildResourceInsertedExecutionIdentity,\n} from '~wildo-frontend-lib/core/config/execution-view.schemas';\nimport { FrontendView_ScopeMode } from '~wildo-frontend-lib/core/config/views-frontend.schemas';\nimport { findResourceOwnedViewReferenceMatches } from '~wildo-frontend-lib/core/config/resource-owned-view-resolution.frontend.utils';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\n\nconst logger: LoggerFrontendService = LoggerFrontendService.getLogger();\nconst logDebug: (message: string, context?: Record<string, unknown>) => void = logger.debugByType('launcher-resolution');\nlogger.setDebugTypeLogging('launcher-resolution', false);\n\n// ════════════════════════════════════════════════════════════════\n// Resolution Context — all dependencies the resolution layer needs\n// ════════════════════════════════════════════════════════════════\n\n/**\n * All external dependencies the resolution functions need.\n * Hooks create this from their own context and pass it in.\n */\n/**\n * The viewer's roles as a role check needs them: kept apart by scope, because each scope's hierarchy is resolved\n * against its own role table (`userRolesSatisfyRequiredRoles`). Organization roles are the CURRENT organization's\n * only. Built by `useViewerEffectiveRoles`, the one place they are derived.\n *\n * Roles not known yet (permissions not loaded, an anonymous visitor) are EMPTY, not absent: the viewer holds no role,\n * so a role-gated entry appears once the roles arrive rather than being offered and then withdrawn. That is the\n * project's fail-closed rule; an unrestricted entry, or one open to anonymous visitors, is unaffected.\n */\nexport interface LauncherEffectiveRoles {\n applicationRoles: string[];\n organizationRoles: string[];\n /**\n * The application's role tables these roles are expanded against, and what a role neither table knows does\n * (`useApplicationRoleTables`). Carried with the roles so no check can expand them against the wrong tables.\n */\n roleTables: ApplicationRoleTables;\n /** The organization `organizationRoles` are held in — the one a decision about an organization's resource is made in. */\n organizationId: string | null;\n /**\n * The backend's own account of this viewer's access (`user-self | access_profile`, #2381), or `null` when not loaded.\n * It is what lets {@link viewerMayPerformOperation} see a grant the memberships cannot: an organization-unit one.\n */\n accessProfile: UserSelfAccessProfile | null;\n}\n\n/**\n * The ONE role-visibility decision of the app shell: OR semantics through the role hierarchy, the decision the\n * backend's operation-role check makes. Shared by launcher items and Settings Hub sections, which used to answer it\n * differently (the hub compared role names with no hierarchy, so an owner failed a gate naming the administrator role).\n * The roles are expanded against the application's own tables, so a custom role passes exactly the gates the backend\n * would let it through, and a role neither table knows passes none. An empty or absent requirement is open.\n */\nexport function viewerHoldsOneOfRoles(requiredRoles: readonly string[] | undefined, effectiveRoles: LauncherEffectiveRoles): boolean {\n if (!requiredRoles?.length) return true;\n return userRolesSatisfyRequiredRoles({\n requiredRoles,\n userAppRoles: effectiveRoles.applicationRoles,\n userOrgRoles: effectiveRoles.organizationRoles,\n appRolesConfig: effectiveRoles.roleTables.appRolesConfig,\n orgRolesConfig: effectiveRoles.roleTables.orgRolesConfig,\n unresolvableRoles: effectiveRoles.roleTables.unresolvableRoles,\n });\n}\n\n/**\n * Whether the shell may offer this viewer an operation on a resource (#2381) — the decision the backend's gate makes,\n * including its ADDITIVE unit narrowing: an operation is offered when the viewer's roles satisfy it\n * ({@link viewerHoldsOneOfRoles}), or when the backend's own narrowing decision, `resolveOrganizationUnitNarrowingDecision`\n * fed with the backend's own role entries and maps (the access profile), admits them through an organization-unit\n * grant (`UNIT_NARROWED`) or as a unit-scoped representative reading a resource declared organization-wide for representatives.\n *\n * Without the profile only the first half can answer, so a unit-granted operation stays hidden — never offered on a\n * guess. Presentation, never authorization: the backend still decides every request.\n */\nexport function viewerMayPerformOperation(\n operation: {\n resourceType: string;\n roles?: readonly string[];\n operationIdentifier: unknown;\n resourceOperationLike?: unknown;\n admitsCrossTenantPlatformAdministration?: boolean;\n /** The resource's primary scope, when the caller knows it: the crossing rule applies only inside a tenant. */\n resourcePrimaryScope?: unknown;\n },\n viewer: LauncherEffectiveRoles,\n): boolean {\n if (crossingVariantIsNotTheViewers(operation, viewer)) return false;\n // A viewer KNOWN to stand outside the addressed organization reaches it only through a variant that declares the\n // crossing (#2473, #2600): the backend refuses every other variant as an undeclared crossing, whatever role the viewer\n // holds, and records the attempt. `requestAccess` is the backend's own exemption, so it is exempt here too. Inert for\n // a question about the viewer's current organization, which they belong to.\n if (viewerIsKnownOutsideOrganization(viewer)\n && operation.admitsCrossTenantPlatformAdministration !== true\n && String(operation.operationIdentifier) !== PlatformAccessGrants_Operations.REQUEST_ACCESS) return false;\n if (viewerHoldsOneOfRoles(operation.roles, viewer)) return true;\n if (!viewer.accessProfile || !viewer.organizationId) return false;\n const tables = viewer.roleTables;\n const decision = resolveOrganizationUnitNarrowingDecision({\n resourceType: operation.resourceType,\n requiredRoles: operation.roles ?? [],\n initiatorRoles: viewer.accessProfile.roleEntries,\n organizationId: viewer.organizationId,\n narrowingRegistry: viewer.accessProfile.organizationUnitNarrowing,\n // The own-rows declarations too (#3068): a declared role held on a unit supplies no unit, and the backend decides so.\n ownRowsRegistry: viewer.accessProfile.organizationOwnRows,\n relationshipOrganizationWideAccess: viewer.accessProfile.relationshipOrganizationWideAccess,\n operationIsReadOnly: isReadShapedOperation(operation),\n roleHierarchyResolver: (role, scope) =>\n computeRoleHierarchy(role, scope === ResourcePrimaryScope.APPLICATION ? tables.appRolesConfig : tables.orgRolesConfig),\n });\n return decision.kind === OrganizationUnitNarrowingDecisionKind.UNIT_NARROWED\n || decision.kind === OrganizationUnitNarrowingDecisionKind.RELATIONSHIP_ORGANIZATION_WIDE;\n}\n\n/**\n * Whether the viewer has any standing in the organization `viewer.organizationId` names (#2473): an organization-wide\n * role there, or, per the backend's own access profile, a unit-scoped or relationship entry in it.\n *\n * A viewer with none is OUTSIDE that tenant — a platform operator who opened it from the tenant directory — and the\n * backend admits such a caller only through a variant that declares the crossing\n * (`admitsCrossTenantPlatformAdministration`, with a usable access grant). Every other variant is an undeclared\n * crossing: refused, and recorded as an attempted one. `false` when no organization is named.\n */\nexport function viewerBelongsToOrganization(viewer: LauncherEffectiveRoles): boolean {\n if (!viewer.organizationId) return false;\n if (viewer.organizationRoles.length > 0) return true;\n return (viewer.accessProfile?.roleEntries ?? []).some((entry) =>\n String(entry.relatedPrimaryScope) === ResourcePrimaryScope.ORGANIZATIONS && String(entry.relatedResourceId) === viewer.organizationId);\n}\n\n/**\n * Whether the viewer is KNOWN to stand outside the organization `viewer.organizationId` names (#2473): they hold roles\n * we can see (an application role, or the access profile has loaded) and none of them is in that tenant\n * ({@link viewerBelongsToOrganization}). The platform operator who opened a tenant from the directory is the case.\n *\n * A viewer whose roles are not known yet (permissions loading, or the auth context briefly unavailable) is NOT outside:\n * nothing says so, and treating an unknown as foreign would withdraw an in-place write, and the edit state behind it,\n * every time the context flickers. Role-gated operations stay hidden for such a viewer anyway, by the role check.\n */\nexport function viewerIsKnownOutsideOrganization(viewer: LauncherEffectiveRoles): boolean {\n if (!viewer.organizationId || viewerBelongsToOrganization(viewer)) return false;\n return viewer.applicationRoles.length > 0 || viewer.accessProfile !== null;\n}\n\n/**\n * Whether the shell may offer this viewer an operation addressed to ONE person's row (#3791) — the WHOSE-ROW half of the\n * backend's gate, which {@link viewerMayPerformOperation} (the WHO half) does not ask.\n *\n * A `USER_SELF`-scoped operation reaches only the person the request is made by (`authorizeUserSelf`), unless its variant\n * declares `admitsCrossSubjectUserAdministration`; the backend's own account of that reach is `userSubjectReadReach`.\n * So for another person:\n * - the ordinary variant is not this viewer's, whatever role they hold: the `users` default READ is gated `APP_USER`,\n * which every signed-in person holds, and it answers `403` for any row but their own;\n * - an admitting variant is administrative, and is the viewer's only when their roles satisfy it.\n *\n * Measured on Wonder Todos (#3791): an organization administrator clicked a member's name in the Settings Hub, the\n * reference opened the `users` default READ for that member, every read on the page answered `403`, and the page was\n * titled by the person's id over a column of \"Couldn't load\" panels. Whether an organization administrator should be able\n * to open a member's person page is a product decision the `users` configuration records as not taken; until it is, the\n * honest answer is to offer no door.\n *\n * Outside the question, and answered `true`: an operation that is not `USER_SELF`-scoped (its other gates are unchanged)\n * and a row that is the viewer's own. A subject or viewer that is not known answers `false` — fail closed, the door\n * appears once the session is known. Presentation, never authorization: the backend still decides every request.\n */\nexport function viewerReachesUserSubject(\n operation: {\n roles?: readonly string[];\n admitsCrossSubjectUserAdministration?: boolean;\n resourcePrimaryScope?: unknown;\n },\n subject: { subjectUserId: string | null | undefined; viewerUserId: string | null | undefined },\n viewer: LauncherEffectiveRoles,\n): boolean {\n if (operation.resourcePrimaryScope !== ResourcePrimaryScope.USER_SELF) return true;\n if (subject.subjectUserId && subject.viewerUserId && subject.subjectUserId === subject.viewerUserId) return true;\n // The role question alone (`viewerHoldsOneOfRoles`): the tenant rules `viewerMayPerformOperation` adds — the crossing\n // into another organization, unit narrowing — govern an organization's rows, and a person's row is in no organization.\n // Through them an application administrator reading a member of an organization they hold no role in was refused.\n return operation.admitsCrossSubjectUserAdministration === true && viewerHoldsOneOfRoles(operation.roles, viewer);\n}\n\n/**\n * A COLLECTION-shaped variant that crosses into a tenant (`admitsCrossTenantPlatformAdministration`: a LIST, SEARCH,\n * COUNT, CREATE-like or `*_MANY` verb) is the platform operator's door into an organization they do NOT belong to (#2315). For a\n * viewer who holds a role in the addressed organization it is not their door, because taking it acts AS THE PLATFORM:\n * the operator's \"Place hold\" places a PLATFORM-tier hold, which the tenant can then never release. A super-administrator\n * who also owns their organization was offered it on their own legal holds, ranked above the owner's.\n *\n * The backend no longer refuses such a member: since #2482 the collection gate resolves a member's application roles as\n * the per-instance gate does, so the super-administrator role satisfies the crossed variant. Hiding it is therefore a\n * decision about which door is the viewer's, not a mirror of a refusal; the backend stays the authority on what is\n * admitted. Before #2482 this comment said the gate refused, which was then true.\n *\n * Two kinds of crossing variant stay with the ordinary role check, because the backend admits a member through them:\n * - a per-instance verb (READ, UPDATE, DELETE-like, a row action): the row gate passes a member, and the role check\n * keeps the viewer's application entries, so a super-administrator member performs it without a grant. The\n * tenant's own Revoke on an operator access grant is one of these and must stay offered;\n * - a collection verb whose roles the viewer's ORGANIZATION roles satisfy, which the organization role table admits.\n *\n * `requestAccess` is the one exemption the backend makes (an elevation cannot require one), so it is exempt here too.\n */\n// Every verb whose call names no row and so reaches the collection gate: the reads of a collection, a create, and the\n// `*_MANY` verbs (an entitlement's enable and disable are UPDATE_MANY-shaped, #2316).\nconst COLLECTION_SHAPED_OPERATIONS: ReadonlySet<string> = new Set([\n CoreResourceOperation.CREATE,\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.COUNT,\n CoreResourceOperation.CREATE_MANY,\n CoreResourceOperation.UPDATE_MANY,\n CoreResourceOperation.DELETE_MANY,\n]);\n\nfunction crossingVariantIsNotTheViewers(\n operation: {\n roles?: readonly string[];\n operationIdentifier: unknown;\n resourceOperationLike?: unknown;\n admitsCrossTenantPlatformAdministration?: boolean;\n resourcePrimaryScope?: unknown;\n },\n viewer: LauncherEffectiveRoles,\n): boolean {\n if (operation.admitsCrossTenantPlatformAdministration !== true) return false;\n // Only a resource INSIDE a tenant has an organization gate to refuse a member. An application-scoped crossing (the\n // application audit log) is refused by no organization role table, and a caller that does not say the scope leaves\n // the decision to the ordinary role check.\n if (String(operation.resourcePrimaryScope ?? '') !== ResourcePrimaryScope.ORGANIZATIONS) return false;\n if (String(operation.operationIdentifier) === PlatformAccessGrants_Operations.REQUEST_ACCESS) return false;\n if (!viewer.organizationId || viewer.organizationRoles.length === 0) return false;\n const shape = String(operation.resourceOperationLike ?? operation.operationIdentifier);\n if (!COLLECTION_SHAPED_OPERATIONS.has(shape)) return false;\n // The organization role table is what the collection gate falls back to for a member.\n return !viewerHoldsOneOfRoles(operation.roles, { ...viewer, applicationRoles: [] });\n}\n\nexport interface LauncherResolutionContext {\n registry: FrontendResourcesRegistry;\n contextResourceIdentifiers?: Record<string, string>;\n views: {\n compositeViews?: CompositeViewDefinition[];\n fullCustomViews?: FullCustomViewDefinition[];\n flowsActorsViews?: FlowsActorsViewDefinition[];\n };\n tResourceHeader: (resourceType: string, key: string) => string;\n tResourceOperation: (resourceType: string, operation: string, key: string) => string;\n /**\n * View title resolver. Composite views resolve through their translationRef\n * contract, and other supported view families resolve through their dedicated\n * view-title label contract instead of exposing raw refs.\n */\n tViewTitle: (viewRef: string, contentType: NavigationContentType) => string;\n /**\n * Generic i18n key resolver. Used for engine page labels and other\n * non-resource/non-view translations. Returns the resolved string.\n */\n t: (key: string) => string;\n /**\n * The icon the Settings Hub's rail draws for a section (its placement's `icon`), or `undefined` when the placement\n * names none. A row that opens a settings section draws the same icon as the rail entry it opens, so \"Profile\" in\n * the user menu is not a gear beside a gear.\n */\n settingsSectionIcon: (sectionRef: string) => string | undefined;\n /**\n * The label the Settings Hub's placement AUTHORS for a section (its `label`), or `undefined` when the hub declares\n * no such section. A row that opens a section reads the section's generated label first and, while there is none,\n * this authored one: exactly what the rail draws for the same entry (`tSettingsHubSection`), so the user menu and the\n * rail cannot disagree, and a fresh application's menu reads \"Profile\" rather than `settings_hub.sections.profile.label`\n * before its labels are generated (#3228). It is the resolved section's `label`: the placement's authored `label`,\n * or, for a placement that authors none, the destination's ref (`resolveSettingsHubConfig`), the same word the rail\n * then shows. A section the hub does not declare has none, so its row still shows the missing key.\n */\n settingsSectionLabel: (sectionRef: string) => string | undefined;\n /**\n * The viewer's roles (`useViewerEffectiveRoles`), or `null` when this context does not filter by role at all. A\n * RESOURCE_OPERATION row is withheld when the viewer may not perform the operation (#2376, #2381): they hold none\n * of its own `roles`, and no organization-unit grant in their access profile reaches it (`viewerMayPerformOperation`).\n * An entry the backend would refuse is not offered. Roles not known yet count as none, so such a row appears once they arrive.\n */\n viewerRoles: LauncherEffectiveRoles | null;\n /**\n * Whether the Settings Hub would show the viewer a section, or `null` when this context does not filter settings rows.\n *\n * A SETTINGS_SECTION row is withheld when the hub declares its section but would not show it to this viewer (#3195);\n * a section the hub does not declare at all answers `true`, so its row still shows its missing label key. The answer\n * comes from the SAME\n * gated hub config the rail renders (`useVisibleSettingsHubConfig`: scope, capability, roles, features), so the\n * command menu, the user menu and the rail cannot disagree. Before this, the only gate on such a row was its own\n * `runtimeAvailability`, so Cmd+K offered \"Billing\" to an ordinary member whose rail had no Billing entry, and\n * choosing it landed on the hub's fallback section.\n */\n settingsSectionVisible: ((sectionRef: string) => boolean) | null;\n}\n\n\n// ════════════════════════════════════════════════════════════════\n// Resolved Types — output of the resolution layer\n// ════════════════════════════════════════════════════════════════\n\n/**\n * Core resolved navigation target — the output of `resolveItemRef()`.\n *\n * Contains everything a launcher needs to render and navigate: label, URL,\n * icon, and the source metadata (resource context or view ref) that the\n * navigation controller needs.\n */\nexport interface ResolvedNavigationTarget {\n targetKind: LauncherItemTargetKind;\n id: string;\n ref: string;\n label: string;\n urlPath: string;\n /**\n * The icon as a REFERENCE, never a rendered element (#1828): resolution is pure data, so any renderer can draw the\n * result, and the preset renders it through the icon registry. Resolution used to call `renderIcon` here and keep\n * only the element.\n */\n iconReference?: NavigationIconReference;\n\n resourceType?: string;\n operationIdentifier?: string;\n operation?: FrontendResourceConfiguration_Operation;\n resourceContext?: FrontendResourceOperationContext;\n\n viewRef?: string;\n contentType?: NavigationContentType;\n pageRef?: EnginePageRef;\n flowsActorsSystemRef?: string;\n fullCustomComponentRef?: string;\n requiredFeatures?: RequiredFeaturesConfig;\n contextResourceIdentifiers?: Record<string, string>;\n urlParamValues?: Record<string, string>;\n\n componentRef?: string;\n\n /** For SETTINGS_SECTION targets: the section to pre-open in the Settings Hub. */\n sectionRef?: string;\n}\n\n/** A sidebar item with its `LauncherItemRef` resolved to a navigation target. */\nexport interface ResolvedSidebarItem extends ResolvedNavigationTarget {\n displayPolicy?: SidebarItemDisplayPolicy;\n /** Typed badge-definition reference carried through to the rendered item. */\n notificationBadgeRef?: string;\n children?: ResolvedSidebarItem[];\n}\n\n/** Resolved NAVIGATION_LIST section — items resolved to navigation targets. */\nexport interface ResolvedSidebarSection_NavigationList {\n contentKind: SidebarSectionContentKind.NAVIGATION_LIST;\n ref: string;\n label?: string;\n icon?: string;\n showLabel?: boolean;\n collapsible?: boolean;\n defaultCollapsed?: boolean;\n /** See `SidebarSection_NavigationList.isPrimary` — primary group merged with Home. */\n isPrimary?: boolean;\n visibleInModes?: string[];\n items: ResolvedSidebarItem[];\n behavior?: SidebarSectionBehavior;\n inlineCreate?: SidebarSectionInlineCreate;\n inlineCreateResourceType?: string;\n nested?: boolean;\n maxNestingDepth?: number;\n}\n\n/** Resolved RESOURCE_BROWSER section — passed through (no item resolution needed). */\nexport interface ResolvedSidebarSection_ResourceBrowser {\n contentKind: SidebarSectionContentKind.RESOURCE_BROWSER;\n ref: string;\n label?: string;\n icon?: string;\n showLabel?: boolean;\n collapsible?: boolean;\n defaultCollapsed?: boolean;\n visibleInModes?: string[];\n resourceType: string;\n operation?: string;\n operationVariant?: string;\n navigateOperation?: string;\n navigateOperationVariant?: string;\n instanceFilter?: (instance: Record<string, unknown>) => boolean;\n onInstanceClick?: (context: ResourceBrowserClickContext) => void;\n}\n\n/** Resolved GUIDANCE_WIDGET section — passed through. */\nexport interface ResolvedSidebarSection_GuidanceWidget {\n contentKind: SidebarSectionContentKind.GUIDANCE_WIDGET;\n ref: string;\n label?: string;\n icon?: string;\n showLabel?: boolean;\n collapsible?: boolean;\n defaultCollapsed?: boolean;\n visibleInModes?: string[];\n guidanceRef: string;\n}\n\n/** Resolved CUSTOM_COMPONENT section — passed through. */\nexport interface ResolvedSidebarSection_CustomComponent {\n contentKind: SidebarSectionContentKind.CUSTOM_COMPONENT;\n ref: string;\n label?: string;\n icon?: string;\n showLabel?: boolean;\n collapsible?: boolean;\n defaultCollapsed?: boolean;\n visibleInModes?: string[];\n componentRef: string;\n}\n\n/** Discriminated union of all resolved sidebar sections. */\nexport type ResolvedSidebarSection =\n | ResolvedSidebarSection_NavigationList\n | ResolvedSidebarSection_ResourceBrowser\n | ResolvedSidebarSection_GuidanceWidget\n | ResolvedSidebarSection_CustomComponent;\n\n/** Resolved command menu entry. */\nexport interface ResolvedCommandMenuItem extends ResolvedNavigationTarget {\n category?: string;\n shortcut?: string;\n searchKeywords?: string[];\n displayPolicy?: CommandMenuDisplayPolicy;\n}\n\n/** Resolved hotkey binding. */\nexport interface ResolvedHotkeyBinding extends ResolvedNavigationTarget {\n shortcut: string;\n scope?: HotkeyScope;\n description?: string;\n}\n\n/** Resolved quick action item. */\nexport interface ResolvedQuickActionItem extends ResolvedNavigationTarget {\n displayPolicy?: QuickActionDisplayPolicy;\n}\n\n/** Resolved control panel item. */\nexport interface ResolvedControlPanelItem extends ResolvedNavigationTarget {\n section?: string;\n}\n\n/** Resolved toolbar item. */\nexport interface ResolvedToolbarItem extends ResolvedNavigationTarget {\n group?: string;\n iconOnly?: boolean;\n}\n\n/** Resolved menubar content (hosted components + items). */\nexport interface ResolvedMenubarContent {\n hostedComponents: MenubarHostedComponent[];\n items: ResolvedMenubarItem[];\n}\n\n/** Resolved menubar item. */\nexport interface ResolvedMenubarItem extends ResolvedNavigationTarget {\n group?: string;\n /** Carried from the declaration, as the sidebar's resolution carries its own. */\n notificationBadgeRef?: string;\n}\n\n\n// ════════════════════════════════════════════════════════════════\n// Core Resolution: resolveItemRef\n// ════════════════════════════════════════════════════════════════\n\n/**\n * Resolve a single `LauncherItemRef` to a navigation target.\n *\n * Dispatches on `item.kind`. Returns `null` for unresolvable refs\n * (DEV warning emitted). This replaces the scan-all logic for individual items.\n */\nexport function resolveItemRef(\n item: LauncherItemRef,\n ctx: LauncherResolutionContext,\n): ResolvedNavigationTarget | null {\n switch (item.kind) {\n case LauncherItemTargetKind.RESOURCE_OPERATION:\n return resolveResourceOperation(item, ctx);\n case LauncherItemTargetKind.VIEW:\n return resolveView(item, ctx);\n case LauncherItemTargetKind.RESOURCE_VIEW:\n return resolveResourceView(item, ctx);\n case LauncherItemTargetKind.ENGINE_PAGE:\n return resolveEnginePage(item, ctx);\n case LauncherItemTargetKind.CUSTOM_COMPONENT:\n return resolveCustomComponent(item, ctx);\n case LauncherItemTargetKind.SETTINGS_SECTION:\n return resolveSettingsSection(item, ctx);\n default: {\n logDebug('Unknown LauncherItemRef kind', { item });\n return null;\n }\n }\n}\n\nfunction resolveResourceOperation(\n item: ResourceOperationItemRef,\n ctx: LauncherResolutionContext,\n): ResolvedNavigationTarget | null {\n const config = ctx.registry.resourceConfigurations[item.resourceType] as AnyFrontendResourceConfiguration | undefined;\n if (!config) {\n logDebug('Resource type not found in registry', { resourceType: item.resourceType });\n return null;\n }\n\n const operations = Array.isArray(config.operations) ? config.operations : [];\n const matchingOperations = operations.filter((op) => String(op.operationIdentifier) === item.operation);\n const defaultOperations = matchingOperations.filter((op) => op.isOperationDefault === true);\n const operation = item.operationVariant\n ? matchingOperations.find((op) => op.variantKey === item.operationVariant)\n : defaultOperations.length === 1\n ? defaultOperations[0]\n : matchingOperations.length === 1\n ? matchingOperations[0]\n : undefined;\n if (!operation) {\n logDebug('Operation not found for resource', {\n resourceType: item.resourceType,\n operation: item.operation,\n operationVariant: item.operationVariant,\n });\n return null;\n }\n // The operation's own roles decide who is offered it, by the same rule a launcher item's `requiredRoles` uses —\n // so an author never restates on the row what the operation already says (#2376). The SELECTED variant is judged,\n // because it is the one whose route the entry opens. The action bar instead keeps the highest-rights variant a viewer\n // qualifies for; a restrictive default beside a broader non-default variant would differ, and none of the engine's\n // resources declares that shape (defaults are the less-privileged variants).\n if (ctx.viewerRoles && !viewerMayPerformOperation({ ...operation, resourceType: item.resourceType }, ctx.viewerRoles)) {\n logDebug('Launcher resource operation withheld: the viewer may not perform it (no role, no reaching unit grant)', {\n resourceType: item.resourceType,\n operation: item.operation,\n });\n return null;\n }\n\n // Resolve the operation's URL against the current AppScope. A launcher item is\n // surfaced whenever the resource's REQUIRED route parameters are satisfiable\n // from the ambient scope (primary scope + custom/optional context), filling both\n // required and optional context identifiers. `resolveResourceUrl` →\n // `selectMatchingRoutePath` picks the route path the scope can satisfy (e.g. the\n // org-scoped `/organizations/:organizationId/todos` over the nested\n // `/…/todo-lists/:todoListId/todos` when no list is in context) and returns\n // `resolvedUrl: undefined` only when NO path is satisfiable — i.e. the resource\n // genuinely requires a non-ambient parent, in which case it is correctly omitted.\n //\n // Previously this dropped EVERY resource whose routes all carry parameters (a\n // zero-parameter `standalone` route check), which excluded all org-scoped\n // resources from the sidebar/launchers even though the org is ambient in\n // AppScope. That expedient gate bypassed the scope mechanism; this routes the\n // decision back through AppScope, the single source of truth for required +\n // optional scope.\n const scopeIdentifiers = ctx.contextResourceIdentifiers ?? {};\n\n const resolved = NavigationUtils.resolveResourceUrl(\n config,\n operation,\n scopeIdentifiers,\n ctx.registry.allResourceFieldIdentifiers,\n );\n const urlPath = resolved?.resolvedUrl;\n if (!urlPath) {\n logDebug('No scope-satisfiable route for launcher resource operation (requires non-ambient context)', {\n resourceType: item.resourceType,\n operation: item.operation,\n scopeKeys: Object.keys(scopeIdentifiers),\n });\n return null;\n }\n const operationIdentifier = String(operation.operationIdentifier);\n\n\n const resourceContext = frontendResourceUtils.createFrontendResourceOperationContextFromOperation({\n resourceType: item.resourceType,\n operation,\n contextResourceIdentifiers: scopeIdentifiers,\n });\n\n return {\n targetKind: LauncherItemTargetKind.RESOURCE_OPERATION,\n id: `resolved-${item.resourceType}-${operationIdentifier}-${operation.variantKey ?? 'default'}`,\n ref: `resource:${item.resourceType}:${operationIdentifier}:${operation.variantKey ?? 'default'}`,\n label: ctx.tResourceOperation(item.resourceType, operationIdentifier, 'title'),\n urlPath,\n iconReference: { category: IconCategory.RESOURCES, resourceType: item.resourceType },\n resourceType: item.resourceType,\n operationIdentifier,\n operation,\n resourceContext,\n contextResourceIdentifiers: scopeIdentifiers,\n };\n}\n\ntype LauncherViewScopeSelector = 'application' | 'resource';\n\nfunction isCompatibleWithLauncherScope(\n scope: FrontendView_ScopeMode,\n expectedScope: LauncherViewScopeSelector,\n): boolean {\n if (expectedScope === 'application') {\n return scope === FrontendView_ScopeMode.APPLICATION;\n }\n\n return scope === FrontendView_ScopeMode.RESOURCE;\n}\n\nfunction resolveView(\n item: ViewItemRef,\n ctx: LauncherResolutionContext,\n): ResolvedNavigationTarget | null {\n const resolvedView = resolveConcreteApplicationViewTarget(item.viewRef, ctx);\n if (!resolvedView) {\n logDebug('Application-scoped VIEW ref not found in any compatible view collection', { viewRef: item.viewRef });\n return null;\n }\n\n return {\n targetKind: LauncherItemTargetKind.VIEW,\n id: `resolved-view-${item.viewRef}`,\n ref: `view:${resolvedView.contentType}:${item.viewRef}`,\n label: ctx.tViewTitle(resolvedView.viewRef, resolvedView.contentType),\n ...resolvedView,\n };\n}\n\nfunction resolveResourceView(\n item: ResourceViewItemRef,\n ctx: LauncherResolutionContext,\n): ResolvedNavigationTarget | null {\n const resolvedView = resolveConcreteResourceViewTarget(item, ctx);\n if (!resolvedView) {\n logDebug('Resource-scoped RESOURCE_VIEW ref not found on the target resource', {\n resourceType: item.resourceType,\n viewRef: item.viewRef,\n });\n return null;\n }\n\n return {\n targetKind: LauncherItemTargetKind.RESOURCE_VIEW,\n id: `resolved-resource-view-${item.resourceType}-${item.viewRef}`,\n ref: `view:${resolvedView.contentType}:${item.resourceType}:${item.viewRef}`,\n label: ctx.tViewTitle(resolvedView.viewRef, resolvedView.contentType),\n ...resolvedView,\n };\n}\n\nfunction resolveConcreteApplicationViewTarget(\n viewRef: string,\n ctx: LauncherResolutionContext,\n): Pick<ResolvedNavigationTarget, 'urlPath' | 'iconReference' | 'viewRef' | 'contentType' | 'fullCustomComponentRef' | 'flowsActorsSystemRef' | 'requiredFeatures' | 'contextResourceIdentifiers'> | null {\n const { compositeViews, fullCustomViews, flowsActorsViews } = ctx.views;\n\n const compositeView = compositeViews?.find(\n v => v.ref === viewRef && isCompatibleWithLauncherScope(v.scope, 'application'),\n );\n if (compositeView) {\n return {\n urlPath: isStandaloneRoutableCompositeView(compositeView)\n ? buildCompositeRouteUrlPath(\n viewRef,\n )\n : '',\n iconReference: { category: IconCategory.COMPOSITE_VIEW, viewReference: viewRef },\n viewRef,\n contentType: NavigationContentType.COMPOSITE_VIEW,\n requiredFeatures: compositeView.requiredFeatures,\n contextResourceIdentifiers: undefined,\n };\n }\n\n const fullCustomView = fullCustomViews?.find(\n v => v.ref === viewRef && isCompatibleWithLauncherScope(v.scope, 'application'),\n );\n if (fullCustomView) {\n return {\n urlPath: `/custom/${viewRef}`,\n iconReference: { category: IconCategory.CUSTOM, customReference: `view-custom-${viewRef}` },\n viewRef,\n contentType: NavigationContentType.FULL_CUSTOM_VIEW,\n fullCustomComponentRef: fullCustomView.componentRef,\n requiredFeatures: fullCustomView.requiredFeatures,\n contextResourceIdentifiers: undefined,\n };\n }\n\n const flowsActorsView = flowsActorsViews?.find(\n v => v.ref === viewRef && isCompatibleWithLauncherScope(v.scope, 'application'),\n );\n if (flowsActorsView) {\n return {\n urlPath: `/flows-actors/${viewRef}`,\n iconReference: { category: IconCategory.CUSTOM, customReference: `view-flows-${viewRef}` },\n viewRef,\n contentType: NavigationContentType.FLOWS_ACTORS_VIEW,\n flowsActorsSystemRef: flowsActorsView.systemRef,\n requiredFeatures: flowsActorsView.requiredFeatures,\n contextResourceIdentifiers: undefined,\n };\n }\n\n return null;\n}\n\nfunction resolveConcreteResourceViewTarget(\n item: ResourceViewItemRef,\n ctx: LauncherResolutionContext,\n): Pick<ResolvedNavigationTarget, 'urlPath' | 'iconReference' | 'viewRef' | 'contentType' | 'requiredFeatures' | 'contextResourceIdentifiers'> | null {\n const resourceConfiguration = ctx.registry.resourceConfigurations[item.resourceType];\n const frontendConfiguration = resourceConfiguration?.frontendConfiguration;\n const viewMatches = findResourceOwnedViewReferenceMatches({\n resourceType: item.resourceType,\n viewRef: item.viewRef,\n registry: ctx.registry,\n });\n const scopedContextResourceIdentifiers =\n ctx.contextResourceIdentifiers\n && Object.keys(ctx.contextResourceIdentifiers).length > 0\n ? ctx.contextResourceIdentifiers\n : undefined;\n\n if (viewMatches.length !== 1) {\n return null;\n }\n\n const compositeView = frontendConfiguration?.compositeViews?.find((view) => view.ref === item.viewRef);\n if (compositeView) {\n if (compositeView.scope !== FrontendView_ScopeMode.RESOURCE) {\n return null;\n }\n\n const insertedIdentity = buildResourceInsertedCompositeIdentity(item.resourceType, compositeView);\n return {\n urlPath: isStandaloneRoutableInsertedCompositeView(compositeView)\n ? buildCompositeRouteUrlPath(insertedIdentity.insertedViewRef, scopedContextResourceIdentifiers)\n : '',\n iconReference: { category: IconCategory.COMPOSITE_VIEW, viewReference: item.viewRef },\n viewRef: insertedIdentity.insertedViewRef,\n contentType: NavigationContentType.COMPOSITE_VIEW,\n requiredFeatures: compositeView.requiredFeatures,\n contextResourceIdentifiers: scopedContextResourceIdentifiers,\n };\n }\n\n const chartView = frontendConfiguration?.chartViews?.find((view) => view.ref === item.viewRef);\n if (chartView) {\n // `InsertedChartDeclaration.scope` is pinned to `FrontendView_ScopeMode.RESOURCE`\n // by construction (see chart-view.frontend.schemas.ts), so no runtime scope\n // narrowing is needed here.\n\n const insertedIdentity = buildResourceInsertedChartIdentity(item.resourceType, chartView);\n return {\n urlPath: isStandaloneRoutableInsertedChartView(chartView)\n ? buildChartRouteUrlPath(insertedIdentity.insertedViewRef, scopedContextResourceIdentifiers)\n : '',\n iconReference: { category: IconCategory.CUSTOM, customReference: `view-chart-${item.viewRef}` },\n viewRef: insertedIdentity.insertedViewRef,\n contentType: NavigationContentType.CHART_VIEW,\n requiredFeatures: chartView.chartDefinition.requiredFeatures,\n contextResourceIdentifiers: scopedContextResourceIdentifiers,\n };\n }\n\n const executionView = frontendConfiguration?.executionViews?.find((view) => view.ref === item.viewRef);\n if (executionView) {\n if (executionView.scope !== FrontendView_ScopeMode.RESOURCE) {\n return null;\n }\n\n const insertedIdentity = buildResourceInsertedExecutionIdentity(item.resourceType, executionView);\n return {\n urlPath: executionView.isAddressable\n ? buildExecutionRouteUrlPath(insertedIdentity.insertedViewRef, scopedContextResourceIdentifiers)\n : '',\n iconReference: { category: IconCategory.CUSTOM, customReference: `view-execution-${item.viewRef}` },\n viewRef: insertedIdentity.insertedViewRef,\n contentType: NavigationContentType.EXECUTION_VIEW,\n requiredFeatures: executionView.requiredFeatures,\n contextResourceIdentifiers: scopedContextResourceIdentifiers,\n };\n }\n\n return null;\n}\n\nfunction resolveEnginePage(\n item: EnginePageItemRef,\n ctx: LauncherResolutionContext,\n): ResolvedNavigationTarget {\n // Single metadata record holds route + i18n key + icon — see\n // `ENGINE_PAGE_METADATA` in `launcher-items.frontend.schemas.ts`.\n const metadata = ENGINE_PAGE_METADATA[item.pageRef];\n // The display label lives at `engine.pages.<key>.title` (the contract\n // documented on `EnginePageMetadata.i18nKey`, emitted by the companion's\n // `planEnginePageUnits()`). `i18nKey` itself points at the parent object, so\n // it MUST be suffixed with `.title` — translating the bare key resolves to the\n // `{ title }` object, misses, and renders the raw key in the sidebar. The\n // matching `.title` keys are requested in `useLauncherResolutionContext` so\n // the lazy i18n loader fetches them (engine pages are not an eager section).\n const label = ctx.t(`${metadata.i18nKey}.title`);\n\n return {\n targetKind: LauncherItemTargetKind.ENGINE_PAGE,\n id: `resolved-engine-${item.pageRef}`,\n ref: `engine:${item.pageRef}`,\n label,\n urlPath: metadata.route,\n iconReference: metadata.icon,\n pageRef: item.pageRef,\n contentType: NavigationContentType.ENGINE_PAGE,\n };\n}\n\n/**\n * The words a SETTINGS_SECTION launcher row reads, and why they are two keys.\n *\n * A row naming a section reads that section's own label, `settings_hub.sections.<ref>.label` — the words the hub's\n * rail shows for it (eager `settings_hub` namespace). A row naming no section opens the hub itself and reads the\n * hub's title, the label of the `APP_LAYOUTS_SETTINGS_HUB` component; that key is not eager, so the launcher\n * context requests it (`useLauncherResolutionContext`).\n *\n * Both used to be the literal `'Settings'`, so every settings row read \"Settings\" whatever it opened — a user menu\n * listing Profile showed a \"Settings\" heading over a \"Settings\" row. A missing key renders as its path, like every\n * other label: visibly missing, never a plausible English word.\n */\nexport const SETTINGS_HUB_TITLE_LABEL_KEY = `${LabellingTypes.COMPONENTS}.${FrontendComponentType.APP_LAYOUTS_SETTINGS_HUB}.title`;\n\nexport function settingsHubSectionLabelKey(sectionRef: string): string {\n return `${LabellingTypes.SETTINGS_HUB}.sections.${sectionRef}.label`;\n}\n\n/**\n * The `settingsSectionVisible` predicate of a {@link LauncherResolutionContext} (#3195), from the sections the hub\n * DECLARES and the ones it SHOWS this viewer (the gated config the rail renders).\n *\n * Only a declared section the viewer is not shown answers `false`. An undeclared one answers `true`, so a row naming it\n * still resolves and reads its missing label key: the author sees the mistake, rather than a row that silently vanishes.\n */\nexport function settingsSectionVisibilityOf(\n declaredSectionRefs: Iterable<string>,\n visibleSectionRefs: Iterable<string>,\n): (sectionRef: string) => boolean {\n const declared = new Set(declaredSectionRefs);\n const visible = new Set(visibleSectionRefs);\n return (sectionRef) => !declared.has(sectionRef) || visible.has(sectionRef);\n}\n\n/**\n * The words a row opening a settings SECTION reads: the section's generated label, else the label its placement\n * authors (the rail's own fallback, `tSettingsHubSection`), else the missing key path (#3228).\n */\nfunction resolveSettingsSectionRowLabel(sectionRef: string, ctx: LauncherResolutionContext): string {\n const key = settingsHubSectionLabelKey(sectionRef);\n const generated = ctx.t(key);\n if (generated !== key) return generated;\n return ctx.settingsSectionLabel(sectionRef) ?? key;\n}\n\nfunction resolveSettingsSection(\n item: SettingsSectionItemRef,\n ctx: LauncherResolutionContext,\n): ResolvedNavigationTarget | null {\n // A row that names a section the hub would not show this viewer is not offered (#3195). The hub itself (no section)\n // is always offered: it opens on whatever the viewer may see.\n if (item.sectionRef && ctx.settingsSectionVisible && !ctx.settingsSectionVisible(item.sectionRef)) {\n logDebug('Launcher settings section withheld: the Settings Hub does not show it to this viewer', { sectionRef: item.sectionRef });\n return null;\n }\n const urlPath = item.sectionRef\n ? CommonRoutePaths.settingsSection.replace(':sectionRef', item.sectionRef)\n : CommonRoutePaths.settings;\n return {\n targetKind: LauncherItemTargetKind.SETTINGS_SECTION,\n id: `resolved-settings-${item.sectionRef ?? 'default'}`,\n ref: `settings:${item.sectionRef ?? 'default'}`,\n label: item.sectionRef ? resolveSettingsSectionRowLabel(item.sectionRef, ctx) : ctx.t(SETTINGS_HUB_TITLE_LABEL_KEY),\n urlPath,\n // The section's own rail icon when its placement names one; the hub itself, and a section without one, take the gear.\n iconReference: (item.sectionRef && ctx.settingsSectionIcon(item.sectionRef)) || StandardIconReference.SETTINGS,\n contentType: NavigationContentType.SETTINGS_HUB,\n sectionRef: item.sectionRef,\n };\n}\n\nfunction resolveCustomComponent(\n item: CustomComponentItemRef,\n ctx: LauncherResolutionContext,\n): ResolvedNavigationTarget {\n return {\n targetKind: LauncherItemTargetKind.CUSTOM_COMPONENT,\n id: `resolved-custom-${item.componentRef}`,\n ref: `custom:${item.componentRef}`,\n label: item.componentRef,\n urlPath: '',\n componentRef: item.componentRef,\n contextResourceIdentifiers:\n ctx.contextResourceIdentifiers && Object.keys(ctx.contextResourceIdentifiers).length > 0\n ? ctx.contextResourceIdentifiers\n : undefined,\n };\n}\n\n\n// ════════════════════════════════════════════════════════════════\n// Per-Launcher Resolution Functions\n// ════════════════════════════════════════════════════════════════\n\n/**\n * Resolve a sidebar item (with potential children) to a `ResolvedSidebarItem`.\n * Recursively resolves children.\n */\nfunction resolveSidebarItem(\n item: SidebarItem,\n ctx: LauncherResolutionContext,\n): ResolvedSidebarItem | null {\n const target = resolveItemRef(item, ctx);\n if (!target) return null;\n\n let children: ResolvedSidebarItem[] | undefined;\n if (item.children && item.children.length > 0) {\n children = item.children\n .map(child => resolveSidebarItem(child, ctx))\n .filter((resolved): resolved is ResolvedSidebarItem => resolved !== null);\n }\n\n return {\n ...target,\n displayPolicy: item.displayPolicy,\n notificationBadgeRef: item.notificationBadgeRef,\n children,\n };\n}\n\n/**\n * Resolve sidebar sections from per-launcher config.\n *\n * Dispatches on `contentKind`:\n * - `NAVIGATION_LIST`: resolves each `LauncherItemRef` in `children` via `resolveItemRef`\n * - `RESOURCE_BROWSER`: passes through (component-level rendering, no item resolution), unless the viewer's roles\n * cannot perform its bound operation (#2674): then the section is dropped, as a launcher row for it would be\n * - `GUIDANCE_WIDGET`: passes through\n * - `CUSTOM_COMPONENT`: passes through\n *\n * `visibleInModes` / `scopeCondition` filtering is NOT applied here —\n * that happens in `core/mode/section-visibility.ts`.\n */\nexport function resolveSidebarSections(\n sections: SidebarSection[],\n ctx: LauncherResolutionContext,\n): ResolvedSidebarSection[] {\n return sections.flatMap((section): ResolvedSidebarSection[] => {\n switch (section.contentKind) {\n case SidebarSectionContentKind.NAVIGATION_LIST:\n return [resolveNavigationListSection(section, ctx)];\n case SidebarSectionContentKind.RESOURCE_BROWSER:\n return viewerCanBrowse(section, ctx) ? [resolveResourceBrowserSection(section)] : [];\n case SidebarSectionContentKind.GUIDANCE_WIDGET:\n return [resolveGuidanceWidgetSection(section)];\n case SidebarSectionContentKind.CUSTOM_COMPONENT:\n return [resolveCustomComponentSection(section)];\n }\n });\n}\n\n/**\n * Whether the viewer may perform the operation a RESOURCE_BROWSER section fetches with (#2674). A browser the viewer\n * cannot list renders the backend's refusal as its content; dropping the section is what the launcher does for a row,\n * and it is judged by the same `viewerMayPerformOperation` (roles through the application's tables, and an\n * organization-unit grant, #2376, #2381). An operation that does not resolve keeps the section, so the browser can\n * report its own configuration problem; a context that does not filter by role (`viewerRoles: null`) keeps it too.\n */\nfunction viewerCanBrowse(section: SidebarSection_ResourceBrowser, ctx: LauncherResolutionContext): boolean {\n if (!ctx.viewerRoles) return true;\n const config = ctx.registry.resourceConfigurations[section.resourceType] as AnyFrontendResourceConfiguration | undefined;\n if (!config) return true;\n const operation = resolveSidebarResourceBrowserOperation(config, section.operation ?? CoreResourceOperation.LIST, section.operationVariant);\n return operation === undefined || viewerMayPerformOperation({ ...operation, resourceType: section.resourceType }, ctx.viewerRoles);\n}\n\nfunction resolveNavigationListSection(\n section: SidebarSection_NavigationList,\n ctx: LauncherResolutionContext,\n): ResolvedSidebarSection_NavigationList {\n const items = section.children\n .map(child => resolveSidebarItem(child, ctx))\n .filter((resolved): resolved is ResolvedSidebarItem => resolved !== null);\n\n return {\n contentKind: SidebarSectionContentKind.NAVIGATION_LIST,\n ref: section.ref,\n label: section.label,\n icon: section.icon,\n showLabel: section.showLabel,\n collapsible: section.collapsible,\n defaultCollapsed: section.defaultCollapsed,\n isPrimary: section.isPrimary,\n visibleInModes: section.visibleInModes,\n items,\n behavior: section.behavior,\n inlineCreate: section.inlineCreate,\n inlineCreateResourceType: section.inlineCreateResourceType,\n nested: section.nested,\n maxNestingDepth: section.maxNestingDepth,\n };\n}\n\nfunction resolveResourceBrowserSection(\n section: SidebarSection_ResourceBrowser,\n): ResolvedSidebarSection_ResourceBrowser {\n return {\n contentKind: SidebarSectionContentKind.RESOURCE_BROWSER,\n ref: section.ref,\n label: section.label,\n icon: section.icon,\n showLabel: section.showLabel,\n collapsible: section.collapsible,\n defaultCollapsed: section.defaultCollapsed,\n visibleInModes: section.visibleInModes,\n resourceType: section.resourceType,\n operation: section.operation,\n operationVariant: section.operationVariant,\n navigateOperation: section.navigateOperation,\n navigateOperationVariant: section.navigateOperationVariant,\n instanceFilter: section.instanceFilter,\n onInstanceClick: section.onInstanceClick,\n };\n}\n\nfunction resolveGuidanceWidgetSection(\n section: SidebarSection_GuidanceWidget,\n): ResolvedSidebarSection_GuidanceWidget {\n return {\n contentKind: SidebarSectionContentKind.GUIDANCE_WIDGET,\n ref: section.ref,\n label: section.label,\n icon: section.icon,\n showLabel: section.showLabel,\n collapsible: section.collapsible,\n defaultCollapsed: section.defaultCollapsed,\n visibleInModes: section.visibleInModes,\n guidanceRef: section.guidanceRef,\n };\n}\n\nfunction resolveCustomComponentSection(\n section: SidebarSection_CustomComponent,\n): ResolvedSidebarSection_CustomComponent {\n return {\n contentKind: SidebarSectionContentKind.CUSTOM_COMPONENT,\n ref: section.ref,\n label: section.label,\n icon: section.icon,\n showLabel: section.showLabel,\n collapsible: section.collapsible,\n defaultCollapsed: section.defaultCollapsed,\n visibleInModes: section.visibleInModes,\n componentRef: section.componentRef,\n };\n}\n\n/**\n * Resolve command menu commands from per-launcher config.\n * Groups by category if present.\n */\nexport function resolveCommandMenuCommands(\n commands: CommandMenuCommand[],\n ctx: LauncherResolutionContext,\n): ResolvedCommandMenuItem[] {\n const resolved: ResolvedCommandMenuItem[] = [];\n\n for (const cmd of commands) {\n const target = resolveItemRef(cmd, ctx);\n if (!target) continue;\n\n resolved.push({\n ...target,\n category: cmd.category,\n shortcut: cmd.shortcut,\n searchKeywords: cmd.searchKeywords,\n displayPolicy: cmd.displayPolicy,\n });\n }\n\n return resolved;\n}\n\n/**\n * Resolve hotkey bindings from per-launcher config.\n */\nexport function resolveHotkeyBindings(\n bindings: HotkeyBinding[],\n ctx: LauncherResolutionContext,\n): ResolvedHotkeyBinding[] {\n const resolved: ResolvedHotkeyBinding[] = [];\n\n for (const binding of bindings) {\n const target = resolveItemRef(binding, ctx);\n if (!target) continue;\n\n const description =\n binding.description ??\n (binding.kind === LauncherItemTargetKind.RESOURCE_OPERATION\n ? ctx.tResourceOperation(binding.resourceType, binding.operation, 'title')\n : target.label);\n\n resolved.push({\n ...target,\n shortcut: binding.shortcut,\n scope: binding.scope,\n description,\n });\n }\n\n return resolved;\n}\n\n/**\n * Resolve quick action items from per-launcher config.\n */\nexport function resolveQuickActions(\n actions: QuickActionItem[],\n ctx: LauncherResolutionContext,\n): ResolvedQuickActionItem[] {\n const resolved: ResolvedQuickActionItem[] = [];\n\n for (const action of actions) {\n const target = resolveItemRef(action, ctx);\n if (!target) continue;\n\n resolved.push({\n ...target,\n displayPolicy: action.displayPolicy,\n });\n }\n\n return resolved;\n}\n\n/**\n * Resolve control panel items from per-launcher config.\n */\nexport function resolveControlPanelItems(\n items: ControlPanelItem[],\n ctx: LauncherResolutionContext,\n): ResolvedControlPanelItem[] {\n const resolved: ResolvedControlPanelItem[] = [];\n\n for (const item of items) {\n const target = resolveItemRef(item, ctx);\n if (!target) continue;\n\n resolved.push({\n ...target,\n section: item.section,\n });\n }\n\n return resolved;\n}\n\n/**\n * Resolve toolbar tools from per-launcher config.\n */\nexport function resolveToolbarTools(\n tools: ToolbarItem[],\n ctx: LauncherResolutionContext,\n): ResolvedToolbarItem[] {\n const resolved: ResolvedToolbarItem[] = [];\n\n for (const tool of tools) {\n const target = resolveItemRef(tool, ctx);\n if (!target) continue;\n\n resolved.push({\n ...target,\n group: tool.group,\n iconOnly: tool.iconOnly,\n });\n }\n\n return resolved;\n}\n\n/**\n * Resolve menubar content — validates hosted components exist and resolves items.\n */\nexport function resolveMenubarContent(\n hostedComponents: MenubarHostedComponent[] | undefined,\n items: MenubarLauncherItem[] | undefined,\n ctx: LauncherResolutionContext,\n): ResolvedMenubarContent {\n const resolvedItems: ResolvedMenubarItem[] = [];\n\n if (items) {\n for (const item of items) {\n const target = resolveItemRef(item, ctx);\n if (!target) continue;\n\n resolvedItems.push({\n ...target,\n group: item.group,\n ...(item.notificationBadgeRef ? { notificationBadgeRef: item.notificationBadgeRef } : {}),\n });\n }\n }\n\n return {\n hostedComponents: hostedComponents ?? [],\n items: resolvedItems,\n };\n}\n"]}
@@ -119,4 +119,52 @@ export declare function restoredEntryIsPersistent(params: {
119
119
  viewport: ViewportBreakpoint;
120
120
  contentAreaWidth?: number;
121
121
  }): boolean;
122
+ /**
123
+ * Whether a CLICK from the zone below would keep nested content restored from the URL in PRIMARY, rather than in the
124
+ * pane its relationship depth points at (`paneZone`, SECONDARY or COMPANION) (#3764).
125
+ *
126
+ * ## The defect: one address, two layouts, for every nested destination a click keeps in PRIMARY
127
+ *
128
+ * A reload places a resource by its relationship DEPTH (`NavigationUtils.resolveResourceTargetZone`: depth 1 →
129
+ * SECONDARY, depth 2 → COMPANION) and the ancestor cascade fills the zones below it. That answers "where does a
130
+ * nested record sit beside its parent?" without asking whether the application ever opens it beside its parent.
131
+ * A click never reads depth: it asks the policy resolver, and the resolver keeps in PRIMARY everything nothing
132
+ * declares a SPLIT for. So the two disagreed for every nested destination a click keeps in PRIMARY.
133
+ *
134
+ * Measured on Wonder Todos (2026-11-14), after its layout gained a `secondary` zone (664b47759): choosing a list in
135
+ * the quick switcher promotes the todos listing to `/organizations/:org/todo-lists/:list/todos`, full width in
136
+ * PRIMARY. Reloading that same address split the page: the list's READ in PRIMARY and the listing in a pane beside
137
+ * it, with a back arrow on a page that had nothing to go back to. Wonder CRM declares the same intent in its own
138
+ * layout ("`primary.transitions.read` is still `PUSH`, so every other resource's drill-in is unchanged"), and
139
+ * every nested CRM record reloaded into the pane all the same.
140
+ *
141
+ * ## What this asks, and what it leaves alone
142
+ *
143
+ * The same question `restoredEntryIsPersistent` asks, through the same derivation: this content, opened from the
144
+ * zone below the pane, with that zone occupied and the pane free, through the relationship to its nearest parent.
145
+ * `true` only when the resolver places it in PRIMARY (a PUSH or REPLACE there, not a split the current width merely
146
+ * collapses, which `collapsedFromZone` reports and the caller collapses itself): the reload then restores into
147
+ * PRIMARY too, and the ancestor cascade has nothing to fill.
148
+ *
149
+ * Every other answer leaves the depth placement as it was, deliberately. A pane the click opens is the depth pane
150
+ * or a sibling of it (a READ pushed inside SECONDARY, where depth said COMPANION), and an overlay outcome (an
151
+ * addressable UPDATE route) has no structural zone a reload could open; neither is the defect, and the three-pane
152
+ * reconstruction (#2115) is pinned on them as they are.
153
+ *
154
+ * Only a depth ≥ 1 placement is asked. A flat (depth-0) detail has its own reconstruction of the same chain,
155
+ * `NavigationUtils.layoutSplitsOperationFromPrimary` (#203), and no parent the cascade could have placed.
156
+ *
157
+ * Rejected: deciding from the operation alone ("a LIST never goes to a pane"). A relationship may declare a SPLIT
158
+ * for a child collection, and an operation may override its zone's verb; only the resolver reads every tier the
159
+ * click reads, which is what keeps the two from drifting apart again.
160
+ */
161
+ export declare function clickKeepsRestoredContentInPrimary(params: {
162
+ content: NavigationContent;
163
+ /** The pane the content's relationship depth points at. PRIMARY is no pane, and answers `false`. */
164
+ paneZone: NavigationZoneName;
165
+ layout: NavigationLayout | undefined;
166
+ registry: FrontendResourcesRegistry;
167
+ viewport: ViewportBreakpoint;
168
+ contentAreaWidth?: number;
169
+ }): boolean;
122
170
  //# sourceMappingURL=navigation-controller-internals.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-controller-internals.d.ts","sourceRoot":"","sources":["../../../../src/core/navigation/navigation-controller-internals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAEL,kBAAkB,EAClB,gCAAgC,EAChC,KAAK,gBAAgB,EAEtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,OAAO,KAAK,EAAoC,yBAAyB,EAAE,MAAM,+DAA+D,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+ {"version":3,"file":"navigation-controller-internals.d.ts","sourceRoot":"","sources":["../../../../src/core/navigation/navigation-controller-internals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAEL,kBAAkB,EAClB,gCAAgC,EAChC,KAAK,gBAAgB,EAEtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,OAAO,KAAK,EAAoC,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAEjJ,OAAO,KAAK,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAK3F,eAAO,MAAM,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAoD,CAAC;AAGpI;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE;IAAE,uBAAuB,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,gCAAgC,CAAA;KAAE,CAAA;CAAE,GAAG,SAAS,GAClG,OAAO,CAIT;AAED,wBAAgB,gBAAgB,CAC9B,cAAc,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,EAC9C,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,OAAe,GACvB,IAAI,CAUN;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,2BAA2B,EAC3B,WAAW,GAAG,oBAAoB,GAAG,cAAc,GAAG,kBAAkB,GAAG,oBAAoB,GAC7F,8BAA8B,GAAG,8BAA8B,CAClE,CAAC;AAEF,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,iBAAiB,GAAG,yBAAyB,CAgBrG;AAQD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE;IAChD,OAAO,EAAE,iBAAiB,CAAC;IAC3B,yFAAyF;IACzF,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,oGAAoG;IACpG,UAAU,EAAE,kBAAkB,CAAC;IAC/B,MAAM,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACrC,QAAQ,EAAE,yBAAyB,CAAC;IACpC,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,GAAG,OAAO,CAGV;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,kCAAkC,CAAC,MAAM,EAAE;IACzD,OAAO,EAAE,iBAAiB,CAAC;IAC3B,oGAAoG;IACpG,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,MAAM,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACrC,QAAQ,EAAE,yBAAyB,CAAC;IACpC,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,GAAG,OAAO,CAIV"}
@@ -134,16 +134,70 @@ const ZONE_BELOW = {
134
134
  * cannot tell the two apart.
135
135
  */
136
136
  export function restoredEntryIsPersistent(params) {
137
+ const resolution = resolveRestoredContentFromZoneBelow(params);
138
+ return resolution?.persistent === true && resolution.targetZone === params.placedZone;
139
+ }
140
+ /**
141
+ * Whether a CLICK from the zone below would keep nested content restored from the URL in PRIMARY, rather than in the
142
+ * pane its relationship depth points at (`paneZone`, SECONDARY or COMPANION) (#3764).
143
+ *
144
+ * ## The defect: one address, two layouts, for every nested destination a click keeps in PRIMARY
145
+ *
146
+ * A reload places a resource by its relationship DEPTH (`NavigationUtils.resolveResourceTargetZone`: depth 1 →
147
+ * SECONDARY, depth 2 → COMPANION) and the ancestor cascade fills the zones below it. That answers "where does a
148
+ * nested record sit beside its parent?" without asking whether the application ever opens it beside its parent.
149
+ * A click never reads depth: it asks the policy resolver, and the resolver keeps in PRIMARY everything nothing
150
+ * declares a SPLIT for. So the two disagreed for every nested destination a click keeps in PRIMARY.
151
+ *
152
+ * Measured on Wonder Todos (2026-11-14), after its layout gained a `secondary` zone (664b47759): choosing a list in
153
+ * the quick switcher promotes the todos listing to `/organizations/:org/todo-lists/:list/todos`, full width in
154
+ * PRIMARY. Reloading that same address split the page: the list's READ in PRIMARY and the listing in a pane beside
155
+ * it, with a back arrow on a page that had nothing to go back to. Wonder CRM declares the same intent in its own
156
+ * layout ("`primary.transitions.read` is still `PUSH`, so every other resource's drill-in is unchanged"), and
157
+ * every nested CRM record reloaded into the pane all the same.
158
+ *
159
+ * ## What this asks, and what it leaves alone
160
+ *
161
+ * The same question `restoredEntryIsPersistent` asks, through the same derivation: this content, opened from the
162
+ * zone below the pane, with that zone occupied and the pane free, through the relationship to its nearest parent.
163
+ * `true` only when the resolver places it in PRIMARY (a PUSH or REPLACE there, not a split the current width merely
164
+ * collapses, which `collapsedFromZone` reports and the caller collapses itself): the reload then restores into
165
+ * PRIMARY too, and the ancestor cascade has nothing to fill.
166
+ *
167
+ * Every other answer leaves the depth placement as it was, deliberately. A pane the click opens is the depth pane
168
+ * or a sibling of it (a READ pushed inside SECONDARY, where depth said COMPANION), and an overlay outcome (an
169
+ * addressable UPDATE route) has no structural zone a reload could open; neither is the defect, and the three-pane
170
+ * reconstruction (#2115) is pinned on them as they are.
171
+ *
172
+ * Only a depth ≥ 1 placement is asked. A flat (depth-0) detail has its own reconstruction of the same chain,
173
+ * `NavigationUtils.layoutSplitsOperationFromPrimary` (#203), and no parent the cascade could have placed.
174
+ *
175
+ * Rejected: deciding from the operation alone ("a LIST never goes to a pane"). A relationship may declare a SPLIT
176
+ * for a child collection, and an operation may override its zone's verb; only the resolver reads every tier the
177
+ * click reads, which is what keeps the two from drifting apart again.
178
+ */
179
+ export function clickKeepsRestoredContentInPrimary(params) {
180
+ const resolution = resolveRestoredContentFromZoneBelow(params);
181
+ if (!resolution)
182
+ return false;
183
+ return (resolution.collapsedFromZone ?? resolution.targetZone) === NavigationZoneName.PRIMARY;
184
+ }
185
+ /**
186
+ * The resolver's answer for restored content opened from the zone below `paneZone` (the click that would have opened
187
+ * that pane), or `undefined` when `paneZone` has no zone below it (PRIMARY) or no layout is resolved yet. One
188
+ * derivation for both questions a reload asks of a pane: where the content goes, and whether it persists.
189
+ */
190
+ function resolveRestoredContentFromZoneBelow(params) {
137
191
  const clickSource = ZONE_BELOW[params.paneZone];
138
192
  if (!params.layout || !clickSource)
139
- return false;
193
+ return undefined;
140
194
  const relationshipTransition = NavigationUtils.isResourceOperationContent(params.content)
141
195
  ? resolveRelationshipTransitionFromNearestParent(params.content.resourceContext, params.registry, params.viewport)
142
196
  : undefined;
143
197
  const zoneOccupancy = { [NavigationZoneName.PRIMARY]: true };
144
198
  if (clickSource === NavigationZoneName.SECONDARY)
145
199
  zoneOccupancy[NavigationZoneName.SECONDARY] = true;
146
- const resolution = navigationPolicyResolver.resolve({
200
+ return navigationPolicyResolver.resolve({
147
201
  ...deriveOperationResolutionInputs(params.content),
148
202
  relationshipTransition,
149
203
  sourceZone: clickSource,
@@ -153,7 +207,6 @@ export function restoredEntryIsPersistent(params) {
153
207
  zoneOccupancy,
154
208
  zoneDepth: {},
155
209
  }, params.layout);
156
- return resolution.persistent === true && resolution.targetZone === params.placedZone;
157
210
  }
158
211
  /**
159
212
  * The transition the relationship between a restored record and its NEAREST parent declares