Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Split settings panel registry loaders
rcourtman79fa2f689172
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 7b76222068..1f8403a64e 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -85,8 +85,9 @@ work extends shared components instead of creating new local variants.63. `frontend-modern/src/components/Settings/useDiscoverySettingsState.ts`64. `frontend-modern/src/components/Settings/useSettingsInfrastructurePanelProps.ts`65. `frontend-modern/src/components/Settings/settingsPanelRegistryContext.tsx`-66. `frontend-modern/src/components/Settings/useSettingsPanelRegistry.tsx`-67. `frontend-modern/src/components/Settings/useSettingsSystemPanels.tsx`+66. `frontend-modern/src/components/Settings/settingsPanelRegistryLoaders.ts`+67. `frontend-modern/src/components/Settings/useSettingsPanelRegistry.tsx`+68. `frontend-modern/src/components/Settings/useSettingsSystemPanels.tsx`## Shared Boundaries@@ -283,11 +284,13 @@ read-model shaping for the shell,system panel prop assembly for general, network, updates, and recovery, and`frontend-modern/src/components/Settings/settingsPanelRegistryContext.tsx` ownsregistry context assembly for dispatchable settings tabs while+`frontend-modern/src/components/Settings/settingsPanelRegistryLoaders.ts` owns+the lazy settings panel loader table and route-to-panel import boundary, and`frontend-modern/src/components/Settings/useSettingsPanelRegistry.tsx` owns thefinal memoized registry composition only. `frontend-modern/src/components/Settings/Settings.tsx`must stay a shell that wires those owners together instead of re-accumulatinginfrastructure workspace props, registry context maps, system panel prop maps,-or discovery draft state inline.+lazy loader definitions, or discovery draft state inline.The resource incident panel's collapsed activity summary is now part of thatsame shared primitive boundary. Event-type count chips, visible-event copy,diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.jsonindex 66a17abcf9..4322881dce 100644--- a/docs/release-control/v6/internal/subsystems/registry.json+++ b/docs/release-control/v6/internal/subsystems/registry.json@@ -1867,6 +1867,7 @@"frontend-modern/src/components/Settings/SettingsPageShell.tsx","frontend-modern/src/components/Settings/settingsPanelRegistry.ts","frontend-modern/src/components/Settings/settingsPanelRegistryContext.tsx",+ "frontend-modern/src/components/Settings/settingsPanelRegistryLoaders.ts","frontend-modern/src/components/Settings/ssoProvidersModel.ts","frontend-modern/src/components/Settings/SSOProvidersPanel.tsx","frontend-modern/src/components/Settings/SystemLogsPanel.tsx",@@ -1953,6 +1954,7 @@"frontend-modern/src/components/Settings/SettingsPageShell.tsx","frontend-modern/src/components/Settings/settingsPanelRegistry.ts","frontend-modern/src/components/Settings/settingsPanelRegistryContext.tsx",+ "frontend-modern/src/components/Settings/settingsPanelRegistryLoaders.ts","frontend-modern/src/components/Settings/ssoProvidersModel.ts","frontend-modern/src/components/Settings/SSOProvidersPanel.tsx","frontend-modern/src/components/Settings/UpdateInstallGuide.tsx",diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.tsindex 9e12091348..ec90633656 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts@@ -30,6 +30,7 @@ import infrastructureDiscoveryRuntimeStateSource from '../useInfrastructureDiscoimport settingsInfrastructurePanelPropsSource from '../useSettingsInfrastructurePanelProps.ts?raw';import nodeModalStateSource from '../useNodeModalState.ts?raw';import settingsPanelRegistryContextSource from '../settingsPanelRegistryContext.tsx?raw';+import settingsPanelRegistryLoadersSource from '../settingsPanelRegistryLoaders.ts?raw';import settingsPanelRegistryHookSource from '../useSettingsPanelRegistry.tsx?raw';import settingsSystemPanelsSource from '../useSettingsSystemPanels.tsx?raw';import apiAccessPanelSource from '../APIAccessPanel.tsx?raw';@@ -140,6 +141,7 @@ const extractedModules = ['../useInfrastructureDiscoveryRuntimeState.ts','../useSettingsInfrastructurePanelProps.ts','../settingsPanelRegistryContext.tsx',+ '../settingsPanelRegistryLoaders.ts','../apiTokenManagerModel.ts','../useAPITokenManagerState.ts','../useAuditLogPanelState.ts',@@ -377,12 +379,16 @@ describe('Settings architecture guardrails', () => {const shellHookSource = (await import('../useSettingsShellState.ts?raw')).default;expect(registrySource).toContain('createSettingsPanelRegistry');- expect(registrySource).toContain('InfrastructureWorkspace');+ expect(registrySource).toContain('SETTINGS_PANEL_REGISTRY_LOADERS');expect(registrySource).toContain("'security-webhooks'");expect(accessHookSource).toContain('shouldHideSettingsNavItem');expect(accessHookSource).toContain('tabFeatureRequirements');expect(panelRegistryHookSource).toContain('createSettingsPanelRegistry');expect(panelRegistryHookSource).toContain('buildSettingsPanelRegistryContext');+ expect(settingsPanelRegistryLoadersSource).toContain(+ 'export const SETTINGS_PANEL_REGISTRY_LOADERS',+ );+ expect(settingsPanelRegistryLoadersSource).toContain("import('./InfrastructureWorkspace')");expect(shellHookSource).toContain('SETTINGS_HEADER_META');expect(settingsSource).toContain('useSettingsPanelRegistry');expect(settingsSource).toContain('useSettingsAccess');@@ -678,11 +684,13 @@ describe('Settings architecture guardrails', () => {it('uses lazy() imports for panel components in settingsPanelRegistry', async () => {const source = (await import('../settingsPanelRegistry.ts?raw')).default;+ const loadersSource = (await import('../settingsPanelRegistryLoaders.ts?raw')).default;- expect(source).toContain('lazy(');+ expect(source).toContain('SETTINGS_PANEL_REGISTRY_LOADERS');+ expect(loadersSource).toContain('lazy(');const staticImports = Array.from(- source.matchAll(+ loadersSource.matchAll(/^import\s+(?!type\b)(?!{[^}]*}\s+from\s+'solid-js').*from\s+'\.\/\w+Panel'/gm,),);diff --git a/frontend-modern/src/components/Settings/settingsPanelRegistry.ts b/frontend-modern/src/components/Settings/settingsPanelRegistry.tsindex f2a7201a34..0784681d2c 100644--- a/frontend-modern/src/components/Settings/settingsPanelRegistry.ts+++ b/frontend-modern/src/components/Settings/settingsPanelRegistry.ts@@ -1,4 +1,3 @@-import { lazy } from 'solid-js';import type { Component } from 'solid-js';import type { NetworkSettingsPanel as NetworkSettingsPanelType } from './NetworkSettingsPanel';import type { UpdatesSettingsPanel as UpdatesSettingsPanelType } from './UpdatesSettingsPanel';@@ -14,42 +13,7 @@ import type { RelaySettingsPanel as RelaySettingsPanelType } from './RelaySettinimport type { AuditWebhookPanel as AuditWebhookPanelType } from './AuditWebhookPanel';import type { InfrastructureWorkspace as InfrastructureWorkspaceType } from './InfrastructureWorkspace';import type { SettingsTab } from './settingsTypes';--const NetworkSettingsPanel = lazy(() =>- import('./NetworkSettingsPanel').then((m) => ({ default: m.NetworkSettingsPanel })),-);-const UpdatesSettingsPanel = lazy(() =>- import('./UpdatesSettingsPanel').then((m) => ({ default: m.UpdatesSettingsPanel })),-);-const RecoverySettingsPanel = lazy(() =>- import('./RecoverySettingsPanel').then((m) => ({ default: m.RecoverySettingsPanel })),-);-const RelaySettingsPanel = lazy(() =>- import('./RelaySettingsPanel').then((m) => ({ default: m.RelaySettingsPanel })),-);-const OrganizationOverviewPanel = lazy(() => import('./OrganizationOverviewPanel'));-const OrganizationAccessPanel = lazy(() => import('./OrganizationAccessPanel'));-const OrganizationSharingPanel = lazy(() => import('./OrganizationSharingPanel'));-const OrganizationBillingPanel = lazy(() => import('./OrganizationBillingPanel'));-const BillingAdminPanel = lazy(() => import('./BillingAdminPanel'));-const APIAccessPanel = lazy(() =>- import('./APIAccessPanel').then((m) => ({ default: m.APIAccessPanel })),-);-const SecurityOverviewPanel = lazy(() =>- import('./SecurityOverviewPanel').then((m) => ({ default: m.SecurityOverviewPanel })),-);-const SecurityAuthPanel = lazy(() =>- import('./SecurityAuthPanel').then((m) => ({ default: m.SecurityAuthPanel })),-);-const RolesPanel = lazy(() => import('./RolesPanel'));-const UserAssignmentsPanel = lazy(() => import('./UserAssignmentsPanel'));-const AuditLogPanel = lazy(() => import('./AuditLogPanel'));-const AuditWebhookPanel = lazy(() =>- import('./AuditWebhookPanel').then((m) => ({ default: m.AuditWebhookPanel })),-);-const InfrastructureWorkspace = lazy(() =>- import('./InfrastructureWorkspace').then((m) => ({ default: m.InfrastructureWorkspace })),-);+import { SETTINGS_PANEL_REGISTRY_LOADERS } from './settingsPanelRegistryLoaders';export interface SettingsPanelRegistryEntry {component: Component<any>;@@ -84,79 +48,79 @@ export const createSettingsPanelRegistry = (context: SettingsPanelRegistryContext,): SettingsPanelRegistry => ({'infrastructure-operations': {- component: InfrastructureWorkspace,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.InfrastructureWorkspace,getProps: context.getInfrastructurePanelProps,},'system-general': {component: context.systemGeneralPanel,},'system-network': {- component: NetworkSettingsPanel,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.NetworkSettingsPanel,getProps: context.getNetworkPanelProps,},'system-updates': {- component: UpdatesSettingsPanel,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.UpdatesSettingsPanel,getProps: context.getUpdatesPanelProps,},'system-recovery': {- component: RecoverySettingsPanel,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.RecoverySettingsPanel,getProps: context.getRecoveryPanelProps,},'system-ai': {component: context.systemAiPanel,},'system-relay': {- component: RelaySettingsPanel,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.RelaySettingsPanel,getProps: context.getRelayPanelProps,},'system-billing': {component: context.systemBillingPanel,},'organization-overview': {- component: OrganizationOverviewPanel,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.OrganizationOverviewPanel,getProps: context.getOrganizationOverviewPanelProps,},'organization-access': {- component: OrganizationAccessPanel,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.OrganizationAccessPanel,getProps: context.getOrganizationAccessPanelProps,},'organization-sharing': {- component: OrganizationSharingPanel,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.OrganizationSharingPanel,getProps: context.getOrganizationSharingPanelProps,},'organization-billing': {- component: OrganizationBillingPanel,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.OrganizationBillingPanel,getProps: context.getOrganizationBillingPanelProps,},'organization-billing-admin': {- component: BillingAdminPanel,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.BillingAdminPanel,},api: {- component: APIAccessPanel,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.APIAccessPanel,getProps: context.getApiAccessPanelProps,},'security-overview': {- component: SecurityOverviewPanel,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.SecurityOverviewPanel,getProps: context.getSecurityOverviewPanelProps,},'security-auth': {- component: SecurityAuthPanel,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.SecurityAuthPanel,getProps: context.getSecurityAuthPanelProps,},'security-sso': {component: context.securitySsoPanel,},'security-roles': {- component: RolesPanel,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.RolesPanel,},'security-users': {- component: UserAssignmentsPanel,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.UserAssignmentsPanel,},'security-audit': {- component: AuditLogPanel,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.AuditLogPanel,},'security-webhooks': {- component: AuditWebhookPanel,+ component: SETTINGS_PANEL_REGISTRY_LOADERS.AuditWebhookPanel,getProps: context.getAuditWebhookPanelProps,},});diff --git a/frontend-modern/src/components/Settings/settingsPanelRegistryLoaders.ts b/frontend-modern/src/components/Settings/settingsPanelRegistryLoaders.tsnew file mode 100644index 0000000000..0cabff712f--- /dev/null+++ b/frontend-modern/src/components/Settings/settingsPanelRegistryLoaders.ts@@ -0,0 +1,39 @@+import { lazy } from 'solid-js';++export const SETTINGS_PANEL_REGISTRY_LOADERS = {+ APIAccessPanel: lazy(() =>+ import('./APIAccessPanel').then((m) => ({ default: m.APIAccessPanel })),+ ),+ AuditLogPanel: lazy(() => import('./AuditLogPanel')),+ AuditWebhookPanel: lazy(() =>+ import('./AuditWebhookPanel').then((m) => ({ default: m.AuditWebhookPanel })),+ ),+ BillingAdminPanel: lazy(() => import('./BillingAdminPanel')),+ InfrastructureWorkspace: lazy(() =>+ import('./InfrastructureWorkspace').then((m) => ({ default: m.InfrastructureWorkspace })),+ ),+ NetworkSettingsPanel: lazy(() =>+ import('./NetworkSettingsPanel').then((m) => ({ default: m.NetworkSettingsPanel })),+ ),+ OrganizationAccessPanel: lazy(() => import('./OrganizationAccessPanel')),+ OrganizationBillingPanel: lazy(() => import('./OrganizationBillingPanel')),+ OrganizationOverviewPanel: lazy(() => import('./OrganizationOverviewPanel')),+ OrganizationSharingPanel: lazy(() => import('./OrganizationSharingPanel')),+ RecoverySettingsPanel: lazy(() =>+ import('./RecoverySettingsPanel').then((m) => ({ default: m.RecoverySettingsPanel })),+ ),+ RelaySettingsPanel: lazy(() =>+ import('./RelaySettingsPanel').then((m) => ({ default: m.RelaySettingsPanel })),+ ),+ RolesPanel: lazy(() => import('./RolesPanel')),+ SecurityAuthPanel: lazy(() =>+ import('./SecurityAuthPanel').then((m) => ({ default: m.SecurityAuthPanel })),+ ),+ SecurityOverviewPanel: lazy(() =>+ import('./SecurityOverviewPanel').then((m) => ({ default: m.SecurityOverviewPanel })),+ ),+ UpdatesSettingsPanel: lazy(() =>+ import('./UpdatesSettingsPanel').then((m) => ({ default: m.UpdatesSettingsPanel })),+ ),+ UserAssignmentsPanel: lazy(() => import('./UserAssignmentsPanel')),+} as const;diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.tsindex 9b429a04bd..fb75b72e57 100644--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts@@ -30,6 +30,7 @@ import diagnosticsStateSource from '@/components/Settings/useDiagnosticsPanelStaimport settingsShellSource from '@/components/Settings/Settings.tsx?raw';import settingsPanelRegistrySource from '@/components/Settings/useSettingsPanelRegistry.tsx?raw';import settingsPanelRegistryContextSource from '@/components/Settings/settingsPanelRegistryContext.tsx?raw';+import settingsPanelRegistryLoadersSource from '@/components/Settings/settingsPanelRegistryLoaders.ts?raw';import settingsSystemPanelsSource from '@/components/Settings/useSettingsSystemPanels.tsx?raw';import settingsInfrastructurePanelPropsSource from '@/components/Settings/useSettingsInfrastructurePanelProps.ts?raw';import discoverySettingsStateSource from '@/components/Settings/useDiscoverySettingsState.ts?raw';@@ -862,6 +863,10 @@ describe('frontend resource type boundaries', () => {expect(settingsPanelRegistrySource).toContain('buildSettingsPanelRegistryContext');expect(settingsShellSource).not.toContain('getInfrastructurePanelProps: () => ({');expect(settingsPanelRegistryContextSource).toContain('systemPanels: SettingsSystemPanels');+ expect(settingsPanelRegistryLoadersSource).toContain(+ 'export const SETTINGS_PANEL_REGISTRY_LOADERS',+ );+ expect(settingsPanelRegistryLoadersSource).toContain("import('./InfrastructureWorkspace')");expect(settingsPanelRegistryContextSource).toContain('getNetworkPanelProps: params.systemPanels.getNetworkPanelProps',);diff --git a/scripts/release_control/subsystem_lookup_test.py b/scripts/release_control/subsystem_lookup_test.pyindex 9e5f7ffdfc..956bab4973 100644--- a/scripts/release_control/subsystem_lookup_test.py+++ b/scripts/release_control/subsystem_lookup_test.py@@ -1911,6 +1911,7 @@ class SubsystemLookupTest(unittest.TestCase):"frontend-modern/src/components/Settings/SSOProvidersPanel.tsx","frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx","frontend-modern/src/components/Settings/settingsPanelRegistryContext.tsx",+ "frontend-modern/src/components/Settings/settingsPanelRegistryLoaders.ts","frontend-modern/src/components/Settings/useDiscoverySettingsState.ts","frontend-modern/src/components/Settings/useSettingsInfrastructurePanelProps.ts","frontend-modern/src/components/Settings/useSettingsPanelRegistry.tsx",