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
Own settings registry plumbing and system panel props
rcourtman5a638644b1da
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 6df985bede..9412a1dbdf 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -77,6 +77,9 @@ work extends shared components instead of creating new local variants.55. `frontend-modern/src/components/Settings/NetworkDiscoverySection.tsx`56. `frontend-modern/src/components/Settings/NetworkBoundarySettingsSection.tsx`57. `frontend-modern/src/components/Settings/networkSettingsModel.ts`+58. `frontend-modern/src/components/Settings/useDiscoverySettingsState.ts`+59. `frontend-modern/src/components/Settings/useSettingsPanelRegistry.tsx`+60. `frontend-modern/src/components/Settings/useSettingsSystemPanels.tsx`## Shared Boundaries@@ -255,6 +258,16 @@ through `frontend-modern/src/utils/alertIncidentPresentation.ts` instead ofmaintaining page-local incident panel styling inside`frontend-modern/src/pages/Alerts.tsx`.+The settings shell now also has an explicit three-way ownership split.+`frontend-modern/src/components/Settings/useDiscoverySettingsState.ts` owns the+shared discovery draft and subnet-validation state,+`frontend-modern/src/components/Settings/useSettingsSystemPanels.tsx` owns+system panel prop assembly for general, network, updates, and recovery, and+`frontend-modern/src/components/Settings/useSettingsPanelRegistry.tsx` owns+registry composition only. `frontend-modern/src/components/Settings/Settings.tsx`+must stay a shell that wires those owners together instead of re-accumulating+system panel prop maps 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,and the summary-ordering helper in `frontend-modern/src/features/alerts/types.ts`diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.jsonindex b0aec49b78..f01b9bd2ff 100644--- a/docs/release-control/v6/internal/subsystems/registry.json+++ b/docs/release-control/v6/internal/subsystems/registry.json@@ -1770,7 +1770,10 @@"frontend-modern/src/components/Settings/useAuditLogPanelState.ts","frontend-modern/src/components/Settings/useAuditWebhookPanelState.ts","frontend-modern/src/components/Settings/useDiagnosticsPanelState.ts",+ "frontend-modern/src/components/Settings/useDiscoverySettingsState.ts","frontend-modern/src/components/Settings/useReportingPanelState.ts",+ "frontend-modern/src/components/Settings/useSettingsPanelRegistry.tsx",+ "frontend-modern/src/components/Settings/useSettingsSystemPanels.tsx","frontend-modern/src/components/Settings/useSSOProvidersState.ts","frontend-modern/src/components/Settings/useSystemLogsPanelState.ts","frontend-modern/src/components/SetupWizard/SetupCompletionPreview.tsx",@@ -1846,6 +1849,9 @@"frontend-modern/src/components/Settings/useAuditLogPanelState.ts","frontend-modern/src/components/Settings/useAuditWebhookPanelState.ts","frontend-modern/src/components/Settings/useDiagnosticsPanelState.ts",+ "frontend-modern/src/components/Settings/useDiscoverySettingsState.ts",+ "frontend-modern/src/components/Settings/useSettingsPanelRegistry.tsx",+ "frontend-modern/src/components/Settings/useSettingsSystemPanels.tsx","frontend-modern/src/components/Settings/useSSOProvidersState.ts"],"allow_same_subsystem_tests": false,diff --git a/docs/release-control/v6/internal/subsystems/security-privacy.md b/docs/release-control/v6/internal/subsystems/security-privacy.mdindex fa99e72046..81ede14254 100644--- a/docs/release-control/v6/internal/subsystems/security-privacy.md+++ b/docs/release-control/v6/internal/subsystems/security-privacy.md@@ -80,6 +80,14 @@ Security-facing settings remain intentionally shared with `frontend-primitives`because shell framing and presentation consistency still belong there, but themeaning of those surfaces now lives here so auth posture, token controls, andprivacy toggles stop borrowing their governance only from adjacent lanes.+That shared settings boundary now also has an explicit split of responsibilities:+`frontend-modern/src/components/Settings/useSystemSettingsState.ts` remains the+canonical owner for telemetry, local-upgrade-metrics, and auth/privacy runtime+state, while `frontend-modern/src/components/Settings/GeneralSettingsPanel.tsx`+stays a presentation boundary and `frontend-modern/src/components/Settings/useSettingsSystemPanels.tsx`+may only assemble props for the shared settings shell. Privacy or telemetry+behavior must not drift into `frontend-modern/src/components/Settings/Settings.tsx`+or the registry hook just because the shell wiring changed.The security transport surfaces remain intentionally shared with`api-contracts`: token, auth, and telemetry settings payloads are still APIdiff --git a/frontend-modern/src/components/Settings/GeneralSettingsPanel.tsx b/frontend-modern/src/components/Settings/GeneralSettingsPanel.tsxindex 5f6ee9b059..b52a765757 100644--- a/frontend-modern/src/components/Settings/GeneralSettingsPanel.tsx+++ b/frontend-modern/src/components/Settings/GeneralSettingsPanel.tsx@@ -39,7 +39,7 @@ const PVE_POLLING_OPTIONS: FilterOption<number | 'custom'>[] = [{ value: 'custom', label: 'Custom' },];-interface GeneralSettingsPanelProps {+export interface GeneralSettingsPanelProps {darkMode: Accessor<boolean>;themePreference: Accessor<'light' | 'dark' | 'system'>;setThemePreference: (pref: 'light' | 'dark' | 'system') => void;diff --git a/frontend-modern/src/components/Settings/Settings.tsx b/frontend-modern/src/components/Settings/Settings.tsxindex 020e2b1c2d..f06b5187f3 100644--- a/frontend-modern/src/components/Settings/Settings.tsx+++ b/frontend-modern/src/components/Settings/Settings.tsx@@ -12,6 +12,7 @@ import { useInfrastructureSettingsState } from './useInfrastructureSettingsStateimport { useSettingsAccess } from './useSettingsAccess';import { useSettingsPanelRegistry } from './useSettingsPanelRegistry';import { useSettingsShellState } from './useSettingsShellState';+import { useSettingsSystemPanels } from './useSettingsSystemPanels';import { useSystemSettingsState } from './useSystemSettingsState';import { useSettingsNavigation } from './useSettingsNavigation';import { getSettingsLoadingState } from '@/utils/settingsShellPresentation';@@ -61,28 +62,7 @@ const Settings: Component<SettingsProps> = (props) => {() => getLimit('max_monitored_systems')?.current ?? 0,);const organizationGuestUsage = createMemo(() => getLimit('max_guests')?.current ?? 0);- const {- discoveryEnabled,- setDiscoveryEnabled,- discoverySubnet,- discoveryMode,- setDiscoveryMode,- discoverySubnetDraft,- setDiscoverySubnetDraft,- lastCustomSubnet,- setLastCustomSubnet,- discoverySubnetError,- setDiscoverySubnetError,- savingDiscoverySettings,- setSavingDiscoverySettings,- parseSubnetList,- normalizeSubnetList,- currentDraftSubnetValue,- isValidCIDR,- applySavedDiscoverySubnet,- assignDiscoverySubnetInputRef,- getDiscoverySubnetInputRef,- } = useDiscoverySettingsState();+ const discoverySettings = useDiscoverySettingsState();// Securityconst [showQuickSecuritySetup, setShowQuickSecuritySetup] = createSignal(false);@@ -93,253 +73,57 @@ const Settings: Component<SettingsProps> = (props) => {setActiveTab,searchQuery,});- const {- exportPassphrase,- setExportPassphrase,- useCustomPassphrase,- setUseCustomPassphrase,- importPassphrase,- setImportPassphrase,- importFile,- setImportFile,- showExportDialog,- setShowExportDialog,- showImportDialog,- setShowImportDialog,- showApiTokenModal,- apiTokenInput,- setApiTokenInput,- handleExport,- handleImport,- closeExportDialog,- closeImportDialog,- closeApiTokenModal,- handleApiTokenAuthenticate,- } = useBackupTransferFlow({ securityStatus });- const {- hasUnsavedChanges,- setHasUnsavedChanges,- pvePollingInterval,- setPVEPollingInterval,- pvePollingSelection,- setPVEPollingSelection,- pvePollingCustomSeconds,- setPVEPollingCustomSeconds,- pvePollingEnvLocked,- allowedOrigins,- setAllowedOrigins,- allowEmbedding,- setAllowEmbedding,- allowedEmbedOrigins,- setAllowedEmbedOrigins,- webhookAllowedPrivateCIDRs,- setWebhookAllowedPrivateCIDRs,- publicURL,- setPublicURL,- envOverrides,- temperatureMonitoringEnabled,- temperatureMonitoringLocked,- savingTemperatureSetting,- setSavingTemperatureSetting,- handleTemperatureMonitoringChange,- hideLocalLogin,- hideLocalLoginLocked,- savingHideLocalLogin,- handleHideLocalLoginChange,- disableDockerUpdateActions,- disableDockerUpdateActionsLocked,- savingDockerUpdateActions,- handleDisableDockerUpdateActionsChange,- disableLocalUpgradeMetrics,- disableLocalUpgradeMetricsLocked,- savingUpgradeMetrics,- handleDisableLocalUpgradeMetricsChange,- telemetryEnabled,- telemetryEnabledLocked,- savingTelemetry,- handleTelemetryEnabledChange,- versionInfo,- updateInfo,- checkingForUpdates,- updateChannel,- setUpdateChannel,- autoUpdateEnabled,- setAutoUpdateEnabled,- autoUpdateCheckInterval,- setAutoUpdateCheckInterval,- autoUpdateTime,- setAutoUpdateTime,- updatePlan,- isInstallingUpdate,- showUpdateConfirmation,- setShowUpdateConfirmation,- backupPollingEnabled,- setBackupPollingEnabled,- backupPollingInterval,- setBackupPollingInterval,- backupPollingCustomMinutes,- setBackupPollingCustomMinutes,- backupPollingUseCustom,- setBackupPollingUseCustom,- backupPollingEnvLocked,- backupIntervalSelectValue,- backupIntervalSummary,- initializeSystemSettingsState,- saveSettings,- checkForUpdates,- handleInstallUpdate,- handleConfirmUpdate,- } = useSystemSettingsState({+ const backupTransferFlow = useBackupTransferFlow({ securityStatus });+ const systemSettings = useSystemSettingsState({activeTab,loadSecurityStatus,- setDiscoveryEnabled,- applySavedDiscoverySubnet,+ setDiscoveryEnabled: discoverySettings.setDiscoveryEnabled,+ applySavedDiscoverySubnet: discoverySettings.applySavedDiscoverySubnet,});- const {- discoveredNodes,- setShowNodeModal,- editingNode,- setEditingNode,- setCurrentNodeType,- modalResetKey,- setModalResetKey,- initialLoadComplete,- discoveryScanStatus,- showDeleteNodeModal,- deleteNodeLoading,- pveNodes,- pbsNodes,- pmgNodes,- isNodeModalVisible,- resolveTemperatureMonitoringEnabled,- loadDiscoveredNodes,- triggerDiscoveryScan,- handleDiscoveryEnabledChange,- commitDiscoverySubnet,- handleDiscoveryModeChange,- handleNodeTemperatureMonitoringChange,- requestDeleteNode,- cancelDeleteNode,- deleteNode,- testNodeConnection,- refreshClusterNodes,- nodePendingDeleteLabel,- nodePendingDeleteHost,- nodePendingDeleteType,- nodePendingDeleteTypeLabel,- saveNode,- } = useInfrastructureSettingsState({+ const infrastructureSettings = useInfrastructureSettingsState({eventBus,currentTab,- discoveryEnabled,- setDiscoveryEnabled,- discoverySubnet,- discoveryMode,- setDiscoveryMode,- discoverySubnetDraft,- setDiscoverySubnetDraft,- lastCustomSubnet,- setLastCustomSubnet,- setDiscoverySubnetError,- savingDiscoverySettings,- setSavingDiscoverySettings,- envOverrides,- normalizeSubnetList,- isValidCIDR,- applySavedDiscoverySubnet,- getDiscoverySubnetInputRef,- temperatureMonitoringEnabled,- savingTemperatureSetting,- setSavingTemperatureSetting,+ discoveryEnabled: discoverySettings.discoveryEnabled,+ setDiscoveryEnabled: discoverySettings.setDiscoveryEnabled,+ discoverySubnet: discoverySettings.discoverySubnet,+ discoveryMode: discoverySettings.discoveryMode,+ setDiscoveryMode: discoverySettings.setDiscoveryMode,+ discoverySubnetDraft: discoverySettings.discoverySubnetDraft,+ setDiscoverySubnetDraft: discoverySettings.setDiscoverySubnetDraft,+ lastCustomSubnet: discoverySettings.lastCustomSubnet,+ setLastCustomSubnet: discoverySettings.setLastCustomSubnet,+ setDiscoverySubnetError: discoverySettings.setDiscoverySubnetError,+ savingDiscoverySettings: discoverySettings.savingDiscoverySettings,+ setSavingDiscoverySettings: discoverySettings.setSavingDiscoverySettings,+ envOverrides: systemSettings.envOverrides,+ normalizeSubnetList: discoverySettings.normalizeSubnetList,+ isValidCIDR: discoverySettings.isValidCIDR,+ applySavedDiscoverySubnet: discoverySettings.applySavedDiscoverySubnet,+ getDiscoverySubnetInputRef: discoverySettings.getDiscoverySubnetInputRef,+ temperatureMonitoringEnabled: systemSettings.temperatureMonitoringEnabled,+ savingTemperatureSetting: systemSettings.savingTemperatureSetting,+ setSavingTemperatureSetting: systemSettings.setSavingTemperatureSetting,loadSecurityStatus,- initializeSystemSettingsState,+ initializeSystemSettingsState: systemSettings.initializeSystemSettingsState,});-- const activeTabSaveBehavior = createMemo(() => getSettingsTabSaveBehavior(activeTab()));- const settingsPanelRegistry = useSettingsPanelRegistry({+ const systemPanels = useSettingsSystemPanels({darkMode: props.darkMode,themePreference: props.themePreference,setThemePreference: props.setThemePreference,- initialLoadComplete,- pvePollingInterval,- setPVEPollingInterval,- pvePollingSelection,- setPVEPollingSelection,- pvePollingCustomSeconds,- setPVEPollingCustomSeconds,- pvePollingEnvLocked,- setHasUnsavedChanges,- disableLocalUpgradeMetrics,- disableLocalUpgradeMetricsLocked,- savingUpgradeMetrics,- handleDisableLocalUpgradeMetricsChange,- telemetryEnabled,- telemetryEnabledLocked,- savingTelemetry,- handleTelemetryEnabledChange,- disableDockerUpdateActions,- disableDockerUpdateActionsLocked,- savingDockerUpdateActions,- handleDisableDockerUpdateActionsChange,- discoveryEnabled,- discoveryMode,- discoverySubnetDraft,- discoverySubnetError,- savingDiscoverySettings,- envOverrides,- allowedOrigins,- setAllowedOrigins,- allowEmbedding,- setAllowEmbedding,- allowedEmbedOrigins,- setAllowedEmbedOrigins,- webhookAllowedPrivateCIDRs,- setWebhookAllowedPrivateCIDRs,- publicURL,- setPublicURL,- handleDiscoveryEnabledChange,- handleDiscoveryModeChange,- setDiscoveryMode,- setDiscoverySubnetDraft,- setDiscoverySubnetError,- setLastCustomSubnet,- commitDiscoverySubnet,- parseSubnetList,- normalizeSubnetList,- isValidCIDR,- currentDraftSubnetValue,- assignDiscoverySubnetInputRef,- versionInfo,- updateInfo,- checkingForUpdates,- updateChannel,- setUpdateChannel,- autoUpdateEnabled,- setAutoUpdateEnabled,- autoUpdateCheckInterval,- setAutoUpdateCheckInterval,- autoUpdateTime,- setAutoUpdateTime,- checkForUpdates,- updatePlan,- handleInstallUpdate,- isInstallingUpdate,- backupPollingEnabled,- setBackupPollingEnabled,- backupPollingInterval,- setBackupPollingInterval,- backupPollingCustomMinutes,- setBackupPollingCustomMinutes,- backupPollingUseCustom,- setBackupPollingUseCustom,- backupPollingEnvLocked,- backupIntervalSelectValue,- backupIntervalSummary,- showExportDialog,- setShowExportDialog,- showImportDialog,- setShowImportDialog,- setUseCustomPassphrase,+ initialLoadComplete: infrastructureSettings.initialLoadComplete,+ systemSettings,+ discoverySettings: {+ ...discoverySettings,+ handleDiscoveryEnabledChange: infrastructureSettings.handleDiscoveryEnabledChange,+ handleDiscoveryModeChange: infrastructureSettings.handleDiscoveryModeChange,+ commitDiscoverySubnet: infrastructureSettings.commitDiscoverySubnet,+ },+ backupTransferFlow,+ securityStatus,+ });++ const activeTabSaveBehavior = createMemo(() => getSettingsTabSaveBehavior(activeTab()));+ const settingsPanelRegistry = useSettingsPanelRegistry({securityStatus,securityStatusLoading,organizationMonitoredSystemUsage,@@ -351,56 +135,65 @@ const Settings: Component<SettingsProps> = (props) => {setShowQuickSecurityWizard,showPasswordModal,setShowPasswordModal,- hideLocalLogin,- hideLocalLoginLocked,- savingHideLocalLogin,- handleHideLocalLoginChange,+ hideLocalLogin: systemSettings.hideLocalLogin,+ hideLocalLoginLocked: systemSettings.hideLocalLoginLocked,+ savingHideLocalLogin: systemSettings.savingHideLocalLogin,+ handleHideLocalLoginChange: systemSettings.handleHideLocalLoginChange,+ versionInfo: systemSettings.versionInfo,+ systemPanels,getInfrastructurePanelProps: () => ({selectedAgent,onSelectAgent: handleSelectAgent,- initialLoadComplete,- discoveryEnabled,- discoveryMode,- discoveryScanStatus,- discoveredNodes,- savingDiscoverySettings,- envOverrides,+ initialLoadComplete: infrastructureSettings.initialLoadComplete,+ discoveryEnabled: discoverySettings.discoveryEnabled,+ discoveryMode: discoverySettings.discoveryMode,+ discoveryScanStatus: infrastructureSettings.discoveryScanStatus,+ discoveredNodes: infrastructureSettings.discoveredNodes,+ savingDiscoverySettings: discoverySettings.savingDiscoverySettings,+ envOverrides: systemSettings.envOverrides,agentStateResources: () =>(state.resources ?? []).filter((resource) => resource.type === 'agent'),pbsInstances: pbsInstancesFromResources,pmgInstances: pmgInstancesFromResources,- pveNodes,- pbsNodes,- pmgNodes,- temperatureMonitoringEnabled,- triggerDiscoveryScan,- loadDiscoveredNodes,- handleDiscoveryEnabledChange,- testNodeConnection,- requestDeleteNode,- refreshClusterNodes,- setShowNodeModal,- editingNode,- setEditingNode,- setCurrentNodeType,- modalResetKey,- setModalResetKey,- isNodeModalVisible,+ pveNodes: infrastructureSettings.pveNodes,+ pbsNodes: infrastructureSettings.pbsNodes,+ pmgNodes: infrastructureSettings.pmgNodes,+ temperatureMonitoringEnabled: systemSettings.temperatureMonitoringEnabled,+ triggerDiscoveryScan: infrastructureSettings.triggerDiscoveryScan,+ loadDiscoveredNodes: infrastructureSettings.loadDiscoveredNodes,+ handleDiscoveryEnabledChange: infrastructureSettings.handleDiscoveryEnabledChange,+ testNodeConnection: infrastructureSettings.testNodeConnection,+ requestDeleteNode: infrastructureSettings.requestDeleteNode,+ refreshClusterNodes: infrastructureSettings.refreshClusterNodes,+ setShowNodeModal: infrastructureSettings.setShowNodeModal,+ editingNode: infrastructureSettings.editingNode,+ setEditingNode: infrastructureSettings.setEditingNode,+ setCurrentNodeType: infrastructureSettings.setCurrentNodeType,+ modalResetKey: infrastructureSettings.modalResetKey,+ setModalResetKey: infrastructureSettings.setModalResetKey,+ isNodeModalVisible: infrastructureSettings.isNodeModalVisible,securityStatus,- resolveTemperatureMonitoringEnabled,- temperatureMonitoringLocked,- savingTemperatureSetting,- handleTemperatureMonitoringChange,- handleNodeTemperatureMonitoringChange,- saveNode,- showDeleteNodeModal,- cancelDeleteNode,- deleteNode,- deleteNodeLoading,- nodePendingDeleteLabel,- nodePendingDeleteHost,- nodePendingDeleteType,- nodePendingDeleteTypeLabel,+ resolveTemperatureMonitoringEnabled:+ infrastructureSettings.resolveTemperatureMonitoringEnabled,+ temperatureMonitoringLocked: systemSettings.temperatureMonitoringLocked,+ savingTemperatureSetting: systemSettings.savingTemperatureSetting,+ handleTemperatureMonitoringChange: systemSettings.handleTemperatureMonitoringChange,+ handleNodeTemperatureMonitoringChange:+ infrastructureSettings.handleNodeTemperatureMonitoringChange,+ saveNode: infrastructureSettings.saveNode,+ showDeleteNodeModal: infrastructureSettings.showDeleteNodeModal,+ cancelDeleteNode: infrastructureSettings.cancelDeleteNode,+ deleteNode: infrastructureSettings.deleteNode,+ deleteNodeLoading: infrastructureSettings.deleteNodeLoading,+ nodePendingDeleteLabel: infrastructureSettings.nodePendingDeleteLabel,+ nodePendingDeleteHost: infrastructureSettings.nodePendingDeleteHost,+ nodePendingDeleteType: infrastructureSettings.nodePendingDeleteType,+ nodePendingDeleteTypeLabel: infrastructureSettings.nodePendingDeleteTypeLabel,+ disableDockerUpdateActions: systemSettings.disableDockerUpdateActions,+ disableDockerUpdateActionsLocked: systemSettings.disableDockerUpdateActionsLocked,+ savingDockerUpdateActions: systemSettings.savingDockerUpdateActions,+ handleDisableDockerUpdateActionsChange:+ systemSettings.handleDisableDockerUpdateActionsChange,}),});const activeSettingsPanelEntry = createMemo(() => {@@ -416,9 +209,9 @@ const Settings: Component<SettingsProps> = (props) => {<><SettingsPageShellheaderMeta={headerMeta}- hasUnsavedChanges={hasUnsavedChanges}+ hasUnsavedChanges={systemSettings.hasUnsavedChanges}activeTabSaveBehavior={activeTabSaveBehavior}- saveSettings={saveSettings}+ saveSettings={systemSettings.saveSettings}discardChanges={() => window.location.reload()}isMobileMenuOpen={isMobileMenuOpen}setIsMobileMenuOpen={setIsMobileMenuOpen}@@ -448,33 +241,33 @@ const Settings: Component<SettingsProps> = (props) => {</SettingsPageShell><SettingsDialogs- showUpdateConfirmation={showUpdateConfirmation}- closeUpdateConfirmation={() => setShowUpdateConfirmation(false)}- handleConfirmUpdate={handleConfirmUpdate}- versionInfo={versionInfo}- updateInfo={updateInfo}- updatePlan={updatePlan}- isInstallingUpdate={isInstallingUpdate}+ showUpdateConfirmation={systemSettings.showUpdateConfirmation}+ closeUpdateConfirmation={() => systemSettings.setShowUpdateConfirmation(false)}+ handleConfirmUpdate={systemSettings.handleConfirmUpdate}+ versionInfo={systemSettings.versionInfo}+ updateInfo={systemSettings.updateInfo}+ updatePlan={systemSettings.updatePlan}+ isInstallingUpdate={systemSettings.isInstallingUpdate}securityStatus={securityStatus}- exportPassphrase={exportPassphrase}- setExportPassphrase={setExportPassphrase}- useCustomPassphrase={useCustomPassphrase}- setUseCustomPassphrase={setUseCustomPassphrase}- importPassphrase={importPassphrase}- setImportPassphrase={setImportPassphrase}- importFile={importFile}- setImportFile={setImportFile}- showExportDialog={showExportDialog}- showImportDialog={showImportDialog}- showApiTokenModal={showApiTokenModal}- apiTokenInput={apiTokenInput}- setApiTokenInput={setApiTokenInput}- handleExport={handleExport}- handleImport={handleImport}- closeExportDialog={closeExportDialog}- closeImportDialog={closeImportDialog}- closeApiTokenModal={closeApiTokenModal}- handleApiTokenAuthenticate={handleApiTokenAuthenticate}+ exportPassphrase={backupTransferFlow.exportPassphrase}+ setExportPassphrase={backupTransferFlow.setExportPassphrase}+ useCustomPassphrase={backupTransferFlow.useCustomPassphrase}+ setUseCustomPassphrase={backupTransferFlow.setUseCustomPassphrase}+ importPassphrase={backupTransferFlow.importPassphrase}+ setImportPassphrase={backupTransferFlow.setImportPassphrase}+ importFile={backupTransferFlow.importFile}+ setImportFile={backupTransferFlow.setImportFile}+ showExportDialog={backupTransferFlow.showExportDialog}+ showImportDialog={backupTransferFlow.showImportDialog}+ showApiTokenModal={backupTransferFlow.showApiTokenModal}+ apiTokenInput={backupTransferFlow.apiTokenInput}+ setApiTokenInput={backupTransferFlow.setApiTokenInput}+ handleExport={backupTransferFlow.handleExport}+ handleImport={backupTransferFlow.handleImport}+ closeExportDialog={backupTransferFlow.closeExportDialog}+ closeImportDialog={backupTransferFlow.closeImportDialog}+ closeApiTokenModal={backupTransferFlow.closeApiTokenModal}+ handleApiTokenAuthenticate={backupTransferFlow.handleApiTokenAuthenticate}showPasswordModal={showPasswordModal}closePasswordModal={() => {setShowPasswordModal(false);diff --git a/frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx b/frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsxindex 8eabbc06b6..4d4273a321 100644--- a/frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx+++ b/frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx@@ -23,7 +23,7 @@ import {getUpdatePrimaryStatusLabel,} from '@/utils/updatesPresentation';-interface UpdatesSettingsPanelProps {+export interface UpdatesSettingsPanelProps {versionInfo: Accessor<VersionInfo | null>;updateInfo: Accessor<UpdateInfo | null>;checkingForUpdates: Accessor<boolean>;diff --git a/frontend-modern/src/components/Settings/__tests__/monitoredSystemModelGuardrails.test.ts b/frontend-modern/src/components/Settings/__tests__/monitoredSystemModelGuardrails.test.tsindex 42fc302b9c..69ae7d2c8e 100644--- a/frontend-modern/src/components/Settings/__tests__/monitoredSystemModelGuardrails.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/monitoredSystemModelGuardrails.test.ts@@ -24,6 +24,7 @@ import infrastructureSettingsStateSource from '../useInfrastructureSettingsStateimport infrastructureWorkspaceSource from '../InfrastructureWorkspace.tsx?raw';import infrastructureWorkspaceModelSource from '../infrastructureWorkspaceModel.ts?raw';import settingsPanelRegistrySource from '../useSettingsPanelRegistry.tsx?raw';+import settingsSystemPanelsSource from '../useSettingsSystemPanels.tsx?raw';import infrastructureSummarySource from '@/components/Infrastructure/InfrastructureSummary.tsx?raw';import infrastructureSelectorComponentSource from '@/components/shared/InfrastructureSelector.tsx?raw';import workloadsLinkSource from '@/components/Infrastructure/workloadsLink.ts?raw';@@ -1344,8 +1345,10 @@ describe('monitored-system model guardrails', () => {expect(settingsSource).not.toContain('<OIDCPanel');expect(settingsSource).toContain('getSettingsLoadingState');expect(settingsSource).not.toContain('Loading settings...');- expect(settingsPanelRegistrySource).toContain('getSettingsConfigurationLoadingState');- expect(settingsPanelRegistrySource).not.toContain('Loading configuration...');+ expect(settingsSystemPanelsSource).toContain('getSettingsConfigurationLoadingState');+ expect(settingsSystemPanelsSource).not.toContain('Loading configuration...');+ expect(settingsPanelRegistrySource).toContain('systemPanels: SettingsSystemPanels');+ expect(settingsPanelRegistrySource).not.toContain('getSettingsConfigurationLoadingState');expect(settingsShellPresentationSource).toContain('export function getSettingsLoadingState');expect(settingsShellPresentationSource).toContain('export function getSettingsConfigurationLoadingState',diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.tsindex 053f3dd513..0667bb6da7 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts@@ -17,6 +17,8 @@ import nodeModalModelSource from '../nodeModalModel.ts?raw';import nodeModalSource from '../NodeModal.tsx?raw';import infrastructureOperationsStateSource from '../useInfrastructureOperationsState.tsx?raw';import nodeModalStateSource from '../useNodeModalState.ts?raw';+import settingsPanelRegistryHookSource from '../useSettingsPanelRegistry.tsx?raw';+import settingsSystemPanelsSource from '../useSettingsSystemPanels.tsx?raw';import apiAccessPanelSource from '../APIAccessPanel.tsx?raw';import apiTokenManagerSource from '../APITokenManager.tsx?raw';import apiTokenManagerModelSource from '../apiTokenManagerModel.ts?raw';@@ -190,6 +192,7 @@ const extractedModules = ['../useSettingsShellState.ts','../useSettingsNavigation.ts','../useSettingsPanelRegistry.tsx',+ '../useSettingsSystemPanels.tsx','../useSystemSettingsState.ts','../useInfrastructureSettingsState.ts','../useBackupTransferFlow.ts',@@ -206,6 +209,7 @@ const requiredImportSources = ['./useSettingsAccess','./useSettingsPanelRegistry','./useSettingsShellState',+ './useSettingsSystemPanels','./useSystemSettingsState','./useSettingsNavigation',] as const;@@ -351,6 +355,39 @@ describe('Settings architecture guardrails', () => {expect(settingsSource).not.toContain("<Show when={activeTab() === 'security-webhooks'}>");});+ it('keeps settings shell panel assembly split between dedicated system and registry owners', () => {+ expect(settingsSource).toContain('useSettingsSystemPanels');+ expect(settingsSource).toContain('const systemPanels = useSettingsSystemPanels({');+ expect(settingsSource).toContain('const settingsPanelRegistry = useSettingsPanelRegistry({');+ expect(settingsSource).toContain('systemPanels,');+ expect(settingsSource).toContain('const discoverySettings = useDiscoverySettingsState()');+ expect(settingsSystemPanelsSource).toContain('GeneralSettingsPanel');+ expect(settingsSystemPanelsSource).toContain('getSettingsConfigurationLoadingState');+ expect(settingsSystemPanelsSource).toContain('getNetworkPanelProps');+ expect(settingsSystemPanelsSource).toContain('getUpdatesPanelProps');+ expect(settingsSystemPanelsSource).toContain('getRecoveryPanelProps');+ expect(settingsSystemPanelsSource).toContain('pvePollingInterval:');+ expect(settingsSystemPanelsSource).toContain('allowedOrigins:');+ expect(settingsSystemPanelsSource).toContain('backupPollingEnabled:');+ expect(settingsSystemPanelsSource).toContain('handleDiscoveryEnabledChange:');+ expect(settingsPanelRegistryHookSource).toContain('systemPanels: SettingsSystemPanels');+ expect(settingsPanelRegistryHookSource).toContain(+ 'systemGeneralPanel: params.systemPanels.systemGeneralPanel',+ );+ expect(settingsPanelRegistryHookSource).toContain(+ 'getNetworkPanelProps: params.systemPanels.getNetworkPanelProps',+ );+ expect(settingsPanelRegistryHookSource).toContain(+ 'getUpdatesPanelProps: params.systemPanels.getUpdatesPanelProps',+ );+ expect(settingsPanelRegistryHookSource).toContain(+ 'getRecoveryPanelProps: params.systemPanels.getRecoveryPanelProps',+ );+ expect(settingsPanelRegistryHookSource).not.toContain('pvePollingInterval: params.');+ expect(settingsPanelRegistryHookSource).not.toContain('allowedOrigins: params.');+ expect(settingsPanelRegistryHookSource).not.toContain('backupPollingEnabled: params.');+ });+it('keeps commercial plan and usage sections on a shared billing owner', () => {expect(commercialBillingSectionsSource).toContain('export const CommercialSection');expect(commercialBillingSectionsSource).toContain('export const CommercialStatGrid');diff --git a/frontend-modern/src/components/Settings/useSettingsPanelRegistry.tsx b/frontend-modern/src/components/Settings/useSettingsPanelRegistry.tsxindex 221d9b6e58..f8a955a647 100644--- a/frontend-modern/src/components/Settings/useSettingsPanelRegistry.tsx+++ b/frontend-modern/src/components/Settings/useSettingsPanelRegistry.tsx@@ -1,99 +1,15 @@-import { Accessor, Component, Setter, Show, createMemo } from 'solid-js';-import type { UpdateInfo, UpdatePlan, VersionInfo } from '@/api/updates';+import { Accessor, Component, Setter, createMemo } from 'solid-js';+import type { VersionInfo } from '@/api/updates';import type { SecurityStatus as SecurityStatusInfo } from '@/types/config';import { AISettings } from './AISettings';import { AICostDashboard } from '@/components/AI/AICostDashboard';-import { GeneralSettingsPanel } from './GeneralSettingsPanel';import { ProLicensePanel } from './ProLicensePanel';import { SSOProvidersPanel } from './SSOProvidersPanel';import { createSettingsPanelRegistry } from './settingsPanelRegistry';import type { ProxmoxSettingsPanelProps } from './ProxmoxSettingsPanel';-import { getSettingsConfigurationLoadingState } from '@/utils/settingsShellPresentation';+import type { SettingsSystemPanels } from './useSettingsSystemPanels';interface UseSettingsPanelRegistryParams {- darkMode: Accessor<boolean>;- themePreference: Accessor<'light' | 'dark' | 'system'>;- setThemePreference: (pref: 'light' | 'dark' | 'system') => void;- initialLoadComplete: Accessor<boolean>;- pvePollingInterval: Accessor<number>;- setPVEPollingInterval: Setter<number>;- pvePollingSelection: Accessor<number | 'custom'>;- setPVEPollingSelection: Setter<number | 'custom'>;- pvePollingCustomSeconds: Accessor<number>;- setPVEPollingCustomSeconds: Setter<number>;- pvePollingEnvLocked: Accessor<boolean>;- setHasUnsavedChanges: Setter<boolean>;- disableLocalUpgradeMetrics: Accessor<boolean>;- disableLocalUpgradeMetricsLocked: Accessor<boolean>;- savingUpgradeMetrics: Accessor<boolean>;- handleDisableLocalUpgradeMetricsChange: (disabled: boolean) => Promise<void>;- telemetryEnabled: Accessor<boolean>;- telemetryEnabledLocked: Accessor<boolean>;- savingTelemetry: Accessor<boolean>;- handleTelemetryEnabledChange: (enabled: boolean) => Promise<void>;- disableDockerUpdateActions: Accessor<boolean>;- disableDockerUpdateActionsLocked: Accessor<boolean>;- savingDockerUpdateActions: Accessor<boolean>;- handleDisableDockerUpdateActionsChange: (disabled: boolean) => Promise<void>;- discoveryEnabled: Accessor<boolean>;- discoveryMode: Accessor<'auto' | 'custom'>;- discoverySubnetDraft: Accessor<string>;- discoverySubnetError: Accessor<string | undefined>;- savingDiscoverySettings: Accessor<boolean>;- envOverrides: Accessor<Record<string, boolean>>;- allowedOrigins: Accessor<string>;- setAllowedOrigins: Setter<string>;- allowEmbedding: Accessor<boolean>;- setAllowEmbedding: Setter<boolean>;- allowedEmbedOrigins: Accessor<string>;- setAllowedEmbedOrigins: Setter<string>;- webhookAllowedPrivateCIDRs: Accessor<string>;- setWebhookAllowedPrivateCIDRs: Setter<string>;- publicURL: Accessor<string>;- setPublicURL: Setter<string>;- handleDiscoveryEnabledChange: (enabled: boolean) => Promise<boolean>;- handleDiscoveryModeChange: (mode: 'auto' | 'custom') => Promise<void>;- setDiscoveryMode: Setter<'auto' | 'custom'>;- setDiscoverySubnetDraft: Setter<string>;- setDiscoverySubnetError: Setter<string | undefined>;- setLastCustomSubnet: Setter<string>;- commitDiscoverySubnet: (rawValue: string) => Promise<boolean>;- parseSubnetList: (value: string) => string[];- normalizeSubnetList: (value: string) => string;- isValidCIDR: (value: string) => boolean;- currentDraftSubnetValue: () => string;- assignDiscoverySubnetInputRef: (el: HTMLInputElement) => void;- versionInfo: Accessor<VersionInfo | null>;- updateInfo: Accessor<UpdateInfo | null>;- checkingForUpdates: Accessor<boolean>;- updateChannel: Accessor<'stable' | 'rc'>;- setUpdateChannel: Setter<'stable' | 'rc'>;- autoUpdateEnabled: Accessor<boolean>;- setAutoUpdateEnabled: Setter<boolean>;- autoUpdateCheckInterval: Accessor<number>;- setAutoUpdateCheckInterval: Setter<number>;- autoUpdateTime: Accessor<string>;- setAutoUpdateTime: Setter<string>;- checkForUpdates: () => Promise<void>;- updatePlan: Accessor<UpdatePlan | null>;- handleInstallUpdate: () => Promise<void>;- isInstallingUpdate: Accessor<boolean>;- backupPollingEnabled: Accessor<boolean>;- setBackupPollingEnabled: Setter<boolean>;- backupPollingInterval: Accessor<number>;- setBackupPollingInterval: Setter<number>;- backupPollingCustomMinutes: Accessor<number>;- setBackupPollingCustomMinutes: Setter<number>;- backupPollingUseCustom: Accessor<boolean>;- setBackupPollingUseCustom: Setter<boolean>;- backupPollingEnvLocked: Accessor<boolean>;- backupIntervalSelectValue: () => string;- backupIntervalSummary: () => string;- showExportDialog: Accessor<boolean>;- setShowExportDialog: Setter<boolean>;- showImportDialog: Accessor<boolean>;- setShowImportDialog: Setter<boolean>;- setUseCustomPassphrase: Setter<boolean>;securityStatus: Accessor<SecurityStatusInfo | null>;securityStatusLoading: Accessor<boolean>;organizationMonitoredSystemUsage: Accessor<number>;@@ -109,7 +25,9 @@ interface UseSettingsPanelRegistryParams {hideLocalLoginLocked: Accessor<boolean>;savingHideLocalLogin: Accessor<boolean>;handleHideLocalLoginChange: (enabled: boolean) => Promise<void>;+ versionInfo: Accessor<VersionInfo | null>;getInfrastructurePanelProps: () => ProxmoxSettingsPanelProps;+ systemPanels: SettingsSystemPanels;}export function useSettingsPanelRegistry(params: UseSettingsPanelRegistryParams) {@@ -124,43 +42,6 @@ export function useSettingsPanelRegistry(params: UseSettingsPanelRegistryParams)</div>);- const systemGeneralPanel: Component = () => (- <>- <Show when={!params.initialLoadComplete()}>- <div class="flex items-center justify-center rounded-md border border-dashed border-border bg-surface-alt py-12 text-sm text-muted">- {getSettingsConfigurationLoadingState().text}- </div>- </Show>- <Show when={params.initialLoadComplete()}>- <GeneralSettingsPanel- darkMode={params.darkMode}- themePreference={params.themePreference}- setThemePreference={params.setThemePreference}- pvePollingInterval={params.pvePollingInterval}- setPVEPollingInterval={params.setPVEPollingInterval}- pvePollingSelection={params.pvePollingSelection}- setPVEPollingSelection={params.setPVEPollingSelection}- pvePollingCustomSeconds={params.pvePollingCustomSeconds}- setPVEPollingCustomSeconds={params.setPVEPollingCustomSeconds}- pvePollingEnvLocked={params.pvePollingEnvLocked}- setHasUnsavedChanges={params.setHasUnsavedChanges}- disableLocalUpgradeMetrics={params.disableLocalUpgradeMetrics}- disableLocalUpgradeMetricsLocked={params.disableLocalUpgradeMetricsLocked}- savingUpgradeMetrics={params.savingUpgradeMetrics}- handleDisableLocalUpgradeMetricsChange={params.handleDisableLocalUpgradeMetricsChange}- telemetryEnabled={params.telemetryEnabled}- telemetryEnabledLocked={params.telemetryEnabledLocked}- savingTelemetry={params.savingTelemetry}- handleTelemetryEnabledChange={params.handleTelemetryEnabledChange}- disableDockerUpdateActions={params.disableDockerUpdateActions}- disableDockerUpdateActionsLocked={params.disableDockerUpdateActionsLocked}- savingDockerUpdateActions={params.savingDockerUpdateActions}- handleDisableDockerUpdateActionsChange={params.handleDisableDockerUpdateActionsChange}- />- </Show>- </>- );-const systemBillingPanel: Component = () => (<div class="space-y-6"><ProLicensePanel />@@ -178,86 +59,14 @@ export function useSettingsPanelRegistry(params: UseSettingsPanelRegistryParams)return createMemo(() =>createSettingsPanelRegistry({- getInfrastructurePanelProps: () => ({- ...params.getInfrastructurePanelProps(),- disableDockerUpdateActions: params.disableDockerUpdateActions,- disableDockerUpdateActionsLocked: params.disableDockerUpdateActionsLocked,- savingDockerUpdateActions: params.savingDockerUpdateActions,- handleDisableDockerUpdateActionsChange: params.handleDisableDockerUpdateActionsChange,- }),- systemGeneralPanel,+ getInfrastructurePanelProps: params.getInfrastructurePanelProps,+ systemGeneralPanel: params.systemPanels.systemGeneralPanel,systemAiPanel,systemBillingPanel,securitySsoPanel,- getNetworkPanelProps: () => ({- discoveryEnabled: params.discoveryEnabled,- discoveryMode: params.discoveryMode,- discoverySubnetDraft: params.discoverySubnetDraft,- discoverySubnetError: params.discoverySubnetError,- savingDiscoverySettings: params.savingDiscoverySettings,- envOverrides: params.envOverrides,- allowedOrigins: params.allowedOrigins,- setAllowedOrigins: params.setAllowedOrigins,- allowEmbedding: params.allowEmbedding,- setAllowEmbedding: params.setAllowEmbedding,- allowedEmbedOrigins: params.allowedEmbedOrigins,- setAllowedEmbedOrigins: params.setAllowedEmbedOrigins,- webhookAllowedPrivateCIDRs: params.webhookAllowedPrivateCIDRs,- setWebhookAllowedPrivateCIDRs: params.setWebhookAllowedPrivateCIDRs,- publicURL: params.publicURL,- setPublicURL: params.setPublicURL,- handleDiscoveryEnabledChange: params.handleDiscoveryEnabledChange,- handleDiscoveryModeChange: params.handleDiscoveryModeChange,- setDiscoveryMode: params.setDiscoveryMode,- setDiscoverySubnetDraft: params.setDiscoverySubnetDraft,- setDiscoverySubnetError: params.setDiscoverySubnetError,- setLastCustomSubnet: params.setLastCustomSubnet,- commitDiscoverySubnet: params.commitDiscoverySubnet,- setHasUnsavedChanges: params.setHasUnsavedChanges,- parseSubnetList: params.parseSubnetList,- normalizeSubnetList: params.normalizeSubnetList,- isValidCIDR: params.isValidCIDR,- currentDraftSubnetValue: params.currentDraftSubnetValue,- discoverySubnetInputRef: params.assignDiscoverySubnetInputRef,- }),- getUpdatesPanelProps: () => ({- versionInfo: params.versionInfo,- updateInfo: params.updateInfo,- checkingForUpdates: params.checkingForUpdates,- updateChannel: params.updateChannel,- setUpdateChannel: params.setUpdateChannel,- autoUpdateEnabled: params.autoUpdateEnabled,- setAutoUpdateEnabled: params.setAutoUpdateEnabled,- autoUpdateCheckInterval: params.autoUpdateCheckInterval,- setAutoUpdateCheckInterval: params.setAutoUpdateCheckInterval,- autoUpdateTime: params.autoUpdateTime,- setAutoUpdateTime: params.setAutoUpdateTime,- checkForUpdates: params.checkForUpdates,- setHasUnsavedChanges: params.setHasUnsavedChanges,- updatePlan: params.updatePlan,- onInstallUpdate: params.handleInstallUpdate,- isInstalling: params.isInstallingUpdate,- }),- getRecoveryPanelProps: () => ({- backupPollingEnabled: params.backupPollingEnabled,- setBackupPollingEnabled: params.setBackupPollingEnabled,- backupPollingInterval: params.backupPollingInterval,- setBackupPollingInterval: params.setBackupPollingInterval,- backupPollingCustomMinutes: params.backupPollingCustomMinutes,- setBackupPollingCustomMinutes: params.setBackupPollingCustomMinutes,- backupPollingUseCustom: params.backupPollingUseCustom,- setBackupPollingUseCustom: params.setBackupPollingUseCustom,- backupPollingEnvLocked: params.backupPollingEnvLocked,- backupIntervalSelectValue: params.backupIntervalSelectValue,- backupIntervalSummary: params.backupIntervalSummary,- setHasUnsavedChanges: params.setHasUnsavedChanges,- showExportDialog: params.showExportDialog,- setShowExportDialog: params.setShowExportDialog,- showImportDialog: params.showImportDialog,- setShowImportDialog: params.setShowImportDialog,- setUseCustomPassphrase: params.setUseCustomPassphrase,- securityStatus: params.securityStatus,- }),+ getNetworkPanelProps: params.systemPanels.getNetworkPanelProps,+ getUpdatesPanelProps: params.systemPanels.getUpdatesPanelProps,+ getRecoveryPanelProps: params.systemPanels.getRecoveryPanelProps,getOrganizationOverviewPanelProps: () => ({}),getOrganizationAccessPanelProps: () => ({}),getOrganizationSharingPanelProps: () => ({}),diff --git a/frontend-modern/src/components/Settings/useSettingsSystemPanels.tsx b/frontend-modern/src/components/Settings/useSettingsSystemPanels.tsxnew file mode 100644index 0000000000..9fffb22aef--- /dev/null+++ b/frontend-modern/src/components/Settings/useSettingsSystemPanels.tsx@@ -0,0 +1,152 @@+import { Accessor, Component, Show } from 'solid-js';+import type { SecurityStatus as SecurityStatusInfo } from '@/types/config';+import { GeneralSettingsPanel, type GeneralSettingsPanelProps } from './GeneralSettingsPanel';+import type { NetworkSettingsPanelProps } from './networkSettingsModel';+import type { RecoverySettingsPanelProps } from './RecoverySettingsPanel';+import type { UpdatesSettingsPanelProps } from './UpdatesSettingsPanel';+import { getSettingsConfigurationLoadingState } from '@/utils/settingsShellPresentation';+import type { useBackupTransferFlow } from './useBackupTransferFlow';+import type { useDiscoverySettingsState } from './useDiscoverySettingsState';+import type { useSystemSettingsState } from './useSystemSettingsState';++interface DiscoverySettingsPanelState extends ReturnType<typeof useDiscoverySettingsState> {+ commitDiscoverySubnet: (rawValue: string) => Promise<boolean>;+ handleDiscoveryEnabledChange: (enabled: boolean) => Promise<boolean>;+ handleDiscoveryModeChange: (mode: 'auto' | 'custom') => Promise<void>;+}++interface UseSettingsSystemPanelsParams {+ darkMode: Accessor<boolean>;+ themePreference: Accessor<'light' | 'dark' | 'system'>;+ setThemePreference: (pref: 'light' | 'dark' | 'system') => void;+ initialLoadComplete: Accessor<boolean>;+ systemSettings: ReturnType<typeof useSystemSettingsState>;+ discoverySettings: DiscoverySettingsPanelState;+ backupTransferFlow: ReturnType<typeof useBackupTransferFlow>;+ securityStatus: Accessor<SecurityStatusInfo | null>;+}++export interface SettingsSystemPanels {+ systemGeneralPanel: Component;+ getNetworkPanelProps: () => NetworkSettingsPanelProps;+ getRecoveryPanelProps: () => RecoverySettingsPanelProps;+ getUpdatesPanelProps: () => UpdatesSettingsPanelProps;+}++export function useSettingsSystemPanels(+ params: UseSettingsSystemPanelsParams,+): SettingsSystemPanels {+ const systemGeneralPanelProps = (): GeneralSettingsPanelProps => ({+ darkMode: params.darkMode,+ themePreference: params.themePreference,+ setThemePreference: params.setThemePreference,+ pvePollingInterval: params.systemSettings.pvePollingInterval,+ setPVEPollingInterval: params.systemSettings.setPVEPollingInterval,+ pvePollingSelection: params.systemSettings.pvePollingSelection,+ setPVEPollingSelection: params.systemSettings.setPVEPollingSelection,+ pvePollingCustomSeconds: params.systemSettings.pvePollingCustomSeconds,+ setPVEPollingCustomSeconds: params.systemSettings.setPVEPollingCustomSeconds,+ pvePollingEnvLocked: params.systemSettings.pvePollingEnvLocked,+ setHasUnsavedChanges: params.systemSettings.setHasUnsavedChanges,+ disableLocalUpgradeMetrics: params.systemSettings.disableLocalUpgradeMetrics,+ disableLocalUpgradeMetricsLocked: params.systemSettings.disableLocalUpgradeMetricsLocked,+ savingUpgradeMetrics: params.systemSettings.savingUpgradeMetrics,+ handleDisableLocalUpgradeMetricsChange:+ params.systemSettings.handleDisableLocalUpgradeMetricsChange,+ telemetryEnabled: params.systemSettings.telemetryEnabled,+ telemetryEnabledLocked: params.systemSettings.telemetryEnabledLocked,+ savingTelemetry: params.systemSettings.savingTelemetry,+ handleTelemetryEnabledChange: params.systemSettings.handleTelemetryEnabledChange,+ disableDockerUpdateActions: params.systemSettings.disableDockerUpdateActions,+ disableDockerUpdateActionsLocked: params.systemSettings.disableDockerUpdateActionsLocked,+ savingDockerUpdateActions: params.systemSettings.savingDockerUpdateActions,+ handleDisableDockerUpdateActionsChange:+ params.systemSettings.handleDisableDockerUpdateActionsChange,+ });++ const systemGeneralPanel: Component = () => (+ <>+ <Show when={!params.initialLoadComplete()}>+ <div class="flex items-center justify-center rounded-md border border-dashed border-border bg-surface-alt py-12 text-sm text-muted">+ {getSettingsConfigurationLoadingState().text}+ </div>+ </Show>+ <Show when={params.initialLoadComplete()}>+ <GeneralSettingsPanel {...systemGeneralPanelProps()} />+ </Show>+ </>+ );++ return {+ systemGeneralPanel,+ getNetworkPanelProps: () => ({+ discoveryEnabled: params.discoverySettings.discoveryEnabled,+ discoveryMode: params.discoverySettings.discoveryMode,+ discoverySubnetDraft: params.discoverySettings.discoverySubnetDraft,+ discoverySubnetError: params.discoverySettings.discoverySubnetError,+ savingDiscoverySettings: params.discoverySettings.savingDiscoverySettings,+ envOverrides: params.systemSettings.envOverrides,+ allowedOrigins: params.systemSettings.allowedOrigins,+ setAllowedOrigins: params.systemSettings.setAllowedOrigins,+ allowEmbedding: params.systemSettings.allowEmbedding,+ setAllowEmbedding: params.systemSettings.setAllowEmbedding,+ allowedEmbedOrigins: params.systemSettings.allowedEmbedOrigins,+ setAllowedEmbedOrigins: params.systemSettings.setAllowedEmbedOrigins,+ webhookAllowedPrivateCIDRs: params.systemSettings.webhookAllowedPrivateCIDRs,+ setWebhookAllowedPrivateCIDRs: params.systemSettings.setWebhookAllowedPrivateCIDRs,+ publicURL: params.systemSettings.publicURL,+ setPublicURL: params.systemSettings.setPublicURL,+ handleDiscoveryEnabledChange: params.discoverySettings.handleDiscoveryEnabledChange,+ handleDiscoveryModeChange: params.discoverySettings.handleDiscoveryModeChange,+ setDiscoveryMode: params.discoverySettings.setDiscoveryMode,+ setDiscoverySubnetDraft: params.discoverySettings.setDiscoverySubnetDraft,+ setDiscoverySubnetError: params.discoverySettings.setDiscoverySubnetError,+ setLastCustomSubnet: params.discoverySettings.setLastCustomSubnet,+ commitDiscoverySubnet: params.discoverySettings.commitDiscoverySubnet,+ setHasUnsavedChanges: params.systemSettings.setHasUnsavedChanges,+ parseSubnetList: params.discoverySettings.parseSubnetList,+ normalizeSubnetList: params.discoverySettings.normalizeSubnetList,+ isValidCIDR: params.discoverySettings.isValidCIDR,+ currentDraftSubnetValue: params.discoverySettings.currentDraftSubnetValue,+ discoverySubnetInputRef: params.discoverySettings.assignDiscoverySubnetInputRef,+ }),+ getUpdatesPanelProps: () => ({+ versionInfo: params.systemSettings.versionInfo,+ updateInfo: params.systemSettings.updateInfo,+ checkingForUpdates: params.systemSettings.checkingForUpdates,+ updateChannel: params.systemSettings.updateChannel,+ setUpdateChannel: params.systemSettings.setUpdateChannel,+ autoUpdateEnabled: params.systemSettings.autoUpdateEnabled,+ setAutoUpdateEnabled: params.systemSettings.setAutoUpdateEnabled,+ autoUpdateCheckInterval: params.systemSettings.autoUpdateCheckInterval,+ setAutoUpdateCheckInterval: params.systemSettings.setAutoUpdateCheckInterval,+ autoUpdateTime: params.systemSettings.autoUpdateTime,+ setAutoUpdateTime: params.systemSettings.setAutoUpdateTime,+ checkForUpdates: params.systemSettings.checkForUpdates,+ setHasUnsavedChanges: params.systemSettings.setHasUnsavedChanges,+ updatePlan: params.systemSettings.updatePlan,+ onInstallUpdate: params.systemSettings.handleInstallUpdate,+ isInstalling: params.systemSettings.isInstallingUpdate,+ }),+ getRecoveryPanelProps: () => ({+ backupPollingEnabled: params.systemSettings.backupPollingEnabled,+ setBackupPollingEnabled: params.systemSettings.setBackupPollingEnabled,+ backupPollingInterval: params.systemSettings.backupPollingInterval,+ setBackupPollingInterval: params.systemSettings.setBackupPollingInterval,+ backupPollingCustomMinutes: params.systemSettings.backupPollingCustomMinutes,+ setBackupPollingCustomMinutes: params.systemSettings.setBackupPollingCustomMinutes,+ backupPollingUseCustom: params.systemSettings.backupPollingUseCustom,+ setBackupPollingUseCustom: params.systemSettings.setBackupPollingUseCustom,+ backupPollingEnvLocked: params.systemSettings.backupPollingEnvLocked,+ backupIntervalSelectValue: params.systemSettings.backupIntervalSelectValue,+ backupIntervalSummary: params.systemSettings.backupIntervalSummary,+ setHasUnsavedChanges: params.systemSettings.setHasUnsavedChanges,+ showExportDialog: params.backupTransferFlow.showExportDialog,+ setShowExportDialog: params.backupTransferFlow.setShowExportDialog,+ showImportDialog: params.backupTransferFlow.showImportDialog,+ setShowImportDialog: params.backupTransferFlow.setShowImportDialog,+ setUseCustomPassphrase: params.backupTransferFlow.setUseCustomPassphrase,+ securityStatus: params.securityStatus,+ }),+ };+}diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.tsindex 26f14602bb..eaaf853918 100644--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts@@ -27,6 +27,10 @@ import updatesSettingsModelSource from '@/components/Settings/updatesSettingsModimport diagnosticsModelSource from '@/components/Settings/diagnosticsModel.ts?raw';import diagnosticsResultsPanelSource from '@/components/Settings/DiagnosticsResultsPanel.tsx?raw';import diagnosticsStateSource from '@/components/Settings/useDiagnosticsPanelState.ts?raw';+import settingsShellSource from '@/components/Settings/Settings.tsx?raw';+import settingsPanelRegistrySource from '@/components/Settings/useSettingsPanelRegistry.tsx?raw';+import settingsSystemPanelsSource from '@/components/Settings/useSettingsSystemPanels.tsx?raw';+import discoverySettingsStateSource from '@/components/Settings/useDiscoverySettingsState.ts?raw';import networkBoundarySettingsSectionSource from '@/components/Settings/NetworkBoundarySettingsSection.tsx?raw';import networkDiscoverySectionSource from '@/components/Settings/NetworkDiscoverySection.tsx?raw';import networkSettingsPanelSource from '@/components/Settings/NetworkSettingsPanel.tsx?raw';@@ -826,6 +830,27 @@ describe('frontend resource type boundaries', () => {);expect(networkSettingsModelSource).toContain('export type NetworkDiscoverySectionProps');expect(networkSettingsModelSource).toContain('export type NetworkBoundarySettingsSectionProps');+ expect(settingsShellSource).toContain('./useDiscoverySettingsState');+ expect(settingsShellSource).toContain('./useSettingsPanelRegistry');+ expect(settingsShellSource).toContain('./useSettingsSystemPanels');+ expect(settingsShellSource).toContain('const discoverySettings = useDiscoverySettingsState()');+ expect(settingsShellSource).toContain('const systemPanels = useSettingsSystemPanels({');+ expect(settingsShellSource).toContain(+ 'const settingsPanelRegistry = useSettingsPanelRegistry({',+ );+ expect(settingsPanelRegistrySource).toContain('systemPanels: SettingsSystemPanels');+ expect(settingsPanelRegistrySource).toContain(+ 'getNetworkPanelProps: params.systemPanels.getNetworkPanelProps',+ );+ expect(settingsPanelRegistrySource).not.toContain('allowedOrigins: params.');+ expect(settingsPanelRegistrySource).not.toContain('backupPollingEnabled: params.');+ expect(settingsSystemPanelsSource).toContain('GeneralSettingsPanel');+ expect(settingsSystemPanelsSource).toContain('getSettingsConfigurationLoadingState');+ expect(settingsSystemPanelsSource).toContain('allowedOrigins:');+ expect(settingsSystemPanelsSource).toContain('backupPollingEnabled:');+ expect(discoverySettingsStateSource).toContain('export function useDiscoverySettingsState');+ expect(discoverySettingsStateSource).toContain('normalizeSubnetList');+ expect(discoverySettingsStateSource).toContain('isValidCIDR');expect(reportingPanelSource).toContain('@/utils/upgradePresentation');expect(reportingPanelSource).toContain('@/components/Settings/useReportingPanelState');expect(reportingPanelSource).toContain('@/components/Settings/reportingPanelModel');diff --git a/scripts/release_control/subsystem_lookup_test.py b/scripts/release_control/subsystem_lookup_test.pyindex 3c24b1171c..6958f406b3 100644--- a/scripts/release_control/subsystem_lookup_test.py+++ b/scripts/release_control/subsystem_lookup_test.py@@ -1864,6 +1864,9 @@ class SubsystemLookupTest(unittest.TestCase):"frontend-modern/src/components/Settings/SecurityOverviewPanel.tsx","frontend-modern/src/components/Settings/SSOProvidersPanel.tsx","frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx",+ "frontend-modern/src/components/Settings/useDiscoverySettingsState.ts",+ "frontend-modern/src/components/Settings/useSettingsPanelRegistry.tsx",+ "frontend-modern/src/components/Settings/useSettingsSystemPanels.tsx",]result = lookup_paths(runtime_files)self.assertEqual(result["unowned_runtime_files"], [])